Deleting records from the Send Log and the Receive Log
In the Send Log file and the Receive Log file, HULFT keeps one log record each time the application sends or receives a file. Delete unnecessary data from logs regularly.
(1) Send and Receive Log Delete command
Program interface
CALL library name/UTLOBSRM PARM(['LIB=library name'] ['{S|R|A}'] ['ID=fileid']
{['FROM=DATE1'] ['TO=DATE2'] ['I']|
['DAY=day']|['LASTWEEK']|['LASTMONTH']}
['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.
- S|R|A
-
Type of log from which you want to delete log records (Optional)
- S :
-
Send Log
- R :
-
Receive Log
- A :
-
Send Log and Receive Log
You can omit this parameter only when the parameter "I" is specified (Specifying this parameter and the parameter "I" at the same time is not allowed).
- ID=fileid
-
File ID of the log record to be deleted (Optional)
Specify this parameter as an alphanumeric character string of 50 bytes or less.
For an instant transfer, specify "_INSTANT_TRANSFER_".
When omitted, all file IDs are targeted by this command.
- FROM=DATE1 TO=DATE2
-
Date of the log record to be deleted (Optional)
Specify this parameter in numbers of 8 bytes in length.
When the "FROM=" is omitted, all the log records on and before the date that you specify for the "TO=" become the target of this command.
When the "TO=" is omitted, all the log records on and after the date that you specify for the "FROM=" become the target of this command.
When both are omitted, log records of all dates become target of this command. You must specify the date according to the format specified as Date Format (DATEFMT) in the System Environment Settings, and DATE1 must be earlier than or equal to DATE2.
The log record of the dates you specified for the Date1 and the Date2 are included in the target records to be deleted.
HULFT searches start dates of sending or receiving.
- I
-
Interactive mode (Optional)
Enter a file ID and a range of date, following the displayed message.
- DAY=day
-
Number of days to be exempted from deletion of log records (Optional)
Specify this parameter in the range of "1" to "366".
Specifying this parameter leaves the log records from the specified number of days ago and deletes the rest.
- LASTWEEK
-
Deletion of log records up to the previous week (Optional)
Specifying this parameter deletes the log records that have been kept on and before previous Saturday (Including the log record of the previous Saturday).
- LASTMONTH
-
Deletion of log records up to the previous month (Optional)
Specifying this parameter deletes the log records that have been kept on and before the last day of previous month (Including the log record of the last day of the month).
- G
-
Control of error messages that the Send and Receive Log Deletion command outputs (Optional)
When omitted, HULFT displays error messages.
- OUTPUT=filename
-
Destination of the error messages that the Send and Receive Log Deletion 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 Send and Receive Log Deletion 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.
-
You cannot specify parameters related to date (namely, "FROM=", "TO=", "DAY=", "LASTWEEK", "LASTMONTH")more than once.
-
In interactive mode ("I"), you can use only "FROM=" or "TO=" among the parameters related to date.
-
Specifying the parameter value "A" for the type of log from which you want to delete log records deletes the log records in the Receive Log in some cases despite occurrence of an error.
Command interface
UTLLOG LOG( ) FILEID( ) FROM( ) TO( ) DAY( ) INTERACT( ) LIBRARY( ) MSG( ) FILE( ) MBR( )
Explanation of parameters
- LOG
-
Type of log from which you want to delete log records (Optional)
- S :
-
Send Log
- R :
-
Receive Log
- A :
-
Send Log and Receive Log
- FILEID
-
File ID of the log record to be deleted (Optional)
Specify this parameter as an alphanumeric character string of 50 bytes or less.
For an instant transfer, specify "_INSTANT_TRANSFER_".
When omitted, all file IDs are targeted by this command.
- FROM TO
-
Date of the log record to be deleted (Optional)
Specify this parameter in numbers of 8 bytes in length.
When the FROM is omitted, all the log records on and before the date that you specify for the TO become the target of this command.
When the TO is omitted, all the log records on and after the date that you specify for the FROM become the target of this command.
When both are omitted, log records of all dates become target of this command. You must specify the date according to the format specified as Date Format (DATEFMT) in the System Environment Settings, and FROM must be earlier than or equal to TO. The log record of the date you specified is included in the target records to be deleted.
HULFT searches start dates of sending or receiving.
- DAY
-
Number of days to be exempted from deletion of log records ("*NO" by default)
Specify this parameter in the range of "1" to "366".
Specifying this parameter leaves the log records from the specified number of days ago and deletes the rest.
Specifying "*LW" deletes the log records that have been kept on and before previous Saturday (Including the log record of the previous Saturday).
Specifying "*LM" deletes the log records that have been kept on and before the last day of previous month (Including the log record of the last day of the month).
- INTERACT
-
Interactive mode ("*NO" by default)
Enter a file ID and a range of date, following the displayed message.
- *NO :
-
Deletes log records in non-interactive mode
- *YES :
-
Deletes log records in interactive mode
- 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.
Specifying the parameter value "A" for the type of log from which you want to delete log records deletes the log records in the Receive Log in some cases despite occurrence of an error.
(2) Example of entry in interactive mode
Specifying Classification of Sending and Receiving
When you run the command with the parameter "I" specified, the following message appears:
PLEASE SELECT NUMBER. 1:DELETE RECEIVE INFORMATION. 2:DELETE SEND INFORMATION. 3:DELETE RECEIVE & SEND INFORMATION. 9:QUIT.
If you want to delete log records from the Receive Log, enter "1".
If you want to delete log records from the Send Log, enter "2".
If you want to delete log records from both the Receive Log and the Send Log, enter "3".
If you want to cancel the process, enter "9".
Enter File ID
If you omitted the file ID parameter when running the deletion command, enter the target file ID after the following message appears:
PLEASE INPUT FILE ID.(DEFAULT IS ALL)
>File ID
If you want to omit this, press only the Enter key.
If omitted, all File IDs are targeted for deletion.
Enter Range of Dates
If the date range targeted for deletion is omitted and the command is started, enter the date range targeted for deletion after the message shown below:
FROM (DEFAULT IS OLDEST)
>Date(YYYYMMDD)
TO (DEFAULT IS LATEST)
>Date(YYYYMMDD)
If you want to omit this, press only the Enter key.
When omitted, all dates are targeted for deletion.
When File ID and date range are entered correctly, the following confirmation message is displayed.
SURE ? (Y/N)
If you want to delete, enter "Y".
If you want to cancel the deletion, enter "N".
When the data that you specified does not exist in the Send Log file and the Receive Log file, the following message appears and the process ends:
UTLLOG :HUL1253 OBJECT RECORD NOT EXIST
The date format varies depending on a value of the Date Format (DATEFMT) that is specified in the System Environment SettingsFor details, refer to Administration Manual.