Syntax:
RANDOM (*YES | *NO)
Comments:
RANDOM specifies whether random database processing using Keys and RRNs is allowed. *Yes is the default.
*YES - is the default and specifies that Random database processing using Keys and RRNs on opcodes such as SETLL, CHAIN, etc., is allowed.
*NO - specifies that Random database processing using Keys and RRNs is not allowed. This option is commonly used when the Keys look different at runtime from the compile time. The common scenario is when using Query Key Fields and under this scenario *NO option must be used to avoid a runtime exception.
The only I/O operations allowed are:
Input - Read, ReadP and Setll with *Start or *End as the Keys. Any other operations throw compiler error - "Random Access Operation Not Allowed For File". The results of Read and ReadP depend on the ORG option and if *INDEXED read them sequentially based on the Key of the file and *ARRIVAL reads in arrival sequence in the file.
See Also: