Sequential-only processing of database files

If your program processes a database file sequentially for input only or output only, you might be able to improve performance by specifying the sequential-only processing (SEQONLY) parameter on the Override with Database File (OVRDBF) or the Open Database File (OPNDBF) command.

To use SEQONLY processing, the file must be opened for input-only or output-only. The NBRRCDS parameter can be used with any combination of open options. (The Open Query File (OPNQRYF) command uses sequential-only processing whenever possible.) Depending on your high-level language specifications, the high-level language can also use sequential-only processing as the default. For example, if you open a file for input only and the only file operations specified in the high-level language program are sequential read operations, then the high-level language automatically requests sequential-only processing.
Note: File positioning operations are not considered sequential read operations; therefore, a high-level language program that contains positioning operations does not automatically request sequential-only processing. (The SETLL operation in the RPG language and the START operation in the COBOL language are examples of file positioning operations.) Even though the high-level language program cannot automatically request sequential-only processing, you can request it using the SEQONLY parameter on the Override with Database File (OVRDBF) command.

If you specify sequential-only processing, you can also specify the number of records to be moved as one unit between the system database main storage area and the job's internal data main storage area. If you do not specify the sequential-only number of records to be moved, the system calculates a number based on the number of records that fit into a 4096-byte buffer.

The system also provides you a way to control the number of records that are moved as a unit between auxiliary storage and main storage. If you are reading the data in the file in the same order as the data is physically stored, you can improve the performance of your job using the NBRRCDS parameter on the OVRDBF command.
Note: Sequential-only processing should not be used with a keyed sequence access path file unless the physical data is in the same order as the access path. SEQONLY(*YES) processing might cause poor application performance until the physical data is reorganized into the access path's order.