09.07.2015 Views

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Null Commandnumbernumber is the decimal integer that the program compares to MAXCC orLASTCC. <strong>Access</strong> method services initializes both LASTCC and MAXCC to zeroupon entry. See “Condition Codes” on page 25 <strong>for</strong> the meaning of conditioncodes.THENTHEN states that a single command or a group of commands (introduced byDO) is to be run if the comparison is true. THEN can be followed by anotherIF command.ELSEELSE specifies that a single command or a group of commands (introduced byDO) is to be run if the previous comparison is false. ELSE can be followed byanother IF command.Using Nested IF Commands: Example 1In this example, nested IF commands are used to determine whether or not aREPRO, DELETE, or PRINT command is run.IF LASTCC > 4 -THEN IF MAXCC < 12 -THEN REPRO...ELSE DELETE...ELSE IF LASTCC = 4 -THENELSE PRINT...If LASTCC is greater than 4, MAXCC is tested. If MAXCC is less than 12, theREPRO command is run; if the value of MAXCC is 12 or greater, the DELETEcommand is run instead. If the value of LASTCC is 4 or less, LASTCC is tested <strong>for</strong>being exactly 4; if it is, the program takes no action. If LASTCC is less than 4, theprogram runs the PRINT command.Using Nested IF Commands: Example 2In this example, nested IF commands are used to determine whether the programshould run a REPRO command or a PRINT command.IF LASTCC > 4 -THEN IF MAXCC < 12 -THEN REPRO ...ELSEELSE IF LASTCC = 4 -THEN PRINT ...If LASTCC is greater than 4, and MAXCC is 12 or greater, no functional commandsare run. Use the null ELSE command to indicate that the next ELSE is tocorrespond to the first THEN.The null command is a THEN or ELSE command that is not followed by acommand continuation character. If THEN or ELSE is not followed by either acontinuation character or by a command in the same record, the THEN or ELSEresults in no action. The null command supports an ELSE command that balancesan IF-THEN-ELSE command sequence, and allows null THEN commands.If you want to indicate a null ELSE command, say:ELSEChapter 2. Modal Commands 19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!