Switching log files

As described in the Managing monitor activity tracking topic, when one log file is full, or when certain log criteria are met, the log file switches from the current file to the alternate file. This topic describes the switch procedure.

Related topics

Every time a monitoring file is switched, Transfer CFT executes the procedure defined by the EXEC parameter of the CFTLOG object. When you activate Transfer CFT, at least one of the LOG files must be empty. The empty file is the one assigned as log file for the monitor session.

The file opened by Transfer CFT to receive the messages must be empty. This procedure has to prepare an empty LOG or ALOG file for the next switch.

The symbolic variables &SYSTIME, &SYSDATE, &FLOG, accessible from the SWITCH procedure, are used to locate the name of the last log file used by Transfer CFT.

A typical SWITCH procedure involves:

  • Saving, printing or using the current log file, either LOG or ALOG
  • Creating a new empty log file, either LOG or ALOG

At the time the log file is switched, Transfer CFT closes the current file and opens the alternate file for writing. If this file is not empty, the logging is then automatically performed to an operator.

The Transfer CFT checks for the existence of the associated switch procedure file, value of the EXEC parameter of the CFTLOG command, copies the command file into a reserved file substituting as necessary the symbolic variable &FLOG, and then submits this file for execution.

According to the system, the reserved file may be a temporary file, the name of which is generated by Transfer CFT. Refer to the Transfer CFT Operations Guide that corresponds with your OS.

Related Links