Manually rotating operation logs
You can back up an existing operation log (namely, the File Access Log or the Command Execution Log), and switch the log to a new file. The file to which the backup file is output, naming convention, and mechanism of generational management are the same as the case of automatic switching. For details, refer to the explanation of the Operation Log in Administration Manual.
(1) Operation Log Manual Rotation command
Program interface
CALL Library name/UTLOPLCHG PARM(['LIB=Library name'] 'FL|CL|A'
['G'] ['OUTPUT=filename'] ['EXIT' CL variable name])
Explanation of parameters
- LIB=Library name
-
Library name in which HULFT is installed ("HULFT" by default)
Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.
- FL|CL|A
-
Operation log to be switched (Mandatory)
Specify FL, CL, or A. You cannot specify more than one option at the same time.
- FL :
-
Output only the File Access Log
- CL :
-
Switch only the Command Execution Log.
- A :
-
Switch both the File Access Log and the Command Execution Log.
- G
-
Control of the error messages that the Operation Log Manual Rotation command outputs (Optional)
When omitted, HULFT displays error messages.
- OUTPUT=filename
-
Destination of the error messages that the Operation Log Manual Rotation command outputs (Optional)
Specify this parameter in the format of Library name/File name(Member name).
When omitted, error messages are not output.
The number of log records that a log file can retain is unlimited.
- EXIT CL variable name
-
Specifies to receive the error code output by the Operation Log Manual Rotation command and specifies the CL variable name to set the error code value (Optional)
The CL variable name must immediately follow the EXIT tag.
HULFT sets an error code to the CL variable only if the command ends unsuccessfully.
When omitted, an error code is not set.
The Operation Log is output via FIFO. HULFT outputs the message remained in FIFO after the execution of switching if a message remains in FIFO, when the application has completed the switching of the Operation Log. Therefore, the log record of the operation of which processing has already been completed may be output after the execution of switching of the Operation Log in some cases.
Command interface
UTLOPLCHG LOG() LIBRARY( ) MSG( ) FILE( ) MBR( )
Explanation of parameters
- LOG
-
Operation Log to be switched (*ALL by default)
- FL :
-
Output only the File Access Log
- CL :
-
Switch only the Command Execution Log.
- *ALL :
-
Switch both the File Access Log and the Command Execution Log.
When *ALL is specified or this parameter is omitted, both the File Access Log and the Command Execution Log become the targets of this command.
- LIBRARY
-
Library name in which HULFT is installed ("HULFT" by default)
Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.
- MSG
-
Control of error messages ("*YES" by default)
- *NO :
-
Suppress error messages.
- *YES :
-
Show error messages.
- FILE
-
Name of the library and the file to which error messages are output (Optional)
Specify this parameter in the format of Library name/File name.
Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.
When omitted, error messages are not output. The number of log records that a log file can retain is unlimited.
- MBR
-
Member name of the file to which error messages are output ("*FILE" by default)
Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.