Command logging is used to capture information about all Adabas commands issued by users. The information contained in the logs includes
the user identification;
the time of day;
the command issued;
the file that was accessed;
the record that was accessed;
the Adabas response code received; and
the amount of time it took for the command to complete.
Command logging may be performed by Adabas or Adabas Review
This document covers the following topics:
Logging options determine whether command logging is performed, what information is logged, and where the command log is written.
The following describes the Logging option parameters for Adabas Review reports.
Parameter | Use | Possible Values | Default |
---|---|---|---|
LOG |
Determine whether Adabas Review will write command logs for a particular report (Y), or whether command logging and all other logging options will be ignored (N). | Y | N | N |
Parameter | Use | Possible Values | Default |
---|---|---|---|
FILE |
Specify the DD/file name prefix to identify the file to which Adabas Review will write the command log data. Each report that specifies command logging must have its own file name prefix. | 5-byte name | RVLOG |
NUM OF LOGS |
Specify the number of command log files to be used by a report. | 1-99* | 2 |
For every command log file specified in the NUM OF
LOGS
parameter, a file name is created by appending a number to the
end of the file name prefix specified in the FILE
parameter. Each log file name must be coded in the Adabas startup.
For example, if FILE=RVLOG
and NUM OF
LOGS=2
, command log data will be written to files
RVLOG01 and
RVLOG02.
* Up to 99 command log datasets can exist for each report under z/OS; 9 under VSE/ESA.
Parameter | Use | Possible Values | Default |
---|---|---|---|
USER EXIT |
Specify the name of the user exit that is called when a command log is filled. | name | none |
Adabas Review writes to the command log files in sequential order. When
a command log file is filled, the following actions occur: the file is closed;
the exit specified in the USER EXIT
parameter is called;
and the next command log file is opened to receive data.
The user exit is provided so that the data contained in the command log file may be copied to another device before the file is overwritten with new command log data. Sample code is provided for this exit in the Adabas Review source library member LOGUEXIT. Also provided is the command log copy job, source library member REVCLCOP.
If an exit is not specified, Adabas Review closes the filled command log file and opens the next file; no provision is made for copying the data.
Parameter | Use | Possible Values | Default |
---|---|---|---|
LOG SIZE |
Specify the number of blocks to be allocated to each command log file. | nnnnn | 99999 |
Because command log records vary in length, it is important to
carefully determine the LOG SIZE
parameter value. The
maximum length of a command log record written by Adabas Review is 8
kilobytes.
Log size is determined using the following formula:
number of tracks * ( (bytes per track/9996) -1)
For Adabas Review command logs, the blocking factor is 10,000 bytes per block.
The following table provides approximate values for tracks per cylinder and bytes per track for 3350, 3380, and 3390 devices:
Device Type | Tracks per Cylinder | Bytes per Track |
---|---|---|
3380 | 15 | 47,000 |
3390 | 15 | 57,000 |
The log size for 10 cylinders of a 3380 device is determined as follows:
Number of tracks is 15x10, or 150 tracks;
Bytes per track/blocking factor is 47,000/10,000 = 4.7, or 4 blocks;
Log size is 150x4, or 600 blocks.
The following report option parameters are required and must be set as indicated for reports that will log commands:
Option | Setting | Explanation |
---|---|---|
Detail/Sum | D | Detailed report; command logging is performed only for detailed reports. |
Log | Y | Yes indicates that the report performs command logging. |
File | name | The five-character prefix of the DD/file name. |
Num of Logs | number | The total number of command log files allocated for the report. |
Log Size | number | Number of blocks per dataset. Datasets for a particular report must be the same size. |
The following report option parameters and settings are suggested for efficient command logging operation:
Option | Setting | Explanation |
---|---|---|
AutoStart | Y | Starts the command logging report when the database is initialized. |
N | Prevents each detail data line from being printed; eliminates redundant recording of data and waste of spool space. | |
User Exit | exit name | Filled command logs are copied to another device before they are overwritten with new command log data. |
A command log report must be a detailed report so that it produces a straight recording of each command processed by Adabas. Detailed reports cannot be viewed online.
By using the report option parameter PRINT=N
,
the printed detail report may be suppressed for a command logging report.
Processing rules may be used to restrict the collection of data to certain values; e.g., all commands that return a nonzero response code.
Before starting a report that performs command logging, command log datasets must be allocated and the corresponding job control statements must be added to the Adabas startup JCL.
If you use the user exit to copy a filled command log to another device, refer to the sample user exit code in the source library member LOGUEXIT. The command log copy job is provided in source library member REVCLCOP.