z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


CONDITION

z/OS TSO/E REXX Reference
SA32-0972-00

Read syntax diagramSkip visual syntax diagram
>>-CONDITION(--+--------+--)-----------------------------------><
               '-option-'      

returns the condition information associated with the current trapped condition. (See Conditions and condition traps for a description of condition traps.) You can request the following pieces of information:
  • The name of the current trapped condition
  • Any descriptive string associated with that condition
  • The instruction processed as a result of the condition trap (CALL or SIGNAL)
  • The status of the trapped condition.
To select the information to return, use the following options. (Only the capitalized and highlighted letter is needed; all characters following it are ignored.)
Condition name
returns the name of the current trapped condition.
Description
returns any descriptive string associated with the current trapped condition. See Descriptive strings for the list of possible strings. If no description is available, returns a null string.
Instruction
returns either CALL or SIGNAL, the keyword for the instruction processed when the current condition was trapped. This is the default if you omit option.
Status
returns the status of the current trapped condition. This can change during processing, and is either:
  • ON - the condition is enabled
  • OFF - the condition is disabled
  • DELAY - any new occurrence of the condition is delayed or ignored.

If no condition has been trapped, then the CONDITION function returns a null string in all four cases.

Here are some examples:
CONDITION()            ->    'CALL'        /* perhaps */
CONDITION('C')         ->    'FAILURE'
CONDITION('I')         ->    'CALL'
CONDITION('D')         ->    'FailureTest'
CONDITION('S')         ->    'OFF'        /* perhaps */

The CONDITION function returns condition information that is saved and restored across subroutine calls (including those a CALL ON condition trap causes). Therefore, after a subroutine called with CALL ON trapname has returned, the current trapped condition reverts to the condition that was current before the CALL took place (which may be none). CONDITION returns the values it returned before the condition was trapped.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014