Start of change

ADMIN_INFO_SYSLOG stored procedure

The ADMIN_INFO_SYSLOG stored procedure returns system log entries. You can specify filters, such as search string, system name, begin date and time, end date and time, and maximum number of entries, to limit the number of system log entries that are returned.

Note: This stored procedure is supported for z/OS® Version 1 Release 12 and later.

Environment

Begin general-use programming interface information.

ADMIN_INFO_SYSLOG runs in a WLM-established stored procedures address space, where TCB=1 is required.

Authorization

To use ADMIN_INFO_SYSLOG, you need to be licensed to use the SDSF utility. The ADMIN_INFO_SYSLOG stored procedure uses the SDSF ISFEXEC host command to issue the SDSF command MAS, and the SDSF ISFLOG host command to access the SYSLOG. These commands are issued under the security context of the user who is calling ADMIN_INFO_SYSLOG. SDSF determines the user command authority in the same way that it does when the user issues the SDSF commands MAS and LOG in an interactive mode. For more information about granting access to SDSF commands, see z/OS SDSF Operation and Customization.

Syntax

The following syntax diagram shows the SQL CALL statement for invoking this stored procedure:

>>-CALL--SYSPROC.ADMIN_INFO_SYSLOG--(--search-filter,----------->

>--system-name,--start-date,--start-time,--end-date,------------>

>--end-time,--max-entries,--message--)-------------------------><

Option descriptions

search-filter
Specifies a logical expression that is used to filter the SYSLOG records. If this parameter is set to NULL or is empty, filtering is not done.

A logical expression is composed of one or more operands, separated by operators. For example:

operand operator operand operator operand ... operator operand

where:

  • operator is one of the following logical operators:
    • AND
    • and
    • OR
    • or
  • operand is a string of characters, or a string of characters enclosed in quotation marks.

The operand is used unchanged to search and locate a system log record. Therefore, characters such as '*', '%', and '?' are not handled as masking characters.

If an operand is enclosed in quotations marks and you want to include quotation marks in the operand, use two sets of quotation marks. If an operand includes one or more blanks or the logical operators (AND, and, OR, or), enclose the string of characters in quotations marks.

For a multi-line message, each operand in the search-filter parameter is checked against each line of the multi-line message. A match is found if the operand is in at least one line of the multi-line message. If the operand is split over several lines, a match is not found. If the whole message satisfies the search-filter, the whole message is returned.

JES3 DLOG does not have a column that indicates whether a line is a continuation of a previous line. For a multi-line message, the filter is applied separately on each line in the message, and only matching lines (not the whole message) are returned.

This is an input parameter of type VARCHAR(1300).

system-name
Specifies the system in the sysplex where the system log entries will be processed or searched. Specify NULL if you are retrieving SYSLOG records for the z/OS subsystem where the stored procedure is running. Specify "*" (an asterisk) if you want all of the systems in a sysplex to be processed. The following restrictions apply:
  • If the stored procedure is running in a JES2 system, specifying "*" causes the stored procedure to process only the logical SYSLOG of every active JES2 system in the sysplex.
  • If the stored procedure is running in a JES3 system, specifying "*" causes the stored procedure to process the logical SYSLOG of every active JES3 system in the sysplex. All DLOG entries in the global SYSLOG that are within the specified time interval, which can contain messages from every JES2 and JES3 system in the sysplex, will also be returned.

This is an input parameter of type VARCHAR(8).

start-date
Specifies the starting date for system log records to be processed. If this parameter is set to NULL, the default is the current date.

This is an input parameter of type DATE.

start-time
Specifies the starting time for system log records to be processed. If this parameter is set to NULL, the default time is 00:00:00.

This is an input parameter of type TIME.

end-date
Specifies the ending date for system log records to be processed. If this parameter is set to NULL, the default is the current date.

This is an input parameter of type DATE.

end-time
Specifies the ending time for system log records to be processed. If this parameter is set to NULL, the default time is 23:59:59.

This is an input parameter of type TIME.

Together, start-date, start-time, end-date, and end-time define the date and time range for the SYSLOG records. The starting date and time must be less than the ending date and time. SDSF positions the SYSLOG as close as possible to the requested record. However, due to the precision that is used for timestamps and the time that the record is actually written to SYSLOG, the time parameters might be several lines away from the record that you want. SYSLOG records from before a specified time interval might be returned, while SYSLOG records that are closer to a specified ending date and time might not be returned.
max-entries
Specifies a limit for the number of SYSLOG records to be processed for each system. If this parameter is set to NULL, the default is 500. Valid values are 1 to 99999999 and -1 to -99999999.

If max-entries is a positive number, the stored procedure processes only the oldest max-entries records for a specified time interval. If the limit for records occurs in the middle of a message, the message will be truncated if returned by the stored procedure.

If max-entries is a negative number, the stored procedure processes only the most current max-entries records for the specified time interval. If the limit for records occurs in the middle of a message, the message will be truncated if returned by the stored procedure.

Note: If you specified the search-filter parameter, the value specified for max-entries is not the maximum number of result set rows to be returned for a system. The number of rows that are returned in a result set for a system is always less than or equal to max-entries.

This is an input parameter of type INTEGER.

message
Contains messages that describe errors that occurred during stored procedure processing. The first messages are generated by the stored procedure. Messages that are generated by ISFEXEC or ISFLOG might follow the stored procedure messages.

If the stored procedure completed successfully, no message is returned.

This is an output parameter of type VARCHAR(1331).

Output

This stored procedure returns the following output parameters, which are described in Option descriptions:

  • message

In addition to the preceding output, the stored procedure returns one result set that contains the system log records that you requested.

The following table shows the format of the result set that is returned in the created global temporary table SYSIBM.SYSLOG:

Table 1. Result set row for ADMIN_INFO_SYSLOG result set
Column name Data type Contents
ROWNUM
INTEGER
NOT NULL
Sequence number of the table row, from 1 to n.
TEXT
VARCHAR(130)
NOT NULL
A system log entry. For multi-line messages, a row is returned for each line in the message.

The result set rows are returned in ascending order by ROWNUM. The system log records that are returned are grouped by system. Within each system, the system log records are returned in the same order as they appear in the SDSF system log.

End general-use programming interface information.

End of change