Previous Topic: Title StatementNext Topic: Sample Control File


Selection Statement

Purpose

The selection statement specifies criteria for selecting 01-level records to be included in the cross-reference information for the descriptive title specified in the title record. This statement can specify three variables: the program name, the record name, and a qualification (that is, and FD file name, WORKING STORAGE, or LINKAGE). The variables specified restrict record selection. One, two, or all three of these variables can be specified. Typically, multiple selection statements are specified following each title statement.

Coding rules

The selection statement can be coded anywhere using positions 1 through 72.

Syntax

►►─┬────────────────┬─ : ─┬───────────────┬───────────────────────────────────►
   └─ program-name ─┘     └─ record-name ─┘

 ►─┬────────────────────────────────┬─────────────────────────────────────────►◄
   ├─ IN ─┬─┬─ FD-file-name ──────┬─┘
   └─ OF-─┘ ├─ 'WORKING-STORAGE' ─┤
            └─ 'LINKAGE' ─────────┘

Parameter list

program-name

Specifies a PROGRAM-ID name. This specification restricts record selection to records in the named program. Program-name must be the internal program name unless that name has been changed by the runtime options MEMBER-NAME-IS-ID and LIBRARY, or by the runtime option PROGRAM-ID. When these options are used to rename programs (that is, in the parameter statement) the new name must be used when specifying program-name.

:

The colon (:) is required and must be specified regardless of other entries specified.

record-name

Specifies the name of an 01-level record as it appears in a source program. This specification restricts record selection to the named record.

IN/OF

Specifies an FD file name used in a source program or the keywords 'WORKING-STORAGE' or 'LINKAGE'. This specification restricts record selection to records associated with the FD name specified or to records located in the WORKING STORAGE or LINKAGE sections of the programs being processed. WORKING-STORAGE and LINKAGE must be enclosed in single quotes. At least one space is required on either side of IN or OF.

Example statement

A sample selection statement is shown below. This statement specifies that all records named TRF-IN-REC are to be selected.

:TRF-IN-REC