Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

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: 8593
Location: Back in jolly old England

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

Site Director


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us