Command statements


This section describes the command statements that enable you to use File-AID for IMS/FLEX to update a database and to count and print segments in a database.

The following considerations relate to the command statements:

  • Command statements are supplied as 80 byte records of a fixed or fixed block sequential dataset or as a member of a partitioned dataset. See FLEX JCL for a description of the JCL needed to execute the statements in File-AID for IMS/FLEX.
  • A command statement starts with a primary command and ends with a semicolon.
  • Each command statement is independent of the preceding statement.
  • The implicit database position at the start of each statement is at the beginning of the database.

Some commands and keywords can be abbreviated. See Abbreviations.

Refer to Related Publications for an explanation of how to read the "railroad logic" diagrams used to notate the syntax of commands and keywords.

Commands fall into two categories: environment and action.

Environment primary commands are as follows:

PSB

Identifies the target database name or the PCB of the target database to be processed.

SET

Overrides the system processing defaults.

TITLE

Defines the title of a report.

TYPE

Specifies whether the command statements are to be validated only or validated and immediately executed.

SETEXTRACT

Overrides system defaults for the EXTRACT sub-command.

These commands must be followed by at least one keyword. For example:

   TYPE RUN;

TYPE is the primary command; RUN is the keyword.

See Environment-primary-commands for a complete description of these primary commands and their use.

Action primary commands are as follows:

COUNT

Counts segments, extracts concatenated keys of segments, or both.

INSERT

Inserts an occurrence of the specified segment into a database.

PRINT

Prints a single segment, all segments for a record, or all children for a parent in formatted or unformatted mode or prints fields in formatted mode.

SELECT

Applies segment selection criteria to select specific segments for processing. Sub-commands are then used to change, count, delete, insert, print, and/or extract the selected segments.

Action commands must be followed by at least one SEGMENT object keyword. Optional keywords are entered, as needed, to attain the desired results. For example:

    PRINT SEGMENT=CUST010 MAX=ALL;

PRINT is the primary command; SEGMENT is the object keyword; MAX is an optional keyword.

Refer to Action Primary Commands for a complete description of these primary commands and their use. There are two object keywords, SEGMENT and CHILD, that are described in Object-keywords. Refer to Optional-keywords for a description of all the optional keywords.

All command statements are validated prior to execution. The validation process first checks each command statement for correct syntax, command and keyword consistency, completeness, and IMS validity.

A syntactically correct command is then cross-checked with the database for validity. For example: Are the field names valid in the SET or WHERE statements; does a request for a root segment in an HDAM database use partial keys or Boolean calls? The validity check does not guarantee that a specific data segment exists. If no errors are detected, the process proceeds based on the TYPE command keyword. The default is RUN.

This section provides information about the following topics:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*