Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Running multiple SAS programs in one batch submission

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Fri Apr 15, 2011 2:32 am    Post subject: Running multiple SAS programs in one batch submission
Reply with quote

Here is my problem – I have three SAS programs where the first program has two input data sets and produces two output data sets and both of the output data sets will serve as input to the second SAS program. Let’s call those output files RMTPRD.EES.S688DDD. DATFILE1.DATA and RMTPRD.EES.S688DDD.DATFILE2.DATA and we can assume they are SAS data sets. Let’s say the first SAS program has a DSN of RMTPRD.EES.S688DDD.SASPRG1.SAS and the second has a DSN of RMTPRD.EES.S688DDD. SASPRG2.SAS.

Now the second program produces two output data sets and one is needed as input for the third SAS program which has a DSN of RMTPRD.EES.S688DDD.SASPRG3.SAS and for illustration purposes we can call the data set needed by the third program RMTPRD.EES.S688DDD.OUTDAT3.DATA.

Even though I am running three SAS programs I think I still just need one EXEC card. When I execute a single SAS program the job is set up by first including JCL statements with the SAS program after the //SYSIN DD * statement. I don’t see how that approach will work with multiple SAS programs with the input of one program dependent on the output of a previous SAS program. I did a bit of reading in the SAS MVS manual and the second way to reference your SAS program in a JCL stream is to place the DSN of the SAS program on the SYSIN statement. Is that is what is needed here?

Charles Wolters
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 15, 2011 3:15 am    Post subject:
Reply with quote

Code:
// EXEC SAS
//DD01  DD DISP=OLD,DSN=RMTPRD.EES.S688DDD.DATFILE1.DATA
//DD02  DD DISP=OLD,DSN=RMTPRD.EES.S688DDD.DATFILE2.DATA
//DD03  DD DISP=OLD,DSN=RMTPRD.EES.S688DDD.OUTDAT3.DATA
//SYSIN DD DISP=SHR,DSN=RMTPRD.EES.S688DDD.SASPRG1.SAS
//      DD DISP=SHR,DSN=RMTPRD.EES.S688DDD.SASPRG2.SAS
//      DD DISP=SHR,DSN=RMTPRD.EES.S688DDD.SASPRG3.SAS
will do it, but you'll have to change DD01, DD02, DD03 to your DD names.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2441
Location: Netherlands, Amstelveen

PostPosted: Fri Apr 15, 2011 11:37 am    Post subject:
Reply with quote

You only need one SAS library dataset, that wil contain all input/output
SAS datasets for all your SAS programs (concatenated datasets or in stream)
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Fri Apr 15, 2011 7:19 pm    Post subject: RE:Running multiple SAS programs in one job
Reply with quote

Thank you all for your quick responses. Our job setups have always been to use //SYSIN DD * followed by the SAS program but you are using
SYSIN DD DSN= ..... to execute the SAS programs. I will give this method a go. It really gives you a thrill when you realize you can increase your efficiency.

Charles Wolters
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us