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 use refer to other step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to use refer to other step
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jun 26, 2010 3:06 am    Post subject:
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

Site Director


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

PostPosted: Sat Jun 26, 2010 6:24 am    Post subject:
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    Post subject:
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    Post subject: Reply to: how to use refer to other step
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

Site Director


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

PostPosted: Wed Jun 30, 2010 7:27 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Jul 01, 2010 4:15 am    Post subject: Reply to: how to use refer to other step
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 01, 2010 4:16 am    Post subject:
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    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 Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


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