|
|
| Author |
Message |
Kamlesh Kamal
New User
Joined: 16 May 2008 Posts: 3 Location: Kolkata,India
|
|
|
|
I have a call to proc in my jcl.
step01 exec proc1
Now in the proc1 I have step01,step02,step03,step04,step05,out of which I want to execute only the steps 02 and 05 how can I do it with the condition that proc is not to be touched.I can understand by giving COND parameters in the proc steps I can skip the steps.But that is not to be done |
|
| Back to top |
|
 |
References
|
Posted: Fri May 16, 2008 6:32 pm Post subject: Re: Skipping selected steps of a proc |
 |
|
|
 |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 108 Location: Bangalore
|
|
|
|
| Quote: |
| Now in the proc1 I have step01,step02,step03,step04,step05,out of which I want to execute only the steps 02 and 05 |
In the jobstep that calls your proc,put the exec overrides
| Code: |
//step01 exec proc1,
// COND.step01=(0,LE),
// COND.step03=(0,LE),
// COND.step04=(0,LE) |
This is will cause step01, step03 and step04 of the proc to not get executed.
We have not touched the proc.
-Ajay |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3009 Location: Charlotte,NC USA
|
|
|
|
| The OP stated that using COND is "not to be done.". |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2524 Location: Brussels once more ...
|
|
|
|
| superk wrote: |
| The OP stated that using COND is "not to be done.". |
Mmmmmmmmmmmmmmm,depends on your interpretation of
| Quote: |
| I can understand by giving COND parameters in the proc steps I can skip the steps. But that is not to be done |
Where
giving COND parameters in the proc steps
implies, to me, changing the PROC, rather than the method of changing only the EXEC statement.
Allways good old IEBEDIT as plan B |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2417 Location: italy
|
|
|
|
/rant on
I still do not understand why interviewers keep asking this kind of questions
even if restarting jobs, selectively executing different steps of a jcl stream,
or playing tricks with proc's condition codes can be done...
from a standards and good practices point of view it' s the worst thing that
can be done if an organization wants it' s job streams to run smoothly
without too much human intervention and human induced errors
the jobs should not be modified/hacked at any any time in any way ,
the jobs should be kept as short as possible,
every job should have it' s corresponding abnormal condition handling job/procedure properly documented and provided
every job after having fixed the causes of errors should be resubmitted as is (no hacking/tweaking)
so that the operations team would simply submit things, without having to modify them
such an approach makes possible to have a completely automated
job submission/execution/checking/abnormal condition handling
/rant off |
|
| Back to top |
|
 |
Kamlesh Kamal
New User
Joined: 16 May 2008 Posts: 3 Location: Kolkata,India
|
|
|
|
Thanks Ajay...but r u sure that's the correct syntax..
| Ajay Baghel wrote: |
| Quote: |
| Now in the proc1 I have step01,step02,step03,step04,step05,out of which I want to execute only the steps 02 and 05 |
In the jobstep that calls your proc,put the exec overrides
| Code: |
//step01 exec proc1,
// COND.step01=(0,LE),
// COND.step03=(0,LE),
// COND.step04=(0,LE) |
This is will cause step01, step03 and step04 of the proc to not get executed.
We have not touched the proc.
-Ajay |
|
|
| Back to top |
|
 |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 108 Location: Bangalore
|
|
|
|
Kamal,
What is your doubt? If you are getting any errors with code above let us know. Putting COND=(0,LE) will cause the above condition to be to be always true, so, mentioned steps will never execute.
Yes, the syntax to override the exec stmt COND parameter within a proc is correctly given here.
-Ajay |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6882 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| Thanks Ajay...but r u sure that's the correct syntax.. |
Rather than ask, you might look in the JCL manual available via the "IBM Manuals" link at the top of the page.
If you found something in the manual that you did not understand, you couuld post what you found and your question about it here.
It you are currently working on a mainframe, it would be trivial to test and then (as Ajay mentioned), post any problems encountered here. |
|
| Back to top |
|
 |
|
|
|