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 some steps in a Procedure

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

Guest





PostPosted: Tue Sep 28, 2004 4:02 pm    Post subject: Skipping some steps in a Procedure
Reply with quote

Hi, A catalogued procedure consists of five steps and I dont want to execute all the step , I want to skip 2nd and 4th steps in procedure and this procedure is called by JCL Program? This is possible by overriding or symbolic parameters?
Give me solution?
Thanks!!
Back to top
References
PostPosted: Tue Sep 28, 2004 4:02 pm    Post subject: Re: Skipping some steps in a Procedure Reply with quote

superk

Moderator Team Head


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

PostPosted: Tue Sep 28, 2004 6:34 pm    Post subject:
Reply with quote

I don't know exactly what your PROC looks like, but let's assume that the PROC MYPROC has five steps, PROC0001 through PROC0005. You say that you want to bypass processing for PROC steps 2 and 4. You can try this:

Code:

//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=ONLY,
// COND.PROC0004=ONLY
//*
Back to top
View user's profile Send private message
bhaskar

Guest





PostPosted: Wed Sep 29, 2004 12:51 pm    Post subject: JCL
Reply with quote

code which you have sent is not correct for my problem because, PROC0002 will be executed if there is abend in previous steps that is PROC0001, this is I dont want. As far as I know COND.PROC0002=ONLY means PROC0002 (step) will be executed if there is any abend in previous steps.
My question is:
1) I have a JCL program which is calling catalogued procedure.
2) catalogued procedure consists of five steps,as u assumed PROC0001,PROC0002,PROC0003,PROC0004,PROC0005.
3) When I am Running the jcl program I want to bypass steps PROC0002,PROC0004 and steps PROC0001,PROC0003,PROC0005 have to be executed.
I think my problem is clear.
I have a Idea for the above problem check this how far it is correct.
// COND.PROC0002=(0,GE)
// COND.PROC0004=(0,GE)
this code bypass the steps PROC0002 and PROC0004 if successful or any abends in previous steps.

This works like this.
1) step1 that is PROC0001 executed first, after execution it will return some code that might be zero or greater than zero.
2) this code is checked for condition(COND.PROC0002=(0,GE)) condition satisfies because returncode will be either zero or greater than zero.Therefore, second step(PROC0002) will be bypassed.
3)after that step3(PROC0003) will be executed,it will also return zero or greater than zero return code
4) this is compared again with the condition.
5) this process will continued until the last step that is PROC0005.

Check this is correct or not.
If you guys found better idea or solution plz send me a solution.
Back to top
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 867
Location: India

PostPosted: Thu Sep 30, 2004 8:26 pm    Post subject: Re
Reply with quote

Dear Bhaskar,

You can code like that:

//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=ONLY,
// COND.PROC0004=ONLY
//*

or


//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=(0,LE),
// COND.PROC0004=(0,LE)
//*
Back to top
View user's profile Send private message
abdul278

New User


Joined: 10 Jun 2003
Posts: 2

PostPosted: Wed Nov 17, 2004 4:00 pm    Post subject:
Reply with quote

Hi ,

Just to add a correction on this post.. Out of suggested two methods to bypass PROC steps, one with COND=ONLY will not work always.
Whenever there is an abend in any of previous steps, STEP with COND=ONLY will be executed. The requirement is to bypass the step execution irrespective of other steps.
In this case,
//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=ONLY,
// COND.PROC0004=ONLY
//*
If PROC0001 abends, PROC0002 and PROC0004 will get executed.

So the two options that we have is :

//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=(0,LE),
// COND.PROC0004=(0,LE)
//*

OR

//MYJOB JOB (...)
//*
//STEP0001 EXEC MYPROC,
// COND.PROC0002=(4095,GE),
// COND.PROC0004=(4095,GE)
//*


Let me know if you need any clarification on this.


Thanks
Abdul
Back to top
View user's profile Send private message
sunnyk

Active User


Joined: 20 Oct 2004
Posts: 59

PostPosted: Wed Dec 08, 2004 7:38 pm    Post subject:
Reply with quote

the answer given by abdul to bypass certain steps is absolutely correct.....bhaskar follow only this to get desired results
Back to top
View user's profile Send private message
badal
Currently Banned

New User


Joined: 05 Sep 2004
Posts: 21

PostPosted: Thu Feb 17, 2005 5:30 pm    Post subject: How to skip the 1step of catlog procedure
Reply with quote

hai,
if i need to skip the 1st of that catlog procedure then what to do?
mind it i don't have any access to procedure.where will i give the condition and what will be the condition?
thanks and regards
badal.
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