Previous Topic: Common Keywords of ADDRESS SOFNext Topic: Sample Rules and Programs


Common REXX Variables

Several common variables are returned by multiple functions. Variables unique to each function are described in their appropriate sections.

OPSOFRTN

Contains the return code, and can be examined to determine the results of command execution. In some cases, the reason code may contain additional information. The value is equivalent to the REXX return code RC.

OPSOFRSN

Contains reason code information triggered by some conditions in addition to the return code. The return code will indicate when the reason code may be examined.

stem.0

Contains the count of all following REXX variables names stem.1…stem.x. The stem.0 variable is created for every function. If no variables are created, stem.0 will contain 0.

Example: OPSOF.0 = 4

stemEMSG

Returns a 72-byte text string after each function call. When the result is successful, the text string contains all blanks; otherwise, it will contain the error description.

Note: In spite of the leading stem, this is a simple variable name without multiple qualifiers.

Example: OPSOFEMSG