Null Command. IBM z/OS Version 2 Release 3
Anuncio
Anuncio
number
number is the decimal integer that the program compares to MAXCC or
LASTCC. Access method services initializes both LASTCC and MAXCC to zero
upon entry. See “Condition Codes” on page 25 for the meaning of condition
codes.
THEN
THEN states that a single command or a group of commands (introduced by
DO) is to be run if the comparison is true. THEN can be followed by another
IF command.
ELSE
ELSE specifies that a single command or a group of commands (introduced by
DO) is to be run if the previous comparison is false. ELSE can be followed by another IF command.
Using Nested IF Commands: Example 1
In this example, nested IF commands are used to determine whether or not a
REPRO, DELETE, or PRINT command is run.
IF LASTCC > 4 -
THEN IF MAXCC < 12 -
THEN REPRO...
ELSE DELETE...
ELSE IF LASTCC = 4 -
THEN
ELSE PRINT...
If LASTCC is greater than 4, MAXCC is tested. If MAXCC is less than 12, the
REPRO command is run; if the value of MAXCC is 12 or greater, the DELETE command is run instead. If the value of LASTCC is 4 or less, LASTCC is tested for being exactly 4; if it is, the program takes no action. If LASTCC is less than 4, the program runs the PRINT command.
Using Nested IF Commands: Example 2
In this example, nested IF commands are used to determine whether the program should run a REPRO command or a PRINT command.
IF LASTCC > 4 -
THEN IF MAXCC < 12 -
THEN REPRO ...
ELSE
ELSE IF LASTCC = 4 -
THEN PRINT ...
If LASTCC is greater than 4, and MAXCC is 12 or greater, no functional commands are run. Use the null ELSE command to indicate that the next ELSE is to correspond to the first THEN.
Null Command
The null command is a THEN or ELSE command that is not followed by a command continuation character. If THEN or ELSE is not followed by either a continuation character or by a command in the same record, the THEN or ELSE results in no action. The null command supports an ELSE command that balances an IF-THEN-ELSE command sequence, and allows null THEN commands.
If you want to indicate a null ELSE command, say:
ELSE
Chapter 2. Modal Commands
19
Descargar
Anuncio