Note on usage
Function: Delete log records or offline log files
User group: FT administrator, FTAC administrator
Alias name: FTDELLOG
Functional description
With DELETE-FT-LOGGING-RECORDS 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.
You save the log records, for example, by redirecting the output of SHOW-FT-LOGGING-RECORDS (see section “SHOW-FT-LOGGING-RECORDS”) to a file in CSV format (for more information, see SHOW-FT-LOGGING-RECORDS):
/ASSIGN-SYSLST LOGGING FILE
/SHOW-FT-LOGGING-RECORDS...,NUMBER=*ALL,OUTPUT=*SYSLST(*CSV)
When backing up logging records, CSV format should be preferred to the default format since in this format all the information is backed up “in a single line” and a variety of tools can be used for the further processing of the information.
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. To prevent inconsistencies, it is not possible to use the K2 key to interrupt the command.
In this case the following procedure is recommended:
Switch the log file using MODIFY-FT-OPTIONS 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 SHOW-FT-LOGGING-RECORDS.
Delete the offline log file using DELETE-FT-LOGGING-RECORDS .
Format
DELETE-FT-LOGGING-RECORDS / 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.
Please note that the FTAC logging records can only be deleted by the FTAC administrator.
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.
Command return codes
(SC2) | SC1 | Maincode | Meaning |
0 | 0 | CMD0001 | No log records available for the selection criteria. |
83 | 32 | CMD0221 | Internal error. |
34 | 64 | FTR1034 | Command only permissible for FT or FTAC administrator. |
35 | 64 | FTR1035 | Command only permissible for FT administrator. |
36 | 64 | FTR1036 | User not authorized for other user IDs. |
SC1/2 = Subcode 1/2 in decimal notation For additional information, see section “Command return codes”. |
Example
The FT administrator wishes to delete all FT log records from the current log file, but not FTAC and ADM log records (if these are present):
/DELETE-FT-LOGGING-RECORDS
SELECT=*PARAMETERS(LOGGING-DATE=*TOMORROW, -
/
RECORD-TYPE=*PARAMETERS(FTAC=*NONE,ADM=*NONE))