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
 
How to Override DD based on RC of previous step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
vinothsubramanian

New User


Joined: 01 Sep 2006
Posts: 35

PostPosted: Fri May 08, 2009 11:36 am    Post subject: How to Override DD based on RC of previous step
Reply with quote

HI,

I have to override a DD statement based on the RC of previous step STEP1. If RC of Step 1 is 0 then the (0) version of the GDG needs to be used and if RC of step 1 is 1 then the (+1) version of the GDG needs to be used.

Regards,
Ram.
Back to top
View user's profile Send private message
References
expat

Global Moderator


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

PostPosted: Fri May 08, 2009 11:39 am    Post subject:
Reply with quote

Look at two identical steps controlled by IF/THEn/ELSE one using the 0 and one the +1.

IBM Manuals at the top of the page - JCL reference, and there you go.
Back to top
View user's profile Send private message
sudhakarreddy.ibm
Warnings : 1

New User


Joined: 20 Apr 2009
Posts: 15
Location: chennai

PostPosted: Wed Jul 01, 2009 1:49 pm    Post subject:
Reply with quote

HI,

Assume PROC1 having many steps among them STEP1 is one step name .STEP1 having many DD statements.If we want to override DD statement of STEP1. we follow below mention procedure.............

//JOBCARD
//STEP1 EXEC PGM=PRG1
//DD1 DD DSN = A.B.C
//STEP2 EXEC PGM =PROC1, COND=(0,<>,STEP1)
//PROC1.STEP1.DD1 DD DSN='GDG(0)
//STEP3 DD PGM=PROC1,COND=(1,EQ,STEP1)
// PROC1.STEP1.DD1 DD DSN='GDG(1)'
//

Please correct me if i am wrong...............


sudha..............
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jul 01, 2009 2:01 pm    Post subject:
Reply with quote

You are WRONG
Have you actually tested that code ?

PGM= PROC1
3 level overrides
<> in condition checking
'GDG(1)' (1) what - would that be a + or perhaps a -

Do you have access to a JCL manual - if so - start reading it NOW
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


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

PostPosted: Wed Jul 01, 2009 7:39 pm    Post subject:
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals".

Among them are the JCL documentation.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1