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
 
Repetitive processing with SAS program

 
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: Thu Jun 30, 2011 12:40 am    Post subject: Repetitive processing with SAS program
Reply with quote

First, my question relates to running a SAS program many times with multiple sets of input files. If it is felt that my problem is more appropriate in the JCL section I understand. I have 20 pairs of input data sets- call the first pair AUSFAC.EES.S688CLW.INDAT01A.DATA and
AUSFAC.EES.S688CLW.INDAT01B.DATA.

My SAS program uses these data sets in the processing and produces a single output file which we call

AUSFAC.EES.S688CLW.OUTDAT01.DATA

The second set of input data sets would be
AUSFAC.EES.S688CLW.INDAT02A.DATA and
AUSFAC.EES.S688CLW.INDAT02B.DATA.

with the output data set being AUSFAC.EES.S688CLW.OUTDAT02.DATA
and so on.
Is there a way that I could set up the JCL so that I could process all 20 pairs of input data sets and produce the 20 output data sets in one batch submission ?

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Thu Jun 30, 2011 1:00 am    Post subject: Reply to: Repetitive processing with SAS program
Reply with quote

what about a proc along the lines of


Code:
//JOBNAME  JOB
//*
//PROCNAM PROC SEQ=
//G       EXEC PGM=PROGNAM
//INA       DD DISP=.....
//             DSN=AUSFAC.EES.S688CLW.INDAT.&SEQ.A.DATA
//INB       DD DISP=.....
//             DSN=AUSFAC.EES.S688CLW.INDAT.&SEQ.B.DATA
//OUT       DD DISP=.....
//             DSN=AUSFAC.EES.S688CLW.OUTDAT.&SEQ..DATA
//.......
//         PEND
//S01      EXEC PROCNAM,SEQ=01
//S01      EXEC PROCNAM,SEQ=02
...
//S20      EXEC PROCNAM,SEQ=20



tested and working
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Thu Jun 30, 2011 1:03 am    Post subject:
Reply with quote

that is what PROCs (PROCEDUREs) are for.

you use smbolics for the dsn's.

your JCL (which you submit),
would contain at least 20 steps,
each with an EXEC YOUR_PROC,symbolic-for-dsn1,symbolic-for-dsn-2
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Thu Jun 30, 2011 1:04 am    Post subject:
Reply with quote

Try something like the following. That SAS coding reads a number of input files.

Code:

//XIBFSRUN JOB 01,MSGCLASS=G,CLASS=D,NOTIFY=XIBF,REGION=0M              00010000
//XIBFSAS  EXEC  SAS,WORK='5000,5000'                                   00060000
//STEPLIB  DD                                                           00070000
//         DD                                                           00080000
//         DD  DSN=XIBF.SAS.LOAD,DISP=SHR                               00090000
//WORK     DD  SPACE=(CYL,(50,50)),DCB=(LRECL=32256,BLKSIZE=32256)      00100000
//SASLIB   DD  UNIT=SYSDA,SPACE=(CYL,(2,2))                             00110000
//FT16F001 DD  SYSOUT=*,DCB=RECFM=FB
//ROOKSCAN DD  *                                                        00160000
* input files to process <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
XIBF.EPA.MACHINE.ALL.A1                                                 00170007
XIBF.EPA.MACHINE.ALL.A2                                                 00180007
XIBF.EPA.MACHINE.ALL.A4                                                 00190007
XIBF.EPA.MACHINE.ALL.FA                                                 00200007
XIBF.EPA.MACHINE.ALL.FC                                                 00210007
XIBF.EPA.MACHINE.ALL.FD                                                 00220007
XIBF.EPA.MACHINE.ALL.FE                                                 00230007
XIBF.EPA.MACHINE.ALL.T3                                                 00240007
//SYSIN    DD  *                                                        00250000
**********************************************************************; 00260000
OPTIONS NOCENTER LS=85  PS=64 MEMSIZE=300M NOMPRINT NOSOURCE2;          00300000
**********************************************************************; 00310000
DATA _NULL_                                                             00320000
   ;                                                                    00330000
   LENGTH DSN $44;                                                      00350000
   INFILE ROOKSCAN;                                                     00360000
   INPUT DSN $;                                                         00370000
   IF SUBSTR(DSN,1,1) = '*' THEN RETURN;                                00380000
   INFILE DUMMY FILEVAR=DSN END=END;                                    00390000
   DO UNTIL(END);                                                       00400000
      INPUT  @1 INREC    $CHAR80./* assuming input files are lrecl=80*/ 00410000
      FILE FT16F001;
      IF INDEX(INREC,'search argument') > 0 THEN /*<<<<<<<<<<<<<<<<<*/
      PUT @1 DSN @46 'search argument';          /*<<<<<<<<<<<<<<<<<*/
   END;                                                                 00470000
RUN;                                                                    00480000
*;                                                                      00490000
Back to top
View user's profile Send private message
Charles Wolters

New User


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

PostPosted: Thu Jun 30, 2011 7:49 pm    Post subject: RE: Repetitive processing with SAS programs
Reply with quote

Thank you all for your detailed responses to my problem. I have taken Enrico's and Peter's code and submitted two batch jobs this morning using my 20 pairs of input data sets. I will let you know if there are any problems.

Sincerely,

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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

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