IEBPTPCH print PDS members to a file in alphabetical order

IEBPTPCH print PDS members to a file in alphabetical order

I am using IEBPTPCH to “print” all members of a PDS to a file. I got this to work but the problem is that the members seem to be in a random order and not in alphabetical order. My cards are: PUNCH TYPORG=PO Are there any other parameters to get the data sorted by member name? Thanks, Dave

This method is probably a holdover from the OS/360 days when PDS’s were first introduced. It significantly reduces the time it once took to process the entire dataset and sent the output to the physical printer or card punch. But it’s an anachronistic method since hardly anyone uses physical punched cards anymore. But that’s the way IBM designed IEBPTPCH so it is “working as designed”. And that’s a hard mind-set to change.

Thanks to an IBM LVL 2 person with common sense, empathy and determination, IBM has agreed to take a DOC APAR of this anomaly (OA45799). The Request For Enhancement and/or Marketing Request to change/upgrade IEBPTPCH is in the process of being conceptualized.

I have found an alternative to the IEBPTPCH unload of PDS members. This method will unload all members of a PDS in ALPHA order: //S1 EXEC SAS,REGION=5000K, // OPTIONS=’MACRO’ //PDSIN DD DISP=SHR,DSN=input-dataset //PSDOUT DD DSN=output-dataset, // DISP=OLD, // UNIT=3390,SPACE=(CYL,(50,10),RLSE), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) //SYSIN DD *,DLM=ZZ PROC SOURCE INDD=PDSIN OUTDD=PSDOUT NOPRINT NULL; RUN;

ZZ

The members are unloaded in ALPAH order separated by the IEBUPDTE control statement:
./ ADD NAME=member-name

The addition of special SAS control statements FIRST/LAST BEFORE/AFTER will signal SAS to eliminate the IEBUPDTE control statement:

//S1 EXEC SAS,REGION=5000K, // OPTIONS=’MACRO’ //PDSIN DD DISP=SHR,DSN=input-dataset //PSDOUT DD DSN=output-dataset, // DISP=OLD, // UNIT=3390,SPACE=(CYL,(50,10),RLSE), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) //SYSIN DD *,DLM=ZZ PROC SOURCE INDD=PDSIN OUTDD=PSDOUT NOPRINT NULL; FIRST ‘%%%%%% START of entire dataset %%%%%%’; BEFORE’%%%%%% START OF NEW MEMBER %%%%%%’; AFTER ‘%%%%%% END OF MEMBER %%%%%%’; LAST ‘%%%%%% END entire dataset %%%%%%’; RUN;

ZZ

You can use all four statements or any combination of statements that works for you. There are more SAS statements to control and format printed output. My examples are for data transfer of a PDS to a sequential file.

Link for PROC SOURCE usage: http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a000217440.htm

#3

IEBPTPCH only appears to produce output of an all-member run in random order. There is an order, it’s just not documented. IEBPTPCH reads the directory of a PDS and sorts the members of the dataset by TTRC order, not in ALPHA order. To determine the output order of an all member run you need to produce an IEHLIST of the PDS directory: DATE: 2014.224 TIME: 15.20.1 DIRECTORY INFO FOR SPECIFIED ASYS.CSYDAM.REXX.NETVIEW.OLD MEMBERS TTRC CKCTTEST 0000100F COMPLEX 0000040F