Registers and return codes
Db2 uses registers to store important information and return codes to help you determine the status of stand-alone log activity.
The request macro invoking these services can be used
by reentrant programs. The macro requires that register 13 point
to an 18-word save area at invocation. In addition, registers 0, 1,
14, and 15 are used as work and linkage registers. A return code is
passed back in register 15 at the completion of each request. When
the return code is nonzero, a reason code is placed in register 0.
Return codes identify a class of errors, while the reason code identifies
a specific error condition of that class. The stand-alone log return
codes are shown in the following table.
| Return code | Explanation |
|---|---|
| 0 | Successful completion. |
| 4 | Exception condition (for example, end of file), not an error. This return code is not applicable for OPEN and CLOSE requests. |
| 8 | Unsuccessful completion due to improper user protocol. |
| 12 | Unsuccessful completion. Error encountered during processing of a valid request. |
The stand-alone log services invoke executable macros that
can execute only in 24-bit addressing mode and reference data below
the 16-MB line. User-written applications should be link-edited as
AMODE(24), RMODE(24).