The START Statement

The START Statement 1

Statement Format 1

Statement Options. 1

File-Name. 1

Key-Name. 1

Operator 1

Value. 1

 

START positions an indexed file so that a following sequential read will read from the Start record. For example: -

            START VSFILE1 GROUP1.VSFILE1-KEY-AREA >= EZT-EZTPOINT-Data.VSFL-KEY;

Statement Format

START File-Name Key-Name Operator Value

Statement Options

File-Name

This must name a keyed file, i.e. a VSAM or similar file – not sequential, not SQL.  The file definition must identify one of its fields, or a field group, as its record key.  For example: -

DEFINE RDFile TYPE(VSAM) DATA(

    KEYFIELDS GROUP KEY,

        REGION FIXED(3),
        DISTRICT
FIXED(3),

    ENDGROUP,

    NAME CHAR(30));

Or

DEFINE VSFILE1 VSAM DATA(

    GROUP1 GROUP,

        VSFILE1-KEY-AREA CHAR(26) CAPS KEY,

        VSFILE1-DATA-AREA CHAR(18),

        End GROUP,

Key-Name

If you name the key as $KEY, the name of the group or field defined with the KEY property will replace $KEY.  For example

            START RDFILE $KEY … =>  START RDFILE KEYFIELDS

            START VSFILE1 $KEY … =>  START VSFILE1 GROUP1.VSFILE1-KEY-AREA

The key-name must be a field or group defined with a KEY option (KEY, UKEY, or DKEY)

Operator

This defines the relationship between Key-Name and Value.  It may be one of =, >, >=, <, <=, or their character equivalents EQ, GT, GE, LT, LE (which will be changed to the symbolic form).

Value

This is a field or constant that is compatible with Key-Name.