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

how to use refer to other step


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

New User


Joined: 02 Jun 2010
Posts: 4
Location: hyderabad

PostPosted: Sat Jun 26, 2010 2:24 am
Reply with quote

hi,
Code:
***************************** Top of Data ***********
//OZA125EX JOB NOTIFY=&SYSUID                       
//JOBLIB   DD  DSN=OZA079.CATS1.LOADLIB,DISP=SHR     
//STEP1    EXEC PGM=POLCY                           
//DISK1    DD  DSN=OZA079.CATS1.SALES.SALE1(+1),     
//             DISP=(NEW,CATALOG,DELETE),             
//             DCB=(LRECL=80,BLKSIZE=800,RECFM=FB), 
//             SPACE=(TRK,(3,10),RLSE)               
//DISK2    DD  DSN=OZA079.CATS1.SALES.SALE1(+2),     
//             DISP=(NEW,CATALOG,DELETE),             
//             DCB=(LRECL=80,BLKSIZE=800,RECFM=FB), 
//             SPACE=(TRK,(3,10),RLSE)               
//STEP2    EXEC PGM=POLCY5                           
//DISK1    DD  DSN=OZA079.CATS1.SALES.SALE1(+1),     
//             DISP=SHR=>DISK2 OF STEP1//here i want to use the outfile of step1 ie disk2

plz................
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 26, 2010 3:06 am
Reply with quote

It is not clear what you are asking. If you want to use the data set created as DD name DISK2 of STEP1, use
Code:
//<ddname> DD DISP=???,DSN=OZA079.CATS1.SALES.SALE1(+2)
If you are wanting to do something else, please explain what you are trying to do in more detail.

And please learn how to click the Code button to put code it -- sometimes spaces are critical and the Code button preserves them whereas your paste does not. I changed your post to use Code.
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: Sat Jun 26, 2010 6:24 am
Reply with quote

Hello and welcome to the forum,

Suggest you start over and explain the process.

What is the input to step1? Why are disk1 and disk2 being created? Why do you believe it is proper to create 2 new generations of the same gdg in one step? Why was a decent blksize not used? Why does the "input" to step2 have disp=shr - it can be shared with nothing. . . icon_confused.gif

If this is just out of curiosity, say so and we may be better able to answer whatever it is you are asking. . . As far as if this is a "real" process, it needs to be re-done.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Jun 27, 2010 9:04 pm
Reply with quote

Hi Sammi,

If you're looking to append the O/P of STEP2 to the O/P of STEP1, in STEP2 use the DSN of the STEP1 O/P as written and change your STEP2 O/P DISP to MOD.
Back to top
View user's profile Send private message
rahulgarg14

New User


Joined: 16 Apr 2007
Posts: 10
Location: gurgaon - india

PostPosted: Wed Jun 30, 2010 12:26 pm
Reply with quote

As per my understanding you want to use the DISK2 output of STEP1, as the DISK1 input of STEP2. For this use the following code,
//DISK1 DD DSN=STEP1.DISK2,DISP=SHR
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 Jun 30, 2010 7:27 pm
Reply with quote

Hello,

Your understanding is incorrect. . .

Suggest you look in the JCL manual (available via the "IBM Manuals" link at the top of the page and run an experiment on your system using the same jcl as was posted here (changing the pgm= and gdg dsns).
Back to top
View user's profile Send private message
samiuddinarif

New User


Joined: 02 Jun 2010
Posts: 4
Location: hyderabad

PostPosted: Thu Jul 01, 2010 3:59 am
Reply with quote

dick scherrer wrote:
Hello,

Your understanding is incorrect. . .

Suggest you look in the JCL manual (available via the "IBM Manuals" link at the top of the page and run an experiment on your system using the same jcl as was posted here (changing the pgm= and gdg dsns).


thanks to all,
actually my problem is i have a file which will give two out files i want to use outfile as my input in next step so how can i use using =>refer to previous
step
thanks in advance
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jul 01, 2010 4:15 am
Reply with quote

unless the TS wants a refer back by ddname like in ...

Code:
//C       EXEC PGM=IEV90,
//             PARM='&PC'
//SYSPUNCH  DD DISP=(NEW,PASS,DELETE),
//             UNIT=SYSDA,SPACE=(CYL,(8,8)),
//             DCB=(RECFM=FB,LRECL=80)
...
//L       EXEC PGM=IEWL,COND=(4,LT,C),
//             PARM='&PL'
//SYSLIN    DD DISP=(OLD,DELETE,DELETE),
//             DSN=*.C.SYSPUNCH
...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 01, 2010 4:16 am
Reply with quote

Why do you insist that you need refer? If the output data sets are cataloged in the first step, just use DSN=,DISP= on the DD statement in the second step and be done with it. And if the output data sets are generation data groups as your first post indicates, then they will be cataloged. There is a link to manuals at the top of the page; the JCL Language Reference and User's Guide manuals will tell you everything you need to know -- if you spend the time to read them.
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 Forcing a step to run (even if abended) JCL & VSAM 8
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
Search our Forums:

Back to Top