Contents
Copying PDS to PS [▲ Top]
Unload all members of a partitioned dataset (PDS) in a physical sequential (PS) flat file.
//*
//* +----1----+----2----+----3----+----4----+----5----+----6----+----7-
//*
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=pds.dataset.name
//SYSUT2 DD DISP=(,CATLG,DELETE),DSN=ps.dataset.name,
// UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=81,BLKSIZE=0)
//SYSIN DD *
PUNCH TYPORG=PO
/*
//STEP2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=ps.dataset.name
//SORTOUT DD DISP=(,CATLG,DELETE),DSN=ps.dataset.name.sorted,
// UNIT=SYSDA,SPACE=(CYL,(2,2)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1:2,80)
/*