Skip to Content
Custom Search

Time Stats of Job from SAR

Job to Pull Time Statistics of a Main frame Job from SAR
 

The following job can be used to fetch time details of a Job from SAR.

 

//JOBTIME    JOB (ACC INFO,,,,,XXXX),'         ',CLASS=M,  
//            MSGCLASS=Y,NOTIFY=&SYSUID                        
//STEP01   EXEC PGM=IEFBR14                         
//DD01     DD  DSN=USERID.DATASET.ONE,            
//             DISP=(MOD,DELETE),UNIT=SYSDA         
//DD02     DD  DSN=USERID.DATASET.TWO,              
//             DISP=(MOD,DELETE),UNIT=SYSDA         
//*                                                 
//STEP02   EXEC PGM=SARBCH                       
//SYSUDUMP DD SYSOUT=*                           
//SYSPRINT DD SYSOUT=*                           
//TIMDSN DD DSN=USERID.DATASET.ONE,            
//            DISP=(,CATLG,DELETE),UNIT=SYSDA    
//SYSIN    DD  *                                 
/DBASE NAME=XXX.XXXXXXX                          
/PRINT ID=JOBNAME1 DDNAME=TIMDSN PAGE=01         
//*                                                       
//STEP03   EXEC PGM=SORT                                  
//SYSOUT   DD SYSOUT=*                                    
//SORTIN   DD DSN=USERID.DATASET.ONE,DISP=SHR           
//SORTOUT  DD DSN=USERID.DATASET.TWO,                     
//            DISP=(,CATLG,DELETE),UNIT=SYSDA,            
//            DCB=(LRECL=80,RECFM=FB)                     
//SYSIN    DD  *                                          
  SORT FIELDS=COPY                                        
  OUTREC FIELDS(1:33,80),CONVERT                          
  INCLUDE COND=(44,14,CH,EQ,C'STARTED - TIME',OR,         
                44,12,CH,EQ,C'ENDED - TIME')              
//                                                       

 

; ; ; ;

Where XXX.XXXXXXX is the name of SAR database. The SAR database for your installation can be found in the main SAR panel where you see the following text


    PRIMARY SELECTION FOR XXX.XXXXXXX

 

and JOBNAME1 is the Jobname for which data needs to be pulled.

Comments

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 33 guests online.
Dr. Radut | page