Previous Topic: SyntaxNext Topic: SELECT


Parameters

Valid rid values for each supported file format include the following:

ESDS

Relative byte address (RBA), expressed in a 4-byte hexadecimal format, as follows:

X'hh…'

Hexadecimal

KSDS

The record key, expressed in either of the following ways:

C'c…'

Character—matches specified case

X'hh…'

Hexadecimal

RRDS

Relative record number (RRN)

Sequential

Actual record number. Valid values are 1 – 999,999,999

Note: When using a hexadecimal value, you must supply an even number of hexadecimal characters.

Example 1

These example syntaxes for a KSDS file begin with the record that has the key value of character 1000. If that key does not exist, processing begins with the subsequent record.

In this example if the record key C'1000' did not exist, the next record greater than C'1000' is where printing would begin.

PRINT,
  RID(C'1000'),
  DIRECTION(FORWARD)

In this example if the record key C'1000' did not exist, the next record less than C'1000' is where printing would begin.

PRINT,
  RID(C'1000'),
  DIRECTION(BACKWARD)

Example 2

For RRDS and sequential files, copying begins with the 32nd record of the input data set, default value SYSUT1.

COPY,
  RID(32)