Is it possible to Scan the MVS SYSLOG and filter entries in the log by
message id or any other string with a batch
Job. Any tips will be appreciated.
Thanks
Jay
Regards,
John Kalinich
USA Logistics Systems Support Center, Saint Louis, Missouri
If you write your syslog to a data set, you can do just about anything.
To run it in batch use IKJEFT01 or IRXJCL.
I have a generic rexx program I use for scanning a syslog data set
for a string, or combination of strings. I also have a program that
splits up the syslog for multiple systems in a mas that use the same
syslog class.
My "Introduction to TSO/E REXX" document discussed on this list last
week included a simple sample:
/* REXX */
/******************************************/
/* Scan file for PARM string */
/* */
/* INPUT DDNAME - SCANIN */
/* OUTPUT DDNAME - SCANOUT */
/******************************************/
parse arg SEARCH /* preserve arg case */
if SEARCH = '' then do /* no srch parm */
say ' ******************************'
say ' * NO SCAN PARM SUPPLIED *'
say ' ******************************'
exit 12
end /* if search */
/******************************************/
/* allocate input and output files */
/******************************************/
"ALLOC FI(SCANIN) DA('SYS3.SYSLOG.G0521V00') SHR REUSE"
"ALLOC FI(SCANOUT) DA(*) REUSE"
/******************************************/
/* Initialize counters */
/******************************************/
FOUND = 0 /* records found counter */
RECNUM = 1 /* current record number */
/******************************************/
/* Process input file */
/******************************************/
do forever
"EXECIO 1 DISKR SCANIN "RECNUM /* read 1 record */
if RC <> 0 then leave /* no more records, exit loop */
RECNUM = RECNUM+1 /* bump up record count by 1 */
parse pull INREC /* pull record from data stack */
if pos(SEARCH,INREC) <> 0 then do
push INREC /* write record to data stack */
FOUND = FOUND+1 /* bump up found counter by 1 */
"EXECIO 1 DISKW SCANOUT" /* write 1 record */
end /* if pos(search,inrec) */
end /* do forever */
/******************************************/
/* close output files */
/******************************************/
"EXECIO 0 DISKR SCANIN (FINIS"
"EXECIO 0 DISKW SCANOUT (FINIS"
/******************************************/
/* write totals and exit */
/******************************************/
RECNUM = right(RECNUM-1,7,'0') /* 7 digit number w/leading zeros */
FOUND = right(FOUND,7,'0') /* 7 digit number w/leading zeros */
say RECNUM' RECORDS WERE READ FROM THE INPUT FILE.'
say FOUND' RECORDS WERE FOUND WITH "'||SEARCH||'".'
if FOUND = 0 then exit 4 /* if no matches found, end with RC=4 */
else exit 0
--
+--------------------------------+--------------------------------+
| Mark Zelden | OS/390 Consultant |
| http://www.flash.net/~mzelden/ | 3D Business Solutions |
| mailto:mze...@flash.net | mailto:mze...@3dsolutions.com |
+--------------------------------+--------------------------------+
Check out my MVS utilities page at:
http://www.flash.net/~mzelden/mvsutil.html
SDSF is executable also in batch. You can read the log in an output-file and
analyze this output.
see: Document Number SC23-0408 (2.15 Use SDSF in Batch)
____________________________________________________________________________
____________________________
Mit freundlichen Gruessen/Best regards
REWE-Informations-Systeme GmbH
Michael Krause
RIS/LIBS - NRZ - Raum 14
Raiffeisenstrasse 5-9
D-61191 Rosbach vor der Hoehe
Telefon: 0049(0)6003/85-2877
0049(0)6101/542 444 (privat)
Telefax: 0049(0)6003/85-6-2877
eMail: Michael...@rewe.de (Office)
Michael...@rhein-main.net (Home)