MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read SYSLOG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
rsantosh
Beginner


Joined: 20 Dec 2014
Posts: 38
Topics: 9

PostPosted: Tue Mar 30, 2021 11:29 am    Post subject: Read SYSLOG Reply with quote

Hello,

Is there any utility or way to read the SYSLOG?

We need to extract job info like start time end time and RC (different jobs) after every x minutes. We tried using ISFAFD but that limits the # of jobs we can extract data for in a single job(255).

We use zeke scheduler and it provides report utility but using that utility to hit zeke log every x minutes may affect its performance hence trying the SYSLOG route.

Regards,
Santosh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Mar 31, 2021 9:33 am    Post subject: Reply with quote

rsantosh,

Most shops offload the syslog to a dataset at regular intervals. So if your shop has that mechanism then you can run DFSORT to extract the information.

here is a JCL that will extract the information from syslog datasets. The JCL assumes that the syslog dataset is LRECL=137, RECFM=VBA
Code:

//********************************************************************
//* Use DFSORT JOINKEYS to generate the report for batch statistics  *
//* from the syslog.                                                 *
//*                                                                  *
//* Joinkeys will use the same syslog to match to itself             *
//*                                                                  *
//* INA will get jobid and jobnames that started using msg $HASP373  *
//*                                                                  *
//* INB will get all the following values                            *
//* End time and EndRC from msg $HASP395                             *
//* CPU TIME from msg TOTAL CPU TIME=                                *
//* ELapsed time is on the following Line after CPU time             *
//* MAXCC is gotten from the msg MAXCC=  (can also use $HASP165)     *
//*                                                                  *
//* A match is performed using JOBID and JOBNAME as keys and write   *
//* out the matched values                                           *
//*                                                                  *
//********************************************************************
//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//INA      DD DISP=SHR,DSN=Your Syslog Dataset
//INB      DD DISP=SHR,DSN=Same Syslog Dataset                 
//SORTOUT  DD DSN=Your.REPORT,                 
//            DISP=(NEW,CATLG,DELETE),                                 
//            SPACE=(CYL,(1,1),RLSE)                                   
//SYSIN    DD *       
  JOINKEYS F1=INA,FIELDS=(05,09,A,         $ JOBID + COMMA           
                          14,09,A)         $ JOBNAME + COMMA         
                                                                     
  JOINKEYS F2=INB,FIELDS=(05,09,A,         $ JOBID+COMMA             
                          14,09,A)         $ JOBNAME + COMMA         
                                                                     
  REFORMAT FIELDS=(F1:05,30,                                         
                   F2:23,40)                                         
                                                                     
  SORT FIELDS=(01,08,CH,A,                                           
               10,08,CH,A,                                           
               70,01,CH,A)                                           
                                                                     
  OUTREC IFTHEN=(WHEN=GROUP,                                         
                BEGIN=(70,01,CH,EQ,C'1'),                             
                  END=(70,01,CH,EQ,C'3'),                             
                 PUSH=(31:31,11,           $ END-TIME                 
                       57:57,04)),         $ END-RC                   
                                                                     
         IFTHEN=(WHEN=GROUP,                                         
                BEGIN=(70,01,CH,EQ,C'2'),                             
                  END=(70,01,CH,EQ,C'3'),                             
                 PUSH=(43:43,06,           $ CPU TIME                 
                       50:50,06))          $ ELAPSED TIME             
                                                                     
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                               
  HEADER1=(',BATCH-STATISTICS Report as on,',DATE=(MD4/),/,           
           'Jobid   ,Jobname ,Start time ,End time   ,CPU Time,',     
           'Elap Time,End-rc,Maxx-rc'),                               
  SECTIONS=(01,18,                                                   
  TRAILER3=(01,48,2X,                                                 
            49,07,3X,                                                 
            56,05,2X,                                                 
            61,05,4X))                                               
/*                                                                   
//JNF1CNTL DD *                                               
  OPTION VLSCMP                                               
  INCLUDE COND=((43,3,CH,EQ,C'JOB',OR,                         
                 43,3,CH,EQ,C'STC'),AND,                       
                (62,8,CH,EQ,C'$HASP373'))                     
                                                               
  INREC BUILD=(01,04,                      $ RDW               
               43,08,                      $ JOBID/STC ID     
               C',',                       $ COMMA             
               71,08,                      $ JOBNAME           
               C',',                       $ COMMA             
               31,11,                      $ START TIME       
               C',')                       $ COMMA             
/*                                                             
//JNF2CNTL DD *                                                 
  INREC IFTHEN=(WHEN=GROUP,                                     
               BEGIN=(025,05,CH,GT,C' '),                       
                PUSH=(025:025,35)),                             
        IFTHEN=(WHEN=GROUP,                                     
               BEGIN=(106,15,CH,EQ,C'TOTAL CPU TIME='),         
             RECORDS=2,                                         
                PUSH=(138:SEQ=1,                                 
                      140:063,08,                               
                      150:121,06)),                             
                                                                 
** GET JOB END RECORD**                                         
        IFTHEN=(WHEN=(062,07,CH,EQ,C'$HASP395'),                 
               BUILD=(001,04,              $ RDW                 
                      043,08,              $ JOBID               
                      C',',                $ COMMA               
                      071,08,              $ JOBNAME             
                      C',',                $ COMMA               
                      031,11,              $ END TIME           
                      C',',                $ COMMA               
                      6X,                  $ SPACES TO CPUTIME   
                      C',',                $ COMMA               
                      6X,                  $ SPACES TO ELAPSED   
                      C',',                $ COMMA               
                      091,04,              $ END RC             
                      C',',                $ COMMA               
                      4X,                  $ SPACES FOR MAXRC   
                      C',',                $ COMMA               
                      C'END1',             $ TEXT END           
                      C',')),              $ COMMA               
                                                                 
** GET CPU/ELAPSED TIME RECORD **                                   
        IFTHEN=(WHEN=(138,01,CH,EQ,C'2'),                           
               BUILD=(001,04,              $ RDW                   
                      043,08,              $ JOBID                 
                      C',',                $ COMMA                 
                      140,08,              $ JOBNAME               
                      C',',                $ COMMA                 
                      11X,                 $ SPACES FOR ENDTIME     
                      C',',                $ COMMA                 
                      150,06,              $ CPU TIME               
                      C',',                $ COMMA                 
                      076,06,              $ CPU TIME               
                      C',',                $ COMMA                 
                      4X,                  $ SPACES FOR ENDRC       
                      C',',                $ COMMA                 
                      4X,                  $ SPACES TO MAXRC       
                      C',',                $ COMMA                 
                      C'CPU2',             $ TEXT END               
                      C',')),              $ COMMA                 
                                                                   
** GET MAXCC RECORD **                                             
        IFTHEN=(WHEN=(114,06,CH,EQ,C'MAXCC='),                     
               BUILD=(001,04,              $ RDW                   
                      075,08,              $ JOBID                 
                      C',',                $ COMMA                 
                      093,08,              $ JOBNAME               
                      C',',                $ COMMA                 
                      11X,                 $ SPACES FOR ENDTIME     
                      C',',                $ COMMA                 
                      6X,                  $ SPACES TO CPUTIME     
                      C',',                $ COMMA                 
                      6X,                  $ SPACES TO ELAPSED     
                      C',',                $ COMMA                 
                      4X,                  $ SPACES TO ENDRC       
                      C',',                $ COMMA                 
                      120,04,              $ MAXCC                 
                      C',',                $ COMMA                 
                      C'RC 3',             $ TEXT END               
                      C',')),              $ COMMA                 
                                                                   
        IFTHEN=(WHEN=NONE,                             
               BUILD=(001,04,              $ RDW       
                      59X'FF'))            $ HIGHVALUE
                                                       
/*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rsantosh
Beginner


Joined: 20 Dec 2014
Posts: 38
Topics: 9

PostPosted: Wed Mar 31, 2021 10:32 am    Post subject: Reply with quote

Hi Kolusu,

Thank you. We do offload the syslog but time interval is quiet large. I need to get the data every 15 min or so.

I found that we can use SDSF's ISFLOG command in REXX to get the data from SYSLOG.

Will it create any performance issue if we hit the SYSLOG every 10-15 mins?

Regards,
Santosh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Mar 31, 2021 10:40 am    Post subject: Reply with quote

rsantosh,

Scheduling a job every 15 mins does require resources. You need to make sure that the next time you run the job, it would pick the records from the next interval. Also you need to take care of data getting unloaded by your syslog offload.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rsantosh
Beginner


Joined: 20 Dec 2014
Posts: 38
Topics: 9

PostPosted: Wed Mar 31, 2021 11:20 am    Post subject: Reply with quote

Hi Kolusu,

Yes, I am trying to see how to use ISFLOGSTARTTIME/ISFLOGSTOPTIME.

Also, I am not dumping all the data but only records with $HASP373 & $HASP395. This will reduce I/O.

Regards,
Santosh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group