EXITS Statement


The EXITS statement is used to identify exit routines IEBGENER to use.

Syntax -

//SYSIN DD *
  EXITS [INHDR=routinename][,OUTHDR=routinename]
	[,INTLR=routinename][,OUTTLR=routinename]
	[,KEY=routinename][,DATA=routinename]
	[,IOERROR=routinename][,TOTAL=(routinename,size)]
/*

Parameters -

KeywordDescription
INHDR=routine-nameSpecifies the routine name that processes user input header labels.
OUTHDR=routine-nameSpecifies the routine name that creates user output header labels. It is ignored when the output is PDS.
INTLR=routine-nameSpecifies the routine name that processes user input trailer labels.
OUTTLR=routine-nameSpecifies the routine name that processes user output trailer labels. It is ignored when the output is PDS.
KEY=routine-nameSpecifies the routine name that creates the output record key.
DATA=routine-nameSpecifies the routine name that modifies the physical record before it modifies before IEBGENER processes it.
IOERROR=routine-nameSpecifies the routine name that handles permanent input/output error conditions.
TOTAL=(routine-name,size)Specifies that a user exit routine is to be provided before writing each record.

Practical Example -


Scenario - Split sequential file records into three new PDS members.

Input PS File - MATEPK.IEBGENER.INPUTPS

JCL -

----+----1----+----2----+----3----+----4----+----5----+
...
//STEP10   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=MATEPK.IEBGENER.INPUTPS,DISP=SHR
//SYSUT2   DD DSN=MATEPK.IEBGENER.OUTPDS,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(10,10,10),RLSE),
//            VOL=SER=DEVHD4,UNIT=3390,
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN    DD  *
  GENERATE MAXNAME=3,MAXGPS=2
     EXITS IOERROR=ERRORRT
    MEMBER NAME=MEMBER1
    RECORD IDENT=(5,'E0003',1)
    MEMBER NAME=MEMBER2
    RECORD IDENT=(5,'E0005',1)
    MEMBER NAME=MEMBER3
/*
...