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

How to Override DD based on RC of previous step


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

New User


Joined: 01 Sep 2006
Posts: 39
Location: Chennai, India

PostPosted: Fri May 08, 2009 11:36 am
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
expat

Global Moderator


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

PostPosted: Fri May 08, 2009 11:39 am
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
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: 8797
Location: Welsh Wales

PostPosted: Wed Jul 01, 2009 2:01 pm
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

Moderator Emeritus


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

PostPosted: Wed Jul 01, 2009 7:39 pm
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
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts To search DB2 table based on Conditio... DB2 1
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
Search our Forums:

Back to Top