Example 10: Consecutively copy multiple members to a sequential data set
//JOB0010 JOB ...
//MERGE EXEC PGM=IQIBUTIL
//STEPLIB DD DISP=SHR,DSN=IQI.SIQILOAD
//IQIBUDFL DD DISP=SHR,DSN=IQI.SIQIPLIB
//SYSPRINT DD SYSOUT=*
//INPDSE DD DISP=SHR,DSN=INXY025.RELEASE.DOCLIB
//WORKDOC DD DISP=OLD,DSN=INXY025.WORKDOC
//BKUPDOCS DD DISP=OLD,DSN=INXY025.VB255.BKUPDOCS
//PRINTDOC DD SYSOUT=X
//SYSIN DD *
S1 COPYSEQ I=((INPDSE,R)),O=WORKDOC,
HEADER=ADD
S M=REPORT3,REPORT2,REPORT1,
INTRO*
EXCLUDE M=INTRO9*
S2 COPYSEQ O=PRINTDOC,
INDSN=INXY025.WORKDOC
S3 COPYSEQ I=INPDSE,O=BKUPDOCS,HEADER=ADD
/*
In this example:
- All members with names that begin with "INTRO" are consecutively copied, except those that begin with "INTRO9".
- Then members REPORT1, REPORT2, and REPORT3 are copied. Each copied member is preceded with a corresponding IEBUPDTE "./ ADD NAME=..." control statement.
- The copied members output data set INXY025.WORKDOC is printed.
- All members from the input library are copied into an output sequential data set of a different record format, while an IEBUPDTE control statement of ./ ADD NAME=<member_name>,LIST=ALL is inserted in front of each copied member.
Note:
- Due to the REPLACE option, specified in the INDD parameter, the data set attributes RECFM, LRECL, and BLKSIZE of INXY025.WORKDOC are replaced with the same attributes of data set INXY025.RELEASE.DOCLIB.
- The selected members are copied in ascending order of member names, regardless of their selection order.