Page 1 of 1

COND Parameter

PostPosted: Fri Dec 02, 2011 7:11 am
by Virtual
I've a basic question on COND parameter:

1) When we give cond parameter to bypass a step the syntax is like ex: cond=(4095,GT). My question is the value 4095 is compared to return code of what?

For Example we have five step S01,S02,S03,S04 and S05 and I want to bypass S05 and I'm giving this condition in S05. I can see in spool s01,s02,s03,s04 excuted with RC=0 but S05 not excuted because of the condition code but 1) when this comparison happened system compared 4095 to the return code of which step or for the entire job.2) The question is if the condition code is compared to the excution of the last step or the entire job then does the OS executed the step S05 in background and only didn't show it in spool because of this condition code?

Re: COND Parameter

PostPosted: Fri Dec 02, 2011 10:33 am
by dick scherrer
Hello and welcome to the forum,

Unless specified, the condition code to be tested is from the preceeding steps.

Suggest you spend some time in the JCL Language Reference Manual and learn more about cond=.

Re: COND Parameter

PostPosted: Fri Dec 02, 2011 1:49 pm
by NicC
A batch job IS background.

Re: COND Parameter

PostPosted: Tue Dec 06, 2011 2:25 pm
by Anuj Dhawan
Like your user-name, you're talking about a lot of virtual concepts. If you look at the syntax of COND, it is self explanatory:
 COND{.procstepname}=(code,operator{,stepname}{.procstepname})     
If you code the step name, it'll check the RC of that step, if no step-name is coded, it's about the previous step.

The question is if the condition code is compared to the excution of the last step or the entire job then does the OS executed the step S05 in background and only didn't show it in spool because of this condition code?
COND parameter determines if job steps are to be skipped or executed. JES3 processes all jobs as if each step will ultimately be executed, and therefore allocates devices for steps that may be eventually be skipped because of the COND parameter tests, so the devices must still be available when the job is submitted - but in this case too it does not do what you think it does.