Interview questions on JCL.
-
- New Member
- Posts: 8
- Joined: Sun Aug 17, 2014 8:36 am
Interview questions on JCL.
Hi,
Following questions I'dlike to verify:
1. In a JCL, if COND=(0,LE) is specified on the first step of JCL, what will happen?
My answer was, "For first step if COND is specified, it will always be false and first step executes unless there is a restart istruction" .
2. In a JCL we have 6 steps: S1, S2, S3, S4, S5 and S6 in the order mentioned. How or can we change the execution order of the steps, like excute S4 after S5?
My answer was to run two seperate jobs.
Can you please help if the answers are correct? And if they are not correct, what is the right answer.
Following questions I'dlike to verify:
1. In a JCL, if COND=(0,LE) is specified on the first step of JCL, what will happen?
My answer was, "For first step if COND is specified, it will always be false and first step executes unless there is a restart istruction" .
2. In a JCL we have 6 steps: S1, S2, S3, S4, S5 and S6 in the order mentioned. How or can we change the execution order of the steps, like excute S4 after S5?
My answer was to run two seperate jobs.
Can you please help if the answers are correct? And if they are not correct, what is the right answer.
Re: Interview questions on JCL.
For Q1:
For Q2:
Yes, you cannot hop backwards and forwards in a job so you have to edit the JCL - copy it and cut out the unwanted stuff and re-arrange the steps and do an initial run with TYPRUN=SCAN or an initial step with PGM=NOTFOUND. Note that you can only reverse the steps if they are independent of each other i.e step 5 does not require data from step 4.
Why not read up in the JCL manual (and post the result of your research)?what is the right answer.
For Q2:
Yes, you cannot hop backwards and forwards in a job so you have to edit the JCL - copy it and cut out the unwanted stuff and re-arrange the steps and do an initial run with TYPRUN=SCAN or an initial step with PGM=NOTFOUND. Note that you can only reverse the steps if they are independent of each other i.e step 5 does not require data from step 4.
Regards
Nic
Nic
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Interview questions on JCL.
You answer is one of the possible answers. You can also use IEBEDIT or open the job in VIEW mode, do your edits and SUBmit it.Vivek Soni wrote:2. In a JCL we have 6 steps: S1, S2, S3, S4, S5 and S6 in the order mentioned. How or can we change the execution order of the steps, like excute S4 after S5?
My answer was to run two seperate jobs.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Interview questions on JCL.
By rule, COND skips a step when the condition specified in the COND becomes true. As this is the first step, COND will have no effect as there is no previous step to check the return code with and the step gets executed; tough it'll be checked for the syntax. So your answer is correct.Vivek Soni wrote:1. In a JCL, if COND=(0,LE) is specified on the first step of JCL, what will happen?
My answer was, "For first step if COND is specified, it will always be false and first step executes unless there is a restart istruction" .
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- New Member
- Posts: 8
- Joined: Sun Aug 17, 2014 8:36 am
Re: Interview questions on JCL.
Thanks, nicely explained.Anuj Dhawan wrote:By rule, COND skips a step when the condition specified in the COND becomes true. As this is the first step, COND will have no effect as there is no previous step to check the return code with and the step gets executed; tough it'll be checked for the syntax. So your answer is correct.Vivek Soni wrote:1. In a JCL, if COND=(0,LE) is specified on the first step of JCL, what will happen?
My answer was, "For first step if COND is specified, it will always be false and first step executes unless there is a restart istruction" .
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Interview questions on JCL.
You're welcome!
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Re: Interview questions on JCL.
By Any chance if interviewer asks how to bypass very first step in JCL using COND parameter , answer is use COND=ONLY
Thanks,
Chandan
Thanks,
Chandan
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Interview questions on JCL.
Don't make use of that. The behaviour is not documented, and could change at any future release of z/OS. That's a more important part of the answer than anything else. Yes, for winning bets. No for anything "useful".
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute