|
| Total Answers and Comments: 3 |
Last Update: April 30, 2009 Asked by: P_KARTHIKKUMAR |
|
| | |
|
Submitted by: memays Actually, the START command does not READ anything. It simply sets the location pointer to the file for a subsequent READ command.
For random reading, the key of the desired record (or part of the key) must be supplied, which causes the specific record which matches(in the case of READ EQUAL TO) to be retrieved. Unless the key is changed, subsequent READ's would return the same record repeatedly.
In cases where a group of records (but not the whole file) need to be read sequentially, the START statement is used to position the file pointer to the 1st record to be read. Subsequent READ NEXT statements will then read sequentially from that point.
In dynamic mode, START is optional, and the same result can be accomplished by using a direct READ by key to retrieve the 1st record of the set, followed by READ NEXT statements to retrieve subsequent records.
Above answer was rated as good by the following members: rkrishnamf | Go To Top
|