Function codes and return codes for UNLOAD PLUS user exits


UNLOAD PLUS communicates with your exit by passing a function code and parameters to the exit and receiving a return code from the exit.

For a C exit, the value of the function is the first element in the structure ADUEXITP (see  C exit parameter structure). For a COBOL exit, the value of the function code is contained in the first field of the EXITPARMS record (see  Exit parameter record). For an Assembler exit, register 0 contains a function code value, and register 1 contains the address of an unload exit parameter block, ADUEXITP (see  Exit parameter block DSECT).

On return from the exit, the return code instructs UNLOAD PLUS what to do. For an Assembler exit, the return code is the contents of register 15. For a COBOL exit, the return code is set in the RETURN-CODE variable. For C and LE C exits, the RETURN code is the value returned by the return function. The return code varies depending on the function code.

The following table describes the function codes and the appropriate return codes:

Function code

Return code

0

(Process a record)

0–Write this record.

4–Discard this record.

Any other code terminates the utility.

1

(Table initialization call)

0–Process this table with the exit.

4–Do not use the exit for this table.

Any other code terminates the utility.

2

(Termination call)

Return codes are ignored.

COBOL-pseudo-SQLDA-record illustrates the COBOL II and LE COBOL EXITPARM record relationships, and Pseudo-SQLDA-DSECT illustrates the Assembler parameter control block relationships.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

UNLOAD PLUS for DB2 13.1