IEBGENER Record

IEBGENER - MEMBER IEBGENER - Performing Tasks

Advertisements


Defines a record group to be processed.

Supplies editing information.

The RECORD statement is used to define a record group to supply editing information.

A record group consists of records that are to be processed identically.


Syntax:

LabelStatementParameters
[label]RECORD [{IDENT|IDENTG}=(length, 'name',input-location)]
[,FIELD=([length],
[{input-location|
'literal'}],
[conversion],
[output-location])]
[,FIELD=...]
[,LABELS=n]

{IDENT|IDENTG}= (length,'name',input-location)

Identifies the last record of a collection of records in the input data set.


length


Specifies the length of the identifying name.

The length of your identifier cannot be greater than eight.


'name'


Specifies the literal that identifies the last input record of a group of records.


input-location


Specifies the starting position of the field that contains the identifying name in the input records.


FIELD=([length], [{input-location| 'literal'}], [conversion],[output-location])

specifies field-processing and editing information.


length


specifies the length (in bytes) of the input field or literal to be processed.

If length is not specified, a length of 80 is assumed.


input-location


specifies the starting position of the field to be processed.

If input-location is not specified, it defaults to 1.


'literal'


specifies a literal (maximum length of 40 bytes) to be placed in the specified output location.


conversion


specifies a code that indicates the type of conversion to be performed on this field.


output-location


specifies the starting location of this field in the output records.

If output-location is not specified, the location defaults to 1.


LABELS=n

is an optional parameter that indicates the number of records in the SYSIN data set to be treated as user labels.


Example:


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.

IEBGENER - MEMBER IEBGENER - Performing Tasks

Advertisements