IF / ENDIF purpose



Whilst IF / ENDIF, with or without an ELSE statement, facilitate decision making it would be wrong to assume that this includes a branch capability.

The purpose of the decision making is to allow alternative paths through a job depending upon information relating to one or more previous steps.

Although checking condition codes, ABEND codes and whether a step actually ran or not, are valid tests, any JCL syntax errors will always cause the job to fail, as the majority of JCL errors are detected prior to execution.

The next page provides additional information including reference to the COND= operand.

Copyright © Legac-e Education 2002-