DSTUTIL

Purpose

The DSTUTIL statement defines the possible maintenance actions that can be done on the data store database, and are usually invoked by a batch program.

The maintenance cleanup actions (DELUNSTR/DELSTRUC/DELBOTH) can be done by means of the cleanup data store task (if specified in the member identified by the CLNPARM statement).

Format


1 DELSTRUC
1 DELUNSTR
2 ? DDNAME(ddn)
2  DELBOTH?  DDNAME (
3.1 ddn1,ddn2
2 )
1 EXPSTRUC
1 EXPUNSTR
3  DDNAME(ddn)
3  EXPBOTH?  DDNAME (
4.1 ddn1,ddn2
3 )
1 IMPORT
4  DDNAME(ddn)
1 REPLACE ( YES|NO)
1 RECOVER (primary)
6?  SEARCH1(value)
6?  SEARCH2(value)
6?  SEARCH3(value)
6?  SEARCH4(value)
6?  SEARCH5(value)
6?  SEARCH6(value)
6?  SEARCH7(value)
6?  SEARCH8(value)
6?  SEARCH9(value)
6?  SEARCH10(value)
6?  REPLACE(YES|NO)

Parameters

DELSTRUC|DELUNSTR|DELBOTH
Defines the criteria for deleting sysout from the data store database. It is possible to specify whether structured data (DELSTRUC) or unstructured data (DELUNSTR) are to be deleted. You can require to delete both types specifying DELBOTH.

The keyword DDNAME, if coded, identifies the DD name of a data set where the records will be copied before they are deleted from the database. When DELBOTH is coded, you must specify two DDnames, for the two different types of data: the first one is for the unstructured data, the second one is for the structured data).

The copy on a data set is allowed only in batch mode.

The SEARCHnn keyword (where nn can be a value from 1 to 10) identifies the criteria selected. The string value has the following format:
CodeNameComparisonOperFieldName
CodeName can assume the following values:
JBNM
Job name
JBDT
Date
JBTM
Time
JBID
Job ID
DSID
data set ID
STNM
Step name
PSNM
Procedure step name
DDNA
DD name
SYCL
SYSOUT class
OLDR
Older than
ComparisonOper can assume the following values:
EQ
Equal
NE
Not equal
GT
Greater than
GE
Greater or equal
LT
Less than
LE
Less or equal
LK
Like
UK
Unlike
MM
Month, used with OLDR codename only
DD
Days, used with OLDR codename only
HR
Hours, used with OLDR codename only
MN
Minutes, used with OLDR codename only
FieldName indicates the field where the selection is performed. For example, it can be a specific jobname if the JBNM codename has been used (JBNM EQ myjob causes all the job logs having the jobname equal to myjob to be deleted. For the LK operator, it can contain the wildcard * or ?).
Note: All dates must be specified in the format yyyymmdd. For example, the 22nd of July 2002 is coded as 20020722.
All the terms inside the SEARCHn key are logical ANDs, so they must be all true to select the sysout for the operation. The different search criteria (SEARCH1 to SEARCH10) are logical ORs, so at least one must be true to run the command.
EXPSTRUC|EXPUNSTR|EXPBOTH
Defines the criteria for exporting sysout records from the data store database. It’s possible to specify whether structured data (EXPSTRUC) or unstructured data (EXPUNSTR) are to be exported.

The keyword DDname is always required and identifies the DD name of a data set where the records will be exported. You can require to export both types specifying EXPBOTH: in this case, you must specify two different ddnames as values in the DDNAME clause. The first one is for the unstructured data, the second one is for the structured data).

The keywords used in the same clause have the same meaning specified for the parameters DELSTRUC/DELUNSTR/DELBOTH.

You can also specify selection criteria, coding the SEARCHnn keyword.

IMPORT
Defines the criteria for importing sysout records (previously stored in a sequential data set) into the data store database.

The keywords have the same meaning as those specified for the previous parameters. In addition, the REPLACE keyword specifies whether matching sysout records in the data store data base should be overwritten. The default is NO. One data set at a time can be imported (only one DDname can be coded). If both structured and unstructured data is to be imported, you must codify the parameter IMPORT twice, to process separately the structured and the unstructured export files. IMPORT can be used by the batch program only when data store is not operating.

You can also specify selection criteria, coding the SEARCHnn keyword.

RECOVER(PRIMARY)
Indicates that the batch program extracts a data set of keys for all sysout records stored in the data store database, to enable the recovery of a corrupted primary key data set. The EQQPKREC DD statement in the batch JCL identifies the name of the extracted data set. It can be used by the batch program only when the data store is not operating.

In this case, you cannot use SEARCHnn keyword to specify selection criteria, because it is not accepted.