Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Skipping selected steps of a proc

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions
Author Message
Kamlesh Kamal

New User


Joined: 16 May 2008
Posts: 3
Location: Kolkata,India

PostPosted: Fri May 16, 2008 6:32 pm    Post subject: Skipping selected steps of a proc
Reply with quote

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
View user's profile Send private message
References
PostPosted: Fri May 16, 2008 6:32 pm    Post subject: Re: Skipping selected steps of a proc Reply with quote

Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 114
Location: Bangalore

PostPosted: Fri May 16, 2008 8:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3081
Location: Charlotte,NC USA

PostPosted: Fri May 16, 2008 9:02 pm    Post subject: Reply to: Skipping selected steps of a proc
Reply with quote

The OP stated that using COND is "not to be done.".
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 2910
Location: Brussels once more ...

PostPosted: Sat May 17, 2008 12:46 pm    Post subject: Mmmmmmmmmmmm, dubious
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2565
Location: italy

PostPosted: Sat May 17, 2008 12:58 pm    Post subject: Reply to: Skipping selected steps of a proc
Reply with quote

/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
View user's profile Send private message
Kamlesh Kamal

New User


Joined: 16 May 2008
Posts: 3
Location: Kolkata,India

PostPosted: Sat May 17, 2008 8:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 114
Location: Bangalore

PostPosted: Sat May 17, 2008 8:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 7471
Location: 221 B Baker St

PostPosted: Sat May 17, 2008 11:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions All times are GMT + 6 Hours
Page 1 of 1