In this example, a partitioned data set (consisting of three members)
is created from sequential input.
//TAPEDISK JOB ...
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=INSET,UNIT=tape,LABEL=(,SL),
// DISP=(OLD,KEEP),VOLUME=SER=001234
//SYSUT2 DD DSNAME=NEWSET,UNIT=disk,DISP=(,KEEP),
// VOLUME=SER=111112,SPACE=(TRK,(10,5,5)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000)
//SYSIN DD *
GENERATE MAXNAME=3,MAXGPS=2
MEMBER NAME=MEMBER1
GROUP1 RECORD IDENT=(8,'FIRSTMEM',1)
MEMBER NAME=MEMBER2
GROUP2 RECORD IDENT=(8,'SECNDMEM',1)
MEMBER NAME=MEMBER3
/*
The control statements are as follows:
- SYSUT1 DD defines the input data set (INSET). The data set is
the first data set on a tape volume.
- SYSUT2 DD defines the output partitioned data set (NEWSET). The
data set is to be placed on a disk volume. Ten tracks of primary space,
five tracks of secondary space, and five blocks (256 bytes each) of
directory space are allocated to allow for future expansion of the
data set. The output records are blocked to reduce the space required
by the data set.
- SYSIN DD defines the control data set, which follows in the input
stream. The utility control statements are used to create members
from sequential input data; the statements do not specify any editing.
- GENERATE indicates that three member names are included in subsequent
MEMBER statements and that the IDENT parameter appears twice in subsequent
RECORD statements.
- The first MEMBER statement assigns a member name (MEMBER1) to
the first member.
- The first RECORD statement (GROUP1) identifies the last record
to be placed in the first member. The name of this record (FIRSTMEM)
appears in the first eight positions of the input record.
- The remaining MEMBER and RECORD statements define the second and
third members. Note that, as there is no RECORD statement associated
with the third MEMBER statement, the remainder of the input file will
be loaded as the third member.