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

How do you skip a particular proc in a proc?


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

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Thu Jul 23, 2009 1:06 pm
Reply with quote

Hello,

I have a scenario wherein from a Job am executing a single proc.

In that proc, am executing mulitple steps.

For example

SAMPRC PROC

STEP1 EXEC PGM=IKJEFT01
....
....
STEP2 EXEC PROC1
....
....

Note: I WANT TO EXECUTE THIS PROC1 BASED ON THE RETURN CODE OF STEP1 (of SAMPRC), IF RETURN CODE IS NOT SATISFIED, THEN I WILL BYPASS THE PROC.

I tried with COND code parameter, but it searches for STEP1 in the called proc instead of the parent proc.

let me know your comments.

Thanks
Swami
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jul 23, 2009 1:09 pm
Reply with quote

Please post what you have tried, and give a detailed description of

a) What happened
b) What conditions you want to use to bypass PROC1
Back to top
View user's profile Send private message
Swami-gs

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Thu Jul 23, 2009 2:18 pm
Reply with quote

Hello,

I just want to know whether a condition code check can be done on a step which executes a proc.

See my code below.

//SAMPRC PROC
//STEP01 EXEC PGM=SYNCSORT
.......
.......
//*
//STEP02 EXEC RPRB,COND.STEP01=(0,NE)
.......
.......

Here, STEP01 executes a sort step. I want to execute STEP02 only if the return code of STEP01 is ZERO.
I thought I can can handle this with a COND parameter. But in my case its executing a proc. So I am facing a JCL error, because it tries to search STEP01 in RPRB proc.

Thanks
Swami
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jul 23, 2009 2:45 pm
Reply with quote

Quote:
So I am facing a JCL error, because it tries to search STEP01 in RPRB proc.

Yes, it will. That is because the syntax you are using is saying that is precisesly the condition overriding in RPRB. If it isn't found ..........

Please use the JCL reference manual - easily accessible from the "IBM Manuals" button at the top of each page, and read the sections on COND and IF/THEN/ELSE processing to clarify your situation.
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 SKIP LOCKED DATA in UPDATE statement DB2 9
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts proc step return code to override in ... JCL & VSAM 3
Search our Forums:

Back to Top