In this example, a member of a partitioned data set is created
from sequential input and existing logical records are updated.
//UPDATE JOB ...
//STEP1 EXEC PGM=IEBUPDTE,PARM=MOD
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=BROWN.OLDSEQDS,UNIT=tape,
// DISP=(OLD,KEEP),VOLUME=SER=001234
//SYSUT2 DD DSNAME=BROWN.NEWPART,UNIT=disk,DISP=(,CATLG),
// VOLUME=SER=111112,SPACE=(TRK,(10,5,5)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=4080)
//SYSIN DD *
./ CHANGE NEW=PO,MEMBER=PARMEM1,LEVEL=01,
./ SEQFLD=605,COLUMN=40,SOURCE=0
(Data statement 1, sequence number 00020)
./ DELETE SEQ1=220,SEQ2=250
(Data statement 2, sequence number 00230)
(Data statement 3, sequence number 00260)
./ ALIAS NAME=MEMB1
/*
The control statements are as follows:
- SYSUT1 DD defines the input sequential data set (BROWN.OLDSEQDS).
The data set resides on a tape volume.
- SYSUT2 DD defines the output partitioned data set (BROWN.NEWPART).
Enough space is allocated to provide for members that may be added
in the future.
- SYSIN DD defines the control data set, which follows in the input
stream.
- The CHANGE function statement identifies the output member (PARMEM1)
and indicates that a conversion from sequential input to partitioned
output is made. The SEQFLD parameter indicates that a 5-byte sequence
number is located in columns 60 through 64 of each data statement.
The COLUMN=40 parameter specifies the starting column of a field (within
subsequent data statements) from which replacement information is
obtained. SOURCE=0 indicates that the replacement information is provided
by you.
- The first data statement is used as replacement data. Columns
40 through 80 of the statement replace columns 40 through 80 of the
corresponding logical record. If no such logical record exists, the
entire card image is inserted in the output data set member.
- The DELETE detail statement deletes all of the logical records
having sequence numbers from 220 through 250.
- The second data statement, whose sequence number falls within
the range specified in the DELETE detail statement is incorporated
in its entirety in the output data set member.
- The third data statement, which is beyond the range of the DELETE
detail statement, is treated in the same manner as the first data
statement.
- ALIAS assigns the alias name MEMB1 to the output data set member
PARMEM1.