Operation using automatic log deletion

It is possible to delete older log records when the number of log records reaches a certain count (threshold). With this function, you can limit the number of log records.

Each processing program checks the log record count after it outputs the log, and if the program finds that the number of log records has exceeded a threshold, it deletes older records so that only the set number of log records remain.

Use the Log Deletion Threshold (LOGDELTHRESHOLD) and the Log Keep Count (LOGKEEPCOUNT) in the System Environment Settings file (HULFT.PARMLIB(HULPRM)) to set a threshold and a log record count to be kept, respectively. For details about the System Environment Settings file, refer to System Environment Settings.

Shown below is an illustration of the flow of log record deletion.

Figure 2.34 Processing of Log Record Deletion

1) Record count check

Each processing program checks the log record count after it outputs the log.

2) Log deletion

If the record count check finds that the number of log records has reached the threshold, the program deletes older log records, retaining only the set number of records.

Note
  • The set threshold does not apply to the entire record count of log records that are stored in the Send and Receive Log file (HULFT.LOG).

    Instead, the threshold applies to the record count of each type of log record (the Send Log, the Receive Log, or the Observe Log).

    Each Job Execution Log record is linked to the log record of sending or receiving for which the corresponding Post-send Job or Post-receive Job is executed.

    Deleting Send Log records deletes the Post-send Job Execution Log records that are linked to the records.

    Deleting Receive Log records deletes the Post-receive Job Execution Log records that are linked to the records.

  • For processing of automatic log record deletion, each processing program that outputs log records creates a task that carries out deletion asynchronously. Therefore, creation of a task may take some time depending on the timing of the task creation, and thus cause the record count to exceed the threshold.

  • If a VSAM error occurs in the Send and Receive Log file (HULFT.LOG), automatic log record deletion is not carried out. In this case, after solving the VSAM error, execute the Program to Add Information on Log Record Count (XRLOGCNT), and restart HULFT resident jobs (the Send program (XRSND), the Receive program (XRRCV), and the Observe program (XRACCPT)).

  • Even when automatic deletion of log records is carried out, fragmentation of the Send and Receive Log file (HULFT.LOG) will occur. Reorganize the Send and Receive Log file (HULFT.LOG) at regular intervals.

  • When changing the number of records set in Log Deletion Threshold or Log Keep Count to a larger value, confirm that the specified number of records can be stored in the Send and Receive Log file. If the Send and Receive Log file is an insufficient size, create the Send and Receive Log file again with a sufficient size.