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

In sms datasets, what is the function of the dd mgmtclas keyword?

0 Answers  


What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?

2 Answers  


What is RESTART? How is it invoked?

8 Answers   HSBC,


How to pass the temp dataset form one JOB step to another?

6 Answers   IBM,


How to empty the records in jcl

1 Answers  






How gdg are concatenated?

0 Answers  


which utility is used to sort a file in jcl?

0 Answers   IBM,


What is timing concept in mainframe?

0 Answers  


Can I share my data with other jobs? How?

0 Answers  


Name the system library from which modules are retrieved at execution

2 Answers  


Can you code instream data in a PROC ?

10 Answers  


what is the Difference between SYSIN and PARM ?

5 Answers   IBM,


Categories