-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCONDITIO.HELPREXX
29 lines (24 loc) · 1.39 KB
/
CONDITIO.HELPREXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CONDITION function
+-----------------------------------------------------------------------------+
| CONDITION([option]) |
+-----------------------------------------------------------------------------+
Returns the condition information associated with the current trapped
condition, as specifed by the option. Only the first character of the option
is examined, and is treated in uppper case. If the option is 'CONDITION',
the function returns the name of the condition. If the option is
'DESCRIPTION', the function returns the description of the condition, or a null
string if none is available. If the option is 'INSTRUCTION', or omitted, the
function returns the keyword of the REXX instruction that triggered the
condition, either 'CALL' or 'SIGNAL'. If the option is 'STATE', the function
returns the current state of the trapped condition, either 'ON' (enabled),
'OFF' (disabled), or 'DELAY' (new occurannces of the condition will be delayed
or completely ignored).
NOTE: The condition information is saved and restored during CALL proccessing
thus once a subroutine invoked via CALL ON returns, the previous
condition (if any) will again be current.
Example:
CONDITION() == 'CALL' /* perhaps */
CONDITION('c') == 'FAILURE'
CONDITION('I') == 'CALL'
CONDITION('D') == 'FailureTest'
CONDITION('s') == 'OFF'