Monday, 11 August 2014

COBOL Start Statement | COBOL START Position Example.

COBOL Tutorial
COBOL START KEY Tutorial
The START statement enables the programmer to position the relative file at some specified point so that subsequent sequential operations on the file can start from this point instead of the beginning. 
They KEY IS phrase indicates how the file is to be positioned. 
The data-name in this phrase must be the data-name in the RELATIVE KEY phrase of the SELECT . . . ASSIGN . . . clause. 

When the EQUAL TO or NOT LESS THAN condition is specified, the file is positioned at the point indicated by the relative key-data item. 

When the GREATER THAN condition is specified, the file is positioned at the next relative position of the position indicated by the RELATIVE KEY data item.

COBOL Tutorial
COBOL START Statement.

Before you issue a Start statement, you must place a key value in the Record Key field. Then, the Key clause of the Start statement establishes the first record to be processed. As you can see, that record can have a value that’s either equal to, greater than, or greater than or equal to the value you specify.
Example : 
COBOL Tutorial
COBOL START STATEMENT EXAMPLE.

No comments:

Post a comment