Processing Files and Records
6.4 Reading Files
Reading a Relative File Randomly
Reading relative records randomly involves the following:
1. Specifying ORGANIZATION IS RELATIVE in the Environment Division
SELECT clause
2. Specifying ACCESS MODE IS RANDOM (or DYNAMIC) in the Environment
Division SELECT clause
3. Opening the file for INPUT or I-O
4. Moving the relative record number value to the RELATIVE KEY data name
5. Reading the record from the cell identified by the relative record number