Record Range List

A record range list specifies a group of records to be processed. All record numbers used in the record range list are 1-relative; that is, the first record of a file is record 1.

<record range list>

── RECORD ──<record number>─┬──────────────────────────┬───────────────┤
                            ├───────────┬─<count>──────┤
                            ├─ INCLUDE ─┘              │
                            └─ THRU ─┬─<record number>─┤
                                     └─ END ───────────┘

Explanation

RECORD <record number>

Causes only the record given by the record number to be processed. Record number is an integer.

RECORD <record number> <count>

RECORD <record number> INCLUDE <count>

Cause the range to begin with the record specified by the record number and to include the number of records specified by count. Count is an integer.

RECORD <record number> THRU <record number>

Includes all records from the first record number through the second record number, inclusive. The second record number must be greater than the first record number.

RECORD <record number> THRU END

Includes all records beginning with the record number through the end of the file.

Example 1

The following range consists only of record 5:

RECORD 5

Example 2

The following range consists of records 5, 6, and 7:

RECORD 5 3

Example 3

The following range consists of records 5, 6, 7, 8, and 9:

RECORD 5 THRU 9

Example 4

The following range consists of records 5 through the end of the file:

RECORD 5 THRU END

Considerations for Use

You can use a list that contains a mixture of record range lists and skip specifications. However, after you specify END in either one, you cannot specify any other record range lists or skip specifications.