E18 user exit list

The VSAM user exit list must be built using the VSAM EXLST macro instruction giving the addresses of your routines handling VSAM user exit functions. VSAM branches directly to your routines which must return to VSAM via register 14.

Any VSAM user exit function available for input data sets can be used except EODAD. If you need to do EODAD processing, write a LERAD user exit and check for X'04' in the FDBK field of the RPL. This will indicate input EOD. This field must not be altered when returning to VSAM because it is also needed by DFSORT.

For details, see z/OS DFSMS Macro Instructions for Data Sets.

Figure 1 shows an example of code your program can use to return control to DFSORT.

Figure 1. E18 User Exit Example
  ENTRY   E18
         .
         .
E18      LA      1,PARMLST
         RETURN
         CNOP    0,4
PARMLST  DC      X'01'
         DC      AL3(SER)
         DC      X'02'
         DC      AL3(LST)
         DC      X'03'
         DC      X'000080'        EROPT CODE
         DC      A(0)
         DC      X'04'
         DC      AL3(QSAMEOD)
         DC      X'05'
         DC      AL3(VSAMEXL)
         DC      X'06'
         DC      AL3(PWDLST)
         DC      A(0)
         .
         .
VSAMEXL  EXLST   SYNAD=USYNAD,LERAD=ULERAD
PWDLST   DC      H'1'
         DC      CL8'SORTIN'      SORTIN DDNAME
         DC      CL8'INPASS'      SORTIN PASSWORD
USYNAD   ...                      VSAM SYNCH ERROR RTN
ULERAD   ...                      VSAM LOGIC ERROR RTN
SER      ...                      QSAM ERROR RTN
LST      DC      X'85',AL3(RTN)   EXLST ADDRESS LIST1
RTN      ...                      EXLST ROUTINE
QSAMEOD  ...                 QSAM END OF FILE ROUTINE
1 X'85'= X'80' plus X' 05', where:
  • X'80' means this entry is the LAST ENTRY of the list.
  • X'05' means this user exit is the data control block user exit.

For more information, refer to z/OS DFSMS Using Data Sets.