Hi, all
suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if
cond is true or false (which of the other steps get executed)?
1) //s3 exec pgm=abc,cond=(0,le)
2) //s3 exec pgm=abc,cond=(0,le,step2)
3) In the jobcord RESTART=step3,cond=(0,le)
4) can i code COND=TRUE in jobcard, if yes what will happen?

Answers were Sorted based on User's Feedback



Hi, all suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if cond is true or false (which o..

Answer / muttaiah

Let me clear you on what is cond and rstart:

Cond: say if you have coded a cond stmt for a step. If the
condition is met then it won't execute. If the condition is
false it will execute the step.

Restart: is used to restart the job from a particular step.
When you are restarting a job from step3 say. Then whatever
the cond parm on step3 it will ignore and it restarts from
step3.

Let me answer the points now.

1) //s3 exec pgm=abc,cond=(0,le)
<ANS> If you code cond=(0,le) then this condition will
check for all previous steps for cond code since 0 is
always less than or equal to return code from previous
steps it will bypass the step S3
2) //s3 exec pgm=abc,cond=(0,le,step2)
<ANS> Similar as answer 1, But here it will look only for
Return code from step step2 only. Even in this case it will
skip the step s3
3) In the jobcord RESTART=step3,cond=(0,le)
<ANS> This will run only step step3 in the job. Coding a
cond in job is like applying it to all steps..
4) can i code COND=TRUE in jobcard, if yes what will happen?
<ANS> We can code only cond as EVEN or ONly or in the
format as (condition,RO,Stepname)
where condition = 0 - 4096
RO = LE, LT, GT, GE, EQ, NE
stepname - step name of the job to look for return code.

Hope this makes sense. Do let me know if you need any
clarifications.

Is This Answer Correct ?    8 Yes 0 No

Hi, all suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if cond is true or false (which o..

Answer / muttaiah

Nishant,

let me tell you the diff b/w these 2 cond stmts

cond=(RC,RO,stepname) & cond=(RC,RO)

Say when we code the stepname, It will look for the Return
code from that step alone.

Say if i ignore the stepname sub parm, Then what are all
the steps executed before this all those return codes are
checked with the condition specified.

1) //s3 exec pgm=abc,cond=(0,le)
In this question, since they didn't mention the number
of steps coded before s3, s3 looks for what are all the
steps run before this and compares all steps return code
with the cond if the condition is true it will bypass else
it will execute.
2) //s3 exec pgm=abc,cond=(0,le,step2)
Here they have mentioned clearly to the JCL, like look
for only return code from step2..

Hope this clears your doubt. If you have any other doubt.
Please mail me @ mainframe.technology@gmail.com

Is This Answer Correct ?    4 Yes 0 No

Hi, all suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if cond is true or false (which o..

Answer / nishant singhal

Muttaiah you have explained very well but i have one doubt
here...

for these below 2 questiones

1) //s3 exec pgm=abc,cond=(0,le)
2) //s3 exec pgm=abc,cond=(0,le,step2)

cond=(0,le) should check return code from previous step ie
s2 because if you are not giving any step in your cond
parameter then by default it will check return code from
its previous step and it will work like same as mentioned
in question 2.

Please correct me if i am wrong and let me know how it will
look for all the previous steps ie s1 & s2.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More JCL Interview Questions

i want to store 20 digits . how will u do it in cobol ?

0 Answers  


how many max steps can we use in a job? pls answer to my question

3 Answers   TCS,


in my jcl have 20 steps step1,step2,.... step20.and i have to execute step1,step2,..and skip the step3 and remaing step4,step5 are execute? i want skip step3 only? what code u can write?

3 Answers   Patni,


i have job card like this //job ***** //step1 exec pgm=iebgener //sysut1 dd dsn=main.sss,disp=shr // dd dsn=main1.sss,disp=shr // dd dsn=main2.sss,disp=shr //sysut2 dd dsn=out1.mmm ,disp=(new,catlg,delete) dcb=( ) // sysin dd * like this what i have to do to skip dsn=main1.sss please giveme answer asap

2 Answers   IBM, TetraSoft,


how do you code a null statement?

0 Answers   IBM,






What are the rules employed while naming the steps in a job?

0 Answers  


What is the function of the dd avgrec keyword in sms datasets?

0 Answers  


How to run cobol program using jcl?

0 Answers  


hi,i have joined in mainframe course recently. ihave a doubt ragarding restart parameter.what is d use of it. and what is d syntax for it. any one give me d answer pls.

3 Answers  


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The DISP in the JCL is SHR and the program opens the file in EXTEND mode. What happens ?

3 Answers  


What is a GDG

4 Answers   IBM,


HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?

1 Answers   IBM,


Categories