In this example, a three-member partitioned data set (NEWMCLIB)
is created. The data set will contain two members, ATTACH and DETACH,
copied from an existing partitioned data set (SYS1.MACLIB), and a
new member, EXIT, which is contained in the control data set.
//UPDATE JOB ...
//STEP1 EXEC PGM=IEBUPDTE,PARM=MOD
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=SYS1.MACLIB,DISP=SHR
//SYSUT2 DD DSNAME=DEV.DRIVER3.NEWMCLIB,UNIT=disk,
// DISP=(NEW,CATLG),SPACE=(TRK,(100,,10)),
// DCB=(RECFM=F,LRECL=80,BLKSIZE=4000)
//SYSIN DD DATA
./ REPRO NAME=ATTACH,LEVEL=00,SOURCE=1,LIST=ALL
./ REPRO NAME=DETACH,LEVEL=00,SOURCE=1,LIST=ALL
./ ADD NAME=EXIT,LEVEL=00,SOURCE=1,LIST=ALL
./ NUMBER NEW1=10,INCR=100
(Data records for EXIT member)
./ ENDUP
/*
The control statements are as follows:
- SYSUT1 DD defines the input partitioned data set SYS1.MACLIB,
which is assumed to be cataloged.
- SYSUT2 DD defines the output partitioned data set DEV.DRIVER3,NEWMCLIB.
Enough space is allocated to allow for subsequent modifications without
creating a new master data set.
- SYSIN DD defines the control data set, which follows in the input
stream.
- The REPRO function statements identify the existing input members
(ATTACH and DETACH) to be copied onto the output data set. These members
are also listed in the message data set (because LIST=ALL is specified).
- The ADD function statement indicates that records (subsequent
data statements) are to be placed as members in the output partitioned
data set, called EXIT. The data statements are to be listed in the
message data set.
- The NUMBER detail statement assigns sequence numbers to the data
statements. (The data statements contain blank sequence numbers in
columns 73 through 80.) The first record of the output member is assigned
sequence number 10; subsequent record numbers are increased by 100.
- ENDUP signals the end of SYSIN data.
Note that the three named input members (ATTACH, DETACH, and EXIT)
do not have to be specified in the order of their collating sequence
in the old master.