System Log (SYSLOG)
What is the System Log (SYSLOG)?
The system log (SYSLOG) is a chronological listing of messages about z/OS system activity and other major middleware software products using z/OS services.
When an unexpected system problem occurs, the SYSLOG is the first place to look to gather information about the problem.
System log includes:
- Informational, Warning, Error and Action messages
- System commands entered
- System command responses
REXX code is available to read the active system log looking for a specific string.
Each found string is written to member #14 in your p3.output data set.
Only selected parts of each system log record are written. The selected parts are:
- log date
- log time
- message text
Get and execute LOGLOOK REXX code
Copy 'zos.mtm2019.public.rexx(loglook)' into your REXX partitioned data set as a new member named loglook.
Press F3 or enter save;end
Execute LOGLOOK REXX code by entering ex to the left of the member name.
The result of execution is:
isfmsg is: NO SYS1 SYSLOG FOUND
isfmsg2.1 is: ISF754I
Command 'SET DATE MMDDYYYY /'
generated from associated variable ISFDATE.
isfmsg2.2 is: ISF754I
Command 'SYSID SYS1' generated from associated variable ISFSYSID.
isfmsg2.3 is: ISF766I Request completed, status: NO SYS1 SYSLOG FOUND.
What is in bold is key. What is the contest system name?
Special variables for use with the ISFLOG command
Revisit the SYSLOG and gather needed information
- Enter =sd;log
- Enter SYM to list the system symbolics
The system ID is synonomous with sysname
- Press F3 or enter end to returnt to SDSF menu
- Enter 'top' to position cursor at top of the syslog
- Enter f z###### substituting your ID for z######
- Press F5 or enter rfind to repeat the find command
Find is limited to 5,000 lines
If not found in first 5,000 lines, then press F5 or rfind again
Modify LOGLOOK REXX code
REXX code that reads the SYSLOG is provided.
You will modify the REXX code as follows:
- Provide the correct system ID
- Provide a search string which needs to be your ID
Modify the LOGLOOK REXX code search the contest system name log for all occurrences of a search string that is your ID.
Successful execution is records containing:
- log date
- log time
- message text where message text includes your id
What did you just learn?
You just learned you can search system logs for any character string and write the report output to a data set. It is possible to automatically run the routine at different intervals then the various reports can be reviewed.