Note on usage
Function: Delete log records or offline log files
User group: FT administrator, FTAC administrator
The command can be entered under TSO.
Functional description
With FTDELLOG you can, as FT or FTAC administrator, delete log records for all login names and all record types (FT, FTAC, ADM) from the current log file.
You can also delete offline log files which are no longer required. Offline log files can only be deleted in their entirety. It is not possible to delete individual log records from an offline log file.
In principle, openFT can write any number of logging records (until the disk is full). The FT administrator should save the existing logging records (e.g. to tape or as a file in CSV format) and at regular intervals (weekly, for example, if there is a large number of requests) and delete older logging records. This means, firstly, that logging records are retained for a long period, thereby ensuring continuous documentation, and secondly, that memory space is not occupied unnecessarily.
The logging records are saved by redirecting the output of FTSHWLOG (see section“FTSHWLOG”) to a file, e.g. by executing the FTSHWLOG command as CLIST.
When deleting logging records, the disk storage occupied by the log file is not released. The free space within the file is, however, used to store new records. In the case of very large log files it may take several minutes to delete log records.
In this case the following procedure is recommended:
Switch the log file using FTMODOPT LOGGING=*CHANGE-FILES. The current log file is switched "offline". New log records are now written to a new log file.
After a certain time, evaluate all log files in the offline log file and archive them using FTSHWLOG.
Delete the offline log file using FTDELLOG .
Format
FTDELLOG |
SELECT = *ALL / *OWN / *PAR AMETERS(...) / *LOGGING-FILES (...) *PARAMETERS(...) OWNER-IDENTIFICATION = *ALL / *OWN / <name 1..8> ,LOGGING-DATE = *TODAY / *TOMORROW / <date 8..10> ,LOGGING-TIME = 00:00 / <time 1..8> ,RECORD-TYPE = *ALL / *PARAMETERS(...) *PARAMETERS(...) FT = *ALL / *NONE ,FTAC = *ALL / *NONE ,ADM = *ALL / *NONE ,LOGGING-ID = *ALL / <alphanum-name 1..12> *LOGGING-FILES(...) BEFORE = *TIME (...) *TIME = (...) DATE = <date 8..10> ,TIME = 00:00 / <time1..8> |
Operands
SELECT =
Selects a group of logging records.
SELECT = *ALL
Deletes all logging records.
SELECT = *OWN
Deletes all logging records of your own ID.
SELECT = *PARAMETERS(...)
OWNER-IDENTIFICATION =
User ID whose logging records are to be deleted.
OWNER-IDENTIFICATION = *ALL
The user ID is not a selection criterion.
OWNER-IDENTIFICATION = *OWN
Logging records of the own user ID are deleted.
OWNER-IDENTIFICATION = <name 1..8>
User ID whose logging records are to be deleted.
LOGGING-DATE =
Date before which the logging records are to be deleted.
LOGGING-DATE = *TODAY
If a time was specified explicitly with LOGGING-TIME, all log records that were written before this time are deleted. If no date was specified, openFT deletes all log records that were written up to midnight inclusive of the previous day.
LOGGING-DATE = *TOMORROW
All logging records that were created before the command was input are deleted.
LOGGING-DATE = <date 8..10>
Date in the format yyyy-mm-dd or yy-mm-dd, e.g. 2016-12-24 or 16-12-24 for the 24th of December, 2016. openFT then deletes only those logging records that were written before the date and time specified with LOGGING-TIME and LOGGING-DATE.
LOGGING-TIME =
Logging records written up to the specified time are deleted.
LOGGING-TIME = 00:00
If a date was specified explicitly with LOGGING-DATE, openFT deletes all log records written before the specified date. If no date was specified, openFT deletes all log records that were written up to midnight inclusive of the previous day.
LOGGING-TIME = <time 1..8>
Time for the day specified with LOGGING-DATE. openFT deletes all log records written before this time. You specify the time in the format hh:mm:ss, e.g. 14:30:10.
RECORD-TYPE =
Defines the type of logging records to be deleted.
RECORD-TYPE = *ALL
The record type is not a selection criterion.
RECORD-TYPE = *PARAMETERS(...)
Type of the logging record.
FT = *ALL / *NONE
Specifies whether or not the FT logging records are to be deleted.
FTAC = *ALL / *NONE
Specifies whether or not FTAC logging records are to be deleted.
ADM = *ALL / *NONE
Specifies whether ADM log records are deleted or not.
LOGGING-ID =
Selects the logging records on the basis of the logging ID.
LOGGING-ID = *ALL
The logging ID is not a selection criterion.
LOGGING-ID = <alphanum-name 1..12>
All logging records with a logging ID smaller than or equal to the specified value are deleted.
SELECT = *LOGGING-FILES(...)
Controls the deletion of offline log files. Offline log records cannot be deleted individually: only entire files can be deleted.
BEFORE = *TIME (...)
Deletes all the offline log files which were switched offline on or before the specified time (local time!) by switching the log file offline. This ensures that only log records which are at least as old as the specified time are deleted.
If you enter the current date or a date in the future, then all the existing offline log files are deleted.
DATE = <date 8..10>
Creation date in the format yyyy-mm-dd or yy-mm-dd, e.g. 2016-03-31 or 16-03-31 for March 31, 2016.
TIME = 00:00 / <time 1..8>
Time for the date specified with DATE. You enter the time in the format hh:mm:ss, e.g. 14:30:10.
Under some circumstances it may not be possible to immediately delete a log file which has just been switched to become an offline log file after it has been switched if the file still has synchronous requests open.
Example
The FT administrator wants to delete all existing FT log records from the current log file (If there is a large number of log records, this may take several minutes!). If FTAC is not installed, logging only contains FT log records and ADM log records where applicable. They are deleted with the following command:
FTDELLOG SELECT=*PARAMETERS(LOGGING-DATE=*TOMORROW)
The FT administrator does not need to specify the operand OWNER-IDENTIFICATION because the standard value *ALL applies.
However, if FTAC were used then this command would delete the FT and FTAC logging records and ADM logging records where applicable because both FT=*ALL and FTAC=*ALL and ADM=*ALL are default values for RECORD-TYPE. If only the FT logging records are to be deleted, but the FTAC and ADM logging records are to be retained, then the FT administrator must extend the command:
FTDELLOG SELECT=*PARAMETERS(LOGGING-DATE=*TOMORROW, -
RECORD-TYPE=*PARAMETERS(FTAC=*NONE,ADM=*NONE))
The FT administrator wants to delete all offline log files which are set to online by switching the log file before or on June 27, 2012.
FTDELLOG SELECT=*LOGGING-FILES(BEFORE=*TIME(2012-06-27))