Interface to user record-formatting and optional user exit routines

These routines are called, in accordance with standard Assembler and COBOL conventions.

Begin product-sensitive programming interface information.

On entry, the routines should save the registers; on return, they should restore all registers except Register 15. On entering to the routines, the following registers contain the information provided in the following table.

Table 1. Register contents at entry to routines
Register Contents
1 Address of call parameter list
13 Address of caller's save area
14 Return address to database unload utility
15 Entry point address into user routine

Upon returning to the common logic, Register 15 must contain a binary return code 0 - 4. The codes are explained in the following table.

Table 2. Exit routine return codes
Code Description
0 Processes this database segment.
1 Stops processing of this database segment and does not write it to SYSUT2. Retrieves the next data-sensitive segment.
2 Stops processing of this database segment and does not write it to SYSUT2. Retrieves the next database root segment. (All remaining segments of the current database record are skipped.)
3 Stops processing of this database segment, and does not write it to SYSUT2. Continues database retrieval with the root whose key is greater than or equal to the key value specified by the user exit routine in call parameter 9 (the key of the next root).

If a Data Conversion exit routine is used for the database, the key of the next root must be specified in the application form.

4 Stops the processing of this database segment, and does not write it to SYSUT2. Does not retrieve any further database segments, and stops processing.

If a routine sets a return code 1, the dependents of the current database segment are not skipped by the common logic. Skipping of these dependent segments is the responsibility of the routine.

End product-sensitive programming interface information.