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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IF-THEN-ELSE Command SequenceThe syntax of the IF-THEN-ELSE command sequence, which controls commandexecution, is:IF {LASTCC|MAXCC} operator numberTHEN[ command|DOcommand setEND][ELSE[ command|DOcommand setEND]]where:IFStates that one or more functional commands should run based on a test of acondition code. A SET command sets the condition code, or the condition codereflects the completion status of previous functional commands.Nested IF commandsWhen an IF command appears within a THEN or ELSE clause, it is called anested IF command. To see an example of a nested IF command, see UsingNested IF Commands, Example 1,on page 22.vvvvThe maximum level of nesting allowed is 10, starting with the first IF.Within a nest of IF commands:The innermost ELSE clause is associated with the innermost THEN clause,The next innermost ELSE clause with the next innermost THEN clause, andso on. (Each ELSE is matched with the nearest preceding unmatched THEN.)v If there is an IF command that does not require an ELSE clause, follow theTHEN clause with a null ELSE clause (ELSE) unless the nesting structuredoes not require one.LASTCCLASTCC specifies that the condition code resulting from the precedingfunction command be compared, as indicated by the operator, to the numberthat follows the operator to determine if the THEN action is to be done.MAXCCMAXCC specifies that the maximum condition code value established by anyprevious function command or by a SET command be compared, as indicatedby the operator, to the number following the operator to determine if the THENaction is to be done.operatoroperator requires a comparison to be made between the variable and number.There are six possible comparisons:Equal to, written as = or EQNot equal to, written as ¬= or NEGreater than, written as > or GTLess than, written as < or LTGreater than or equal to, written as >= or GELess than or equal to, written as

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

Saved successfully!

Ooh no, something went wrong!