Previous Topic Next topic Print topic


Indexed File Access

You can use both the primary and alternate keys to read records from an indexed file, either directly (random access) or in key sequence (sequential access). The access mode can be:

The method of accessing an indexed file is defined using the ACCESS MODE IS clause in the SELECT clause, for example:

 file-control.
     select idxfile assign to "idx.dat"
         organization is indexed
         access mode is dynamic
         record key is idxfile-record-key
         alternate record key is idxfile-alt-key.
Previous Topic Next topic Print topic