UNLOAD PLUS user exits
The following topics describe user-written exit routines that you can use to customize your unload processing:
- Parameter data and pseudo-SQLDA
- Function codes and return codes for UNLOAD PLUS user exits
- UNLOAD PLUS pseudo-SQLDA
- UNLOAD PLUS Assembler user exit
- UNLOAD PLUS C user exit
- UNLOAD PLUS LE C user exit
- UNLOAD PLUS COBOL II and LE COBOL user exits
- Overview of UNLOAD PLUS user exits
- Requirements and restrictions for UNLOAD PLUS user exits
UNLOAD PLUS allows you to further customize your unload processing through user-written exit routines.
UNLOAD PLUS supports exit routines written in COBOL II, LE COBOL, SAS C, LE C, and Assembler. The exit routine is invoked when you supply the module name and program type with the UNLOADEXIT option of the UNLOAD command statement.
UNLOAD PLUS passes every output record to your routine before the record is written to the unload data set. The exit routine can inspect, modify, or discard records before UNLOAD PLUS writes them to the unload data set. If sorting is performed, the record is passed to the exit before the sort, but after the sort key is built.
Requirements and restrictions for UNLOAD PLUS user exits
UNLOAD PLUS user exits have the following requirements:
The library in which this exit resides must be APF-authorized and included in your system’s LINKLIST or in your JOBLIB or STEPLIB.
For COBOL II and C programs, the appropriate runtime libraries must be authorized and in your LINKLIST, JOBLIB, or STEPLIB.
For LE COBOL and LE C programs, the appropriate IBM Language Environment runtime libraries must be authorized and in your LINKLIST, JOBLIB, or STEPLIB.
Your routine must be reentrant.
The following restrictions apply when using user-written exit routines with UNLOAD PLUS:
If you specify FORMAT BMCLOAD, you cannot also use user-written exit routines. UNLOAD PLUS ignores the UNLOADEXIT option when you also specify FORMAT BMCLOAD.
MAXSORTS is set to 1 when you specify LE COBOL, COBOL II, C, or LE C user exit routines.
Do not use a user-written exit routine when unloading multiple tables.
Do not use a user-written exit routine to modify the length of a record passed to the exit.
UNLOAD PLUS passes 128-byte areas for the table creator and table name parameters to user-written exit routines. If you use an exit that depends on the table creator or table name that UNLOAD PLUS passes, ensure that your exit allows for 128-byte creator and table names.