In this topic, we described about the Labels with detailed example.
Specifies user-label processing. If more than one valid LABELS statement is included, all but the last LABELS statement are ignored.
Specifies if user labels are to be treated as data by IEBGENER.
Specifies any user labels are treated as data.
YES is the default.
Specifies user labels are not to be treated as data.
Specifies all user labels in the group currently processing are to be treated as data.
Specifies only user header labels are to be treated as data.
Specifies user labels for the output data set are supplied as 80-byte input records in the data portion of SYSIN.
A sequential input data set is edited and copied.
//TAPETAPE JOB ... //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=INPUTS,UNIT=tape,DISP=(OLD,KEEP), // VOLUME=SER=111111,LABEL=(3,SUL) //SYSUT2 DD DSNAME=OUTPUTS,UNIT=tape,DISP=(NEW,PASS), // DCB=(RECFM=FB,LRECL=80), // VOLUME=SER=111112,LABEL=(,SUL) //SYSIN DD * GENERATE MAXFLDS=3,MAXLITS=10 RECORD FIELD=(9,'---------',,1), FIELD=(5,1,HE,10),FIELD=(1,'=',,16) EXITS INHDR=ROUT1,OUTTLR=ROUT2 LABELS DATA=INPUT /*
Let’s discuss the example in detail.
- SYSUT1 DD defines the sequential input data set (INPUTS).
- SYSUT2 DD defines the sequential output data set (OUTPUTS). The LABEL=(,SUL) is required because of the user labels created.
- SYSIN DD defines the control data set.
- GENERATE indicates a maximum of three FIELD parameters included in subsequent RECORD statements and a maximum of 10 literal characters are included in subsequent FIELD parameters.
- The RECORD statement performs the below tasks.
Controls the editing, hyphens are placed in positions 1 through 9;
Positions 1 through 5 of the input record are converted from H-set BCDIC to EBCDIC mode.
Moved to positions 11 through 15; and an equal sign is placed in position 16.
- EXITS indicate the specified user routines require control when SYSUT1 is opened and when SYSUT2 is closed.
- LABELS indicate labels are included in the input stream.