Changing Logical Record Length


IEBGENER is used to produce a reblocked output file. The output file can contain either fixed-length or variable-length records that is different from input record length. Any fields that are not coded may contain unpredictable data.

Practical Example -


Scenario - Create new PS file with length 70 different input file length 80.

Input PS File - MATEPK.IEBGENER.INPUTPS

JCL -

----+----1----+----2----+----3----+----4----+----5----+----6
...
//STEP10   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=MATEPK.IEBGENER.INPUTPS,DISP=SHR
//SYSUT2   DD DSN=MATEPK.IEBGENER.OUTPUTPS,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(10,10),RLSE),
//            UNIT=3390,VOL=SER=DEVHD4,
//            DCB=(DSORG=PS,RECFM=FB,LRECL=70,BLKSIZE=700)
//SYSIN    DD  *
  GENERATE MAXFLDS=1
    RECORD FIELD=(70,1,,1)
/*
...