%ReturnCode meta-SQL element

Description

Use the %ReturnCode meta-variable to evaluate or specify the return code of the last Application Engine program step performed. If the operation fails, breaks, or generates an error, %ReturnCode is set to one of the following types of return codes:

  • Database (SQL) call errors.

  • PeopleCode function errors.

  • GEN_ERROR, when produced by general runtime exceptions.

  • AE_ABORT, when produced by application or runtime logic, including some memory-related errors.

If the application process is not terminated, %ReturnCode is reset to the default value of 0 for each subsequent successful operation.