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 time of Jobs from SART using SAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Running time of Jobs from SART using SAS
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

Moderator Team Head


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

PostPosted: Fri Dec 28, 2007 6:06 pm    Post subject: Reply to: Running time of Jobs from SART using SAS
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8657
Location: Back in jolly old England

PostPosted: Fri Dec 28, 2007 6:35 pm    Post subject:
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    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 List of jobs ran thru scheduler ddhar All Other Mainframe Topics 1 Tue Mar 27, 2018 4:32 am
No new posts How syntax check at Bind time is diff... Poha Eater DB2 5 Wed Mar 21, 2018 9:16 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need to identify top 10 costly or tim... ashek15 DB2 4 Wed Feb 14, 2018 3:20 am
No new posts OLDS frozen in BACKOUT status when On... lind sh IMS DB/DC 3 Tue Feb 13, 2018 7:12 pm

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