PLIRETC Subroutine

Purpose

Sets the Open PL/I return code.

Syntax

CALL PLIRETC(x);

Parameters

x is an arithmetic value.

Description

The PLIRETC built-in subroutine sets a return code that can be examined using the PLIRETV built-in function. When the program ends, the last value used in a call to PLIRETC is returned to the system as the program's exit status.

The argument to PLIRETC is converted to a Fixed Binary (31) value, but the actual precision of the value that is stored and returned to the system may be lower, depending on the implementation. For details on precisions, see your Open PL/I User's Guide.

Examples

ON ERROR CALL PLIRETC (1);

Restrictions

None.