Deleting data from the database

You can delete data from the database using the one of the following keywords of the DSTUTIL command:
DELUNSTR
To delete the unstructured data
DELSTRUC
To delete the structured data
DELBOTH
To delete the structured and unstructured data
It is not possible to code separate cleanup actions for structured and unstructured data because the data store cleanup subtask accepts only one DSTUTIL statement. Therefore, to delete structured and unstructured data with different DSTUTIL statements, use the batch cleanup utility (EQQDSCL batch cleanup sample). The cleanup batch job can run only if the data store is stopped. If you decide to schedule data store cleanup using the EQQDSCL job, set DSTOPTS CINTERVAL(0). For details, see DSTUTIL.
Example:
DSTUTIL DELUNSTR
         SEARCH1(JBNMLKJOB00*,
                 SYCLEQU)
         SEARCH2(OLDRMM2)
         SEARCH3(JBIDEQJOB00467)
This command deletes records that match the following criteria:
  JobName  LIKE  'JOB00*'  and  SysClass = 'U'

or

  job  OLDER  then 2 months

or

  JobId  =  'JOB00467'