Keyed: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Keyed access to files allows access according to a specified key (or part of the file).  
[[Key]]ed access to files allows access according to a specified [[key]] (or part of the file).  


This method causes the file pointer to locate the record you want starting with the one containing a specified value in the data field. If the system finds that there is no record with such a value, it goes on to access the first record containing a data value higher than that which was entered.
This method causes the file pointer to locate the record you want starting with the one containing a specified value in the data field. If the system finds that there is no record with such a value, it goes on to access the first record containing a data value higher than that which was entered.


The keywords "SEQUENTIAL", "RELATIVE", and "KEYED" are optional parameters for [[Open Internal]] and [[Open External]] statements, that specify the method of access. The default is SEQUENTIAL access, which means that the file will be read one at a time, in order, from start to finish.  
The keywords "SEQUENTIAL", "RELATIVE", and "KEYED" are optional parameters for [[Open Internal]] statements, that specify the method of access. The default is SEQUENTIAL access, which means that the file will be read one at a time, in order, from start to finish.  


See also
See also
*[[Open Internal]]
*[[Open Internal]]
*[[Open External]]
*[[Chapter 16]] of the BR Tutorial
*[[Chapter 16]] of the BR Tutorial



Latest revision as of 20:10, 6 May 2014

Keyed access to files allows access according to a specified key (or part of the file).

This method causes the file pointer to locate the record you want starting with the one containing a specified value in the data field. If the system finds that there is no record with such a value, it goes on to access the first record containing a data value higher than that which was entered.

The keywords "SEQUENTIAL", "RELATIVE", and "KEYED" are optional parameters for Open Internal statements, that specify the method of access. The default is SEQUENTIAL access, which means that the file will be read one at a time, in order, from start to finish.

See also