The LOG_SELECT procedure selects access modes for the log file. The procedure is set up as follows:
INTEGER PROCEDURE LOG_SELECT(STYPE,SBUFFER); VALUE STYPE;
REAL STYPE; ARRAY SBUFFER[0];
In this procedure, STYPE contains the selection case, and SBUFFER contains the selection data, which is case dependent. You can call the LOG_SELECT procedure more than once with different STYPE values. For example, to get full access to all records in the SUMLOG and SECURITYLOG, two calls are required; one call with STYPE = 3 and SBUFFER[0] = 0 (to turn off usercode filtering) followed by a second call with STYPE = 11 and SBUFFER[0] = 1 (to select a merged view).
The results are case dependent; negative is failure. The following functions can be selected:
STYPE
Value Name Function
0 CLEAR Clears the specification of a time frame that might have been set up by a call to LOG_SELECT with STYPE = 1.
1 TIMEFRAME SET Causes only log entries to be returned that fall in the time range specified in the SBUFFER
parameter. SBUFFER[0] and SBUFFER[1] contain the start date and start time, and SBUFFER[2] and SBUFFER[3] contain the end date and end time. If SBUFFER[0] contains a value of 7, the dates and times are in SBUFFER[1] and SBUFFER[3] in TIME(7) format. Otherwise, the dates are in SBUFFER[0] and SBUFFER[2], and the times are in SBUFFER[1] and SBUFFER[3]. The dates are in a modified Julian date format, represented as YYYDDD where YYY is the number of years after 1900. The times are in minutes.
STYPE
Value Name Function
2 LOGRANGE GET Returns the date and time of the first record in the log file in SBUFFER[0] and SBUFFER[1], and the date and time of the last record in the log file in SBUFFER[2] and SBUFFER[3].
If SBUFFER[0] contains a value of 7, the dates and times are in SBUFFER[1] and SBUFFER[3] in TIME(7) format. Otherwise, the dates are in SBUFFER[0] and SBUFFER[2], and the times are in SBUFFER [1] and SBUFFER[3]. The dates are in a modified Julian date format, represented as YYYDDD where YYY is the number of years after 1900. The times are in minutes.
If SBUFFER[0] contains a value of 7, the dates and times are returned in SBUFFER[1] and SBUFFER[3] in TIME(7) format. Otherwise, the dates are returned in SBUFFER[0] and SBUFFER[2] in Julian date format, and the times are returned in SBUFFER[1] and SBUFFER[3] in minutes as an integer value.
3 USERCODE SET This function is available only with
IGSDASUPPORT. If the function is not available, a –1 error code is returned.
The SBUFFER parameter contains a USERCODE as a standard form name. If the SDASUPPORT library functions in filtered mode (see FILTERING SET), filtering is performed using this USERCODE. If the caller does not have direct read access to the SUMLOG file to be opened, and the USERCODE is not equal to the caller’s, an open error (4) is returned by LOG_OPEN. If SBUFFER contains an invalid name, a –2 error code is returned. If a log file is currently open, a –3 error code is returned. Three special names are valid: if
SBUFFER[0].[47:08] contains 48"00", no filtering based on USERCODE is performed. If
SBUFFER[0].[47:24] contains 48"030000", the search target is for entries without an associated USERCODE. If SBUFFER[0].[47:24] contains 48"030100", the search target is the USERCODE of the calling process.
Writing Log Analysis Programs
STYPE
Value Name Function
4 ACCESS CODE SET This function is available only with
IGSDASUPPORT. If the function is not available, a –1 error code is returned.
The SBUFFER parameter contains an accesscode as a standard name. If the SDASUPPORT library functions in filtered mode (see FILTERING SET), filtering is performed using this accesscode. If SBUFFER contains an invalid name, a –2 error code is returned. If a log file is currently open, a –3 error code is returned.
Three special names are valid: if
SBUFFER[0].[47:08] contains 48"00", no filtering based on ACCESSCODE is performed. If SBUFFER[0].[47:24] contains 48"030000", the search target is for entries without an associated ACCESSCODE. If SBUFFER[0].[47:24] contains 48"030100", the search target is the ACCESSCODE of the calling process.
5 FILTERING SET This function is available only with IGSDASUPPORT.
SBUFFER[0] contains one of the following values: • 0 = No change; the current setting is returned. • 1 = Enter a filtering mode in which log
retrieval routines (LOG_GET_ENTRY,
LOG_READ_RECORD, LOG_GET, LOG_READ) return only those entries that match the USERCODE, CHARGECODE, and ACCESSCODE of the user process. • 2 = Enter a filtering mode similar to that
specified by a value of 1, except that log retrieval routines (LOG_GET_ENTRY,
LOG_READ_RECORD, LOG_GET, LOG_READ) are also allowed access to public entries (such as maintenance and halt/load entries). • 3 = Exit filtering mode if the caller has direct
read access to the SUMLOG file; otherwise, the filtering value of 2 is used.
This function can be selected only when no log file is open. If a log file is open, a –3 error code is returned.
STYPE
Value Name Function
6 RESULT SET This function is available only with
IGSDASUPPORT. If the function is not available, a –1 error code is returned.
SBUFFER[0].[03:04] contains the following RESULT value bit mask:
• Bit [03:01], if set, causes security violation entries to be visible.
• Bit [02:01], if set, causes security relevant entries to be visible.
• Bit [01:01], if set, causes failure entries to be visible.
• Bit [00:01], if set, causes successful entries to be visible.
The default is all RESULT types are passed. 7 CHARGECODE SET This function is available only with
IGSDASUPPORT. If the function is not available, a –1 error code is returned.
The SBUFFER parameter contains a charge code as a standard name. If the SDASUPPORT library functions in filtered mode (see FILTERING SET), filtering is performed using this charge code. If SBUFFER contains an invalid name, a –2 error code is returned. If a log file is currently open, a –3 error code is returned.
Three special names are valid: if SBUFFER contains 48"00", no filtering based on
CHARGECODE is performed; SBUFFER contains 48"030000", the search target is for entries without an associated CHARGECODE; SBUFFER contains 48"030100", the search target is the CHARGECODE of the calling process.
8 UPDATE EOF Causes the logical EOF pointer to be aligned with the actual EOF of the log file.
If no log file is open, a –3 error code is returned. If a time range has been established, a –4 error code is returned.
Otherwise, the number of additional physical records is returned.
9 SECLOGRANGE GET Returns the date and time of the first record in the Security Log file in SBUFFER[0] and SBUFFER[1], and the date and time of the last record in the log file in SBUFFER[2] and SBUFFER[3].
For more information, refer to STYPE 2 LOGRANGE GET.
Writing Log Analysis Programs
STYPE
Value Name Function
11 SET MERGED VIEW Determines whether an attempt is made to open the associated Security Log file when a SUMLOG file is opened. If SBUFFER [0] contains a value of 1, SDASUPPORT attempts to open the associated Security Log file when a SUMLOG file is opened. The title of the Security Log file is determined by replacing all nodes of “SUMLOG” with
“SECURITYLOG”. For example, if the SUMLOG file title is SYSTEM/SUMLOG, SDASUPPORT opens SYSTEM/SECURITYLOG, and if the SUMLOG file title is *SUMLOG/1234/072308/012345,
SDASUPPORT opens
*SECURITYLOG/1234/072308/012345.
1021 NO WARNING Suppresses unwanted or inappropriate warnings. The only warning that can be suppressed is the warning of truncation when a version 1 header is converted to a version 0 header.
The following STYPE values are valid only if the SDASUPPORT library was compiled with the compiler option DIAGNOSTICS set:
STYPE
Value Option Description
1022 EXPERIMENTAL
OUTPUT TO PRINTER Forces diagnostic information to be written to a printer file. 1023 EXPERIMENTAL SET Causes diagnostic information to be generated. If
the SDASUPPORT library is called by a remote caller, the information is written to a remote file, otherwise it is written to a printer file.
LOG_SKIP
The LOG_SKIP procedure skips a number of records in the log file. The procedure is set up as follows:
BOOLEAN PROCEDURE LOG_SKIP(MODE); VALUE MODE;
The parameters for this procedure are as follows:
MODE Result
0 No records skipped 1 Skip to beginning of file 2 Skip to next entry
A read logical result descriptor is returned as a result of the LOG_SKIP procedure. If the log file is not open, an EOF condition is reported for skip to next entry (MODE = 2).