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

Running time of Jobs from SART using SAS


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Meena Chandran

New User


Joined: 28 Dec 2007
Posts: 13
Location: Chennai

PostPosted: Fri Dec 28, 2007 4:58 pm
Reply with quote

Hi,

I need to capture average running time of jobs(~2 lakhs) using their latest five runs from SART. I have the code,

//UPDASYS EXEC PROC=SAS,REGION=0M,WORK='10,10'
//LIBRARY DD DISP=SHR,DSN=ITCX0$P.PB.MXG.PDB.FORMATS
//PDB1 DD DISP=SHR,DSN=ITCX0$P.PB.PDB.TREND.SYSE
//PDB2 DD DISP=SHR,DSN=ITCX0$P.PB.PDB.TREND.SYSF
//OUTFILE DD DSN=filename,
// DISP=(NEW,CATLG,DELETE),
// DATACLAS=LARGE,
// DCB=(RECFM=FB,LRECL=56)
//SASPRINT DD SYSOUT=*
//SYSIN DD *
OPTIONS PAGESIZE=MAX;
DATA PGMDTL (KEEP=JOB STARTDATE STARTTIME ENDDATE ENDTIME);
SET PDB1.TYPE30_5
PDB2.TYPE30_5;
/*** INLCUDE ALL YOUR JOBS HERE WITH OR CONDITIONS ***/
IF JOB = 'BCS10090'
OR JOB = 'BCS1ANIC'
OR JOB = 'BCS1ANIR'
.....
/* IF SUBSTR(JOB,1,3) NOT = 'ISD'; */
STARTDATE = DATEPART(JINITIME); FORMAT STARTDATE MMDDYY8.;
STARTTIME = TIMEPART(JINITIME); FORMAT STARTTIME TIME8.;
ENDDATE = DATEPART(JTRMTIME); FORMAT ENDDATE MMDDYY8.;
ENDTIME = TIMEPART(JTRMTIME); FORMAT ENDTIME TIME8.;
IF STARTDATE = '11AUG2007'D
OR STARTDATE = '12AUG2007'D
OR STARTDATE = '13AUG2007'D;
/*** YOU CAN ALSO SORT BY WHATEVER FIELD YOU WANT ***/
PROC SORT DATA=PGMDTL;
BY JOB STARTDATE STARTTIME ENDDATE ENDTIME;
RUN;

Instead of giving job names manually, i m extract all the job names in a file (created/extracted using SORT). Can anyone help me how shall i proceed further? or is there otherways to capture average running time of jobs from SART?

Thanks,
Meena
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 28, 2007 6:06 pm
Reply with quote

What is SART?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 28, 2007 6:35 pm
Reply with quote

I can remember using PDB with the MXG product.
Code:

*** INLCUDE ALL YOUR JOBS HERE WITH OR CONDITIONS ***/
IF JOB = 'BCS10090'
OR JOB = 'BCS1ANIC'
OR JOB = 'BCS1ANIR'


Well, if you have a list of jobnames in another dataset, why not read them into a SAS dataset and do a MERGE against the PDB jobnames. Like this ....
Code:

DATA whatever; 
  MERGE pdbdata  (IN=IN1)
        other    (IN=IN2);
  BY whatever;
  If IN1 & IN2;


Code:
 
/* IF SUBSTR(JOB,1,3) NOT = 'ISD'; */
STARTDATE = DATEPART(JINITIME); FORMAT STARTDATE MMDDYY8.;
STARTTIME = TIMEPART(JINITIME); FORMAT STARTTIME TIME8.;
ENDDATE = DATEPART(JTRMTIME); FORMAT ENDDATE MMDDYY8.;
ENDTIME = TIMEPART(JTRMTIME); FORMAT ENDTIME TIME8.;
IF STARTDATE = '11AUG2007'D
OR STARTDATE = '12AUG2007'D
OR STARTDATE = '13AUG2007'D;

I would probably use something like
Code:

/* IF SUBSTR(JOB,1,3) NOT = 'ISD'; */
STARTDATE = DATEPART(JINITIME); FORMAT STARTDATE MMDDYY8.;
IF STARTDATE GE '11AUG2007'D AND STARTDATE LE '13AUG2007'D;
STARTTIME = TIMEPART(JINITIME); FORMAT STARTTIME TIME8.;
ENDDATE = DATEPART(JTRMTIME); FORMAT ENDDATE MMDDYY8.;
ENDTIME = TIMEPART(JTRMTIME); FORMAT ENDTIME TIME8.;


That way you do a range check against the STARTDATE rather than comparing to every possibility.

Also, doing the check on STARTDATE before working on other variables, as shown above, you only perform work on the other variables when the data is valid rather than as default.

Another point, why format the data every time, why not set out the format once before the read ....
Code:

DATA whatever;
 FORMAT  datexxx     DATE10.
         timeyyy     TIME8.;
 SET  indata;
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 How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top