Reload function—user exits
The Reload function invokes the user exit routine for each segment it reads from the HD Unload data set (DFSUINPT).
The user exit routine is invoked one more time at termination. The user exit routine allows you to examine, modify, delete, and control placement of segments before the Reload function places them in the database. The following considerations apply to invoking a user exit routine with the Reload function:
- If the data is compressed in the input file, the Reload function automatically expands the data before passing it to the exit. The Reload function compresses any modified data before placing it in the database.
- Parallel processing is disabled when you specify USEREXIT.
- When you are using the user exit for fixed-length segments with compression and the input to the user exit is compressed or expanded, you should never specify the length field in the work area of the user exit linkage section.
- If the segment data is to be used without change, set the return code to 00. When modifying a segment, copy the segment data from A(segment data) to A(work area), change the data at A(work area), and set the return code to 04.
- The user exit routine must be in a library available to the reorganization reload job step because the Reload function dynamically loads it. The work area for the user exit must be the same size as the largest segment within the DBD.
- If you are using a user exit to change a key, execute the user exit when the database is unloaded. Specify the NEWDBD and USEREXIT keywords in the Unload function job. Reload the database, and specify HDSORT(YES).
If you are using the user exit to copy storage beyond the end of the segment data, you can specify YES as the third subparameter on the USEREXIT option, as follows:
USEREXIT=(exitName,,YES)Specifying YES copies the segment to a 32-KB work area before invoking the user exit routine. A slight CPU usage overhead is associated with copying all segments to another area.
This section contains the following topics:
Related topic