Previous Topic: Performing Query Table Maintenance (DQLIBRMT)Next Topic: Sample Control Statements


Utility Maintenance Control Statements

Use the following maintenance control statements to identify the maintenance functions to be performed by DQLIBRMT. A maximum of 60 report and maintenance control statements are allowed.

SIGN/ON

(Required) Specifies the user ID and password. Only one SIGN/ON statement is allowed and it must be the first statement in the job stream.

BACKUP

(Optional) Copies specified members on the Query Library Table to a sequential tape or disk file. Multiple backup statements are allowed, but all members to be backed up are written to one backup data set.

RESTORE

(Optional) Adds members to the Query Library Table from a sequential tape or disk file created using the DQLIBRMT backup facility. Only one RESTORE statement is permitted per run. All records on input are restored to the Query Library Table using the user from the same option as the control statement. If the control statement member option is used, only that member on the input file is restored.

ADD

(Optional) Adds a query, dialog, term, PROC, or JCL to the Query Library Table for the specified users, dates or groups. Supply the text of the item being added on multiple lines following the ADD statement.

REMOVE

(Optional) Removes queries, dialogs, terms, PROCs, or JCL from the Query Library Table for the specified users, dates or groups. Multiple REMOVE statements can be used. Only one user can be named on each REMOVE statement.

Maintenance on the Query Library Table is performed before a REPORT control statement, even if the REPORT control statement appears before a maintenance control statement. If you want a report to reflect the state of the table before any maintenance, execute the REPORT control statement in a separate job step, before executing any type of maintenance on the table.

Control Statement Format

All control statement types are formatted as follows:

When adding a member to the query library, the member to be added is supplied by one or more 80-byte input statements following the ADD statement. A DQLIBRMT control statement in column 1 is interpreted as end of query text input. Therefore, no statement containing text to be added should begin with a DQLIBRMT control type in column 1, such as SIGN/ON, REPORT, RESTORE, BACKUP, REMOVE, ADD, or USER.

1-10

Identifies the type of control statement. Valid entries are: BACKUP, RESTORE, ADD, REMOVE. Left justify the value with trailing blanks. For BACKUP and REMOVE you must insert 4 blanks, for RESTORE insert 3 blanks before the option keyword.

11-72

Specifies the option key words and their values. You can enter the options in any order. Use the following format:

               ┌──────────────────────────────┐
►►─ STATEMENT ─▼─ OPTION=value,MEMBER=value, ─┴───────────────────────────────►◄

There are no spaces in the keyword portion of the statement. An equal sign (=) separates an option from its value and a comma (,) separates options. Do not enter options past column 72. Following is a sample input statement:

 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
 BACKUP    NAME=userid,MEMBER=dqqmem

Select any of the following options:

STATUS=

Designates which type of member is to be processed. This option can appear on all statements except the REMOVE statement.

Valid Entries:

PUBLIC, PRIVATE, or ALL

Default Value:

ALL

MEMBER=

Designates the QUERY, DIALOG, or JCL member name. If specified, the maintenance function affects all library members of this name that meet selection criteria (user ID, groups, or date, status, and type) and those that the signon statement user is permitted to access. To avoid duplication, if there are multiple members of the same name on the restore input file, groups and status keywords must be used to distinguish which is to be restored to the file with the userid on the NAME= keyword.

This option can appear on all functions. Do not use if TYPE=JCL.

Valid Entries:

A 1- to 15-character Query Library Table member name.

Default Value:

(No default)

TYPE=

Specifies the type of Query Library Table member to be processed by the maintenance function.

Valid Entries:

TERM, SQL, SQLD, QUERY, DIALOG, PROC, or ALL. Use JCL for BACKUP, RESTORE, and REMOVE only if DATE= and MEMBER= are not used.

Default Value:

ALL

GROUPS=

List of groups used to select members for processing. Is edited against SIGN/ON user's groups.

Valid Entries:

One to three group names of 1 to 15 characters separated by commas.

Default Value:

(No default)

NAME=

Designates the USER ID. Used to select members for processing on Backup and Restore requests. This option is required for the USER and RESTORE statements. On Restore requests, this userid will be assigned to all queries selected for Restore.

Valid Entries:

A 1- to 32-character user ID.

Default Value:

(No default)

DATE=

Date the query was last accessed in MM/DD/YY format. Used to select members for processing. BACKUP, RESTORE, or REMOVE will honor anything equal to or prior to the date specified here. Do not use if TYPE=JCL.

Valid Entries:

A valid access date.

Default Value:

(No default)

FILE=

(z/VSE only) Specifies whether the input table for RESTORE or the output table for BACKUP is to reside on TAPE or DISK.

Valid Entries:

DISK or TAPE

Default Value:

(No default)

Control Statement Options

The following list describes valid options for each statement:

Control Statement Function

Valid Options
(Use only 1 of italicized
options)

Required YES/NO

Default Value

ADD

NAME
MEMBER
TYPE
STATUS
GROUPS

YES
YES
NO
NO
NO

No default
No default
DQL Query
Private
No groups

BACKUP

NAME
GROUPS
DATE
STATUS
MEMBER
FILE (z/VSE only)
TYPE

YES
YES
YES
NO
NO
YES
NO

No default
ALL
ALL
ALL
ALL MEMBERS
No default
ALL

RESTORE

NAME
GROUPS
MEMBER
FILE (z/VSE only)
STATUS

YES
NO
NO
YES
NO

No default
ALL
ALL MEMBERS
NONE
ALL

REMOVE

NAME
GROUPS
MEMBER
TYPE
DATE

YES
YES
NO
NO
YES

No default
No default
ALL MEMBERS
ALL
No default

Note: Options in italics are mutually exclusive, within their respective functions. You can execute a BACKUP with the NAME, or GROUPS, or DATE option. One of the three is required, but not a combination of the three options; they are mutually exclusive.