Cleanup subtask

The cleanup subtask is not a batch utility, but an online component of the data store that is responsible for regularly eliminating superfluous records from the database. The records that are to be selected for deletion are identified according to user-defined criteria, which are specified in a member of the data store parameter library. Typically, records older than a certain interval of time, for example 1 day, are deleted, but the selection criteria allow you to treat some jobs differently from others.

The name of the member that contains the cleanup selection criteria is specified in the CLNPARM initialization statement for the data store. The syntax for the selection criteria is identical to that described for the batch cleanup utility above. When coding the selection criteria, be sure to include a catch-all criteria that matches all records and ensures that after a certain period of time all records are eventually deleted. This is essential to prevent the database from growing over time until it fills up and cannot store any more data. Syntax errors in the cleanup selection criteria cause the closure of the task, and cleanup actions are not therefore performed. In this case, you should correct the errors and restart the cleanup task manually, specifying S=ARCU on the modify command (P=ARCU stops the subtask). The cleanup subtask is activated on a periodic basis. The frequency with which it is activated is governed by the CINTERVAL initialization statement. A value of zero means that the Data Store Cleanup subtask is started at data store initialization, but never runs. Therefore, if CINTERVAL(0) is set, the user must schedule regular batch cleanups, otherwise the data store UDF and SDF files grow with no limits.