Hi everyone!
(silly (?) question)
I am trying to prove some things I had as true.
I mean, in a job, the greatest COND CODE produced is the current one we have to compare. Please check the job I have ran checking COND CODE:
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
CHECK007 executes because the system evaluates 11 against all previous step condition codes and finds that none of them are greater than 11. Hence the step is NOT bypassed and executes.
CHECK008 does not execute because the system evaluates 7 against all previous step condition codes and finds that 7 is greater than at least one of them. Hence the step will be bypassed.
The JCL Reference manual (V2R3) on page 352 says
Quote:
If the return code issued by any of those previous steps causes the test condition to be satisfied, the system evaluates the COND parameter as true and bypasses the job step.
That might help those who find this to be confusing and has to deal with this format versus 'IF'.
Since we're on the subject, one thing I find that trips people up with COND= is that EVEN isn't always something you want to rely on, especially for non production applications you want to work without someone needing to check on things. Reason being is that jobs can fail in ways that immediate halt the job.
For this type of application, I submit some kind of checker job that will let me know if the job failed.
I still code EVEN, but I also run a checker job for non prod jobs or test jobs when I can't use a proper system that alerts someone failures.