IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to excute and bypass the step in two jobs


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sonasheetal

New User


Joined: 08 Jun 2005
Posts: 27

PostPosted: Wed Jun 08, 2005 4:28 pm
Reply with quote

I have a 2 jobs job A and job B.both are calling
same proc.but in job A i want to execute all the
steps but job B i want to by pass the 3rd step.how?
Back to top
View user's profile Send private message
sonasheetal

New User


Joined: 08 Jun 2005
Posts: 27

PostPosted: Wed Jun 08, 2005 4:43 pm
Reply with quote

You can achieve this by using conditional codes of previous step.


Job A : step10 : explicitly set some return code in this step say rc = 4/8/12..
.........
.........
step50 proc a
procstep20...Execute only if rc(step10) is 4....
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Wed Jun 08, 2005 6:36 pm
Reply with quote

in the job B give COND.STEP03=(0,LE).

THIS WILL BYPASS ONLY STEP03 IN JOB B
Back to top
View user's profile Send private message
shannu

New User


Joined: 01 Jun 2005
Posts: 17
Location: bangalore

PostPosted: Thu Jun 09, 2005 9:42 am
Reply with quote

Hi,

I think after this to execute 4th step you need to specify..

In the job b cond.step04=even.

This will execute step 4 even if the previous step normally or abnormally terminates.


Thanks,
Shannu.
Back to top
View user's profile Send private message
sree_2503

New User


Joined: 22 May 2005
Posts: 12
Location: Chennai,India

PostPosted: Thu Jun 09, 2005 11:48 am
Reply with quote

Hi Shannu,

I dont think to execute 4th step after u bypass the 3rd step, u need to specify the cond=even param.
Back to top
View user's profile Send private message
Sangram

New User


Joined: 08 Jun 2005
Posts: 7

PostPosted: Thu Jun 09, 2005 12:51 pm
Reply with quote

Sree is right. No need for cond=even for the fourth step. It will be executed once step 3 is skipped.
Back to top
View user's profile Send private message
sonasheetal

New User


Joined: 08 Jun 2005
Posts: 27

PostPosted: Thu Jun 09, 2005 2:31 pm
Reply with quote

Thanks lot for all your quick reply.

Bye
Sonasheetal.
Back to top
View user's profile Send private message
lostprophet

New User


Joined: 14 Jan 2007
Posts: 2
Location: india

PostPosted: Sat Feb 03, 2007 1:47 pm
Reply with quote

I have 15 job steps, i want to execute only step 11 and step 12. Now my
query is i can execute steps 11 and 12 by using step Restart but how can
i stop executing beyond step 12, i.e i dont want execution beyond step 12.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Feb 04, 2007 12:11 am
Reply with quote

Hello,

To keep the steps that follow step12 from executing, use a COND override for each step that is (0,LE).

This will prevent each overridden step from executing. Zero is less than or equal to every possible condition code, so specifying (0,LE) will ensure that the step does not execute.

Sonasheetal,

From your original thread -

To do what you want, you can use this technique also. Run job A as usual. When you run job B, override the the step(s) you want to bypass with the (0,LE) condition code test.
Back to top
View user's profile Send private message
lostprophet

New User


Joined: 14 Jan 2007
Posts: 2
Location: india

PostPosted: Sun Feb 04, 2007 10:19 am
Reply with quote

dick scherrer wrote:
Hello,

To keep the steps that follow step12 from executing, use a COND override for each step that is (0,LE).

This will prevent each overridden step from executing. Zero is less than or equal to every possible condition code, so specifying (0,LE) will ensure that the step does not execute.



Thank you dick scherrer for ur quick reply
is there any other method to achieve this apart from using COND(0,LE)


Lostprophet


Sonasheetal,

From your original thread -

To do what you want, you can use this technique also. Run job A as usual. When you run job B, override the the step(s) you want to bypass with the (0,LE) condition code test.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Feb 04, 2007 11:45 am
Reply with quote

Hi LP,

Other than the condition code, what would you prefer?

Checking condition code(s) is the normal method used to control whether a step is executed or bypassed.
Back to top
View user's profile Send private message
a69356

New User


Joined: 01 Dec 2006
Posts: 21
Location: Gurgaon

PostPosted: Thu Mar 15, 2007 2:50 pm
Reply with quote

I think Cond parameter is (0,GT) instead of (0,LE) .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 15, 2007 3:40 pm
Reply with quote

They both work perfectly. Same result different method.
Back to top
View user's profile Send private message
jonnavarapu786

New User


Joined: 28 Mar 2007
Posts: 2
Location: noida

PostPosted: Fri Mar 30, 2007 3:45 pm
Reply with quote

Answer for the below ? was....

Just insert a null card after the 12th step. i.e just give a //.
it will solve ur problem, I think no need to think that much offffffff....

I have 15 job steps, i want to execute only step 11 and step 12. Now my query is i can execute steps 11 and 12 by using step Restart but how can i stop executing beyond step 12, i.e i dont want execution beyond step 12.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 30, 2007 11:50 pm
Reply with quote

Hello,

Use condition code test suggested above.

When you specify the restart, you can also override the condition code testing for the steps you do not want to run.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top