(Contents)(Previous)(Next)

Setting the RETURNCODE

The return code for LOAD can also be set, e.g., according to $RC, during command file execution. The statement

RETURNCODE <integer>

serves this purpose.

The return code can only assume values between 0 and 127.

If the command file does not contain any RETURNCODE statement, then LOAD is terminated with one of the following default codes:

7 <=> SQL error

8 <=> LOAD error

9 <=> Lines rejected by DATALOAD or DATAUPDATE

10 <=> File error in a statement

The value of the return code with which a LOAD session terminates depends on the error encountered last. Subsequent statements that execute successfully do not reset this code to 0.

The actual error message or the number of rejected rows, which can be checked as $RC, appears in the log file of LOAD.


(Contents)(Previous)(Next)