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

Repetitive processing with SAS program


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 30, 2011 1:00 am
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: 6966
Location: porcelain throne

PostPosted: Thu Jun 30, 2011 1:03 am
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jun 30, 2011 1:04 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top