Usually, when you use the Open Database File (OPNDBF) command, you use the defaults for the command parameter values. Sometimes you might want to specify particular values, instead of using the default values. Listed here are the parameters you can specify.
If the file has a keyed sequence access path and either (1) the open option is *OUT, or (2) the open option is *INP or *ALL, but your program does not use the keyed sequence access path, then you can specify ACCPTH(*ARRIVAL) on the OPNDBF parameter. Ignoring the keyed sequence access path can improve your job's performance.
Specify *YES if the application programs use commitment control. If you specify *YES, you must be running in a commitment control environment (the Start Commitment Control (STRCMTCTL) command was processed) or the OPNDBF command will fail. Use the default of *NO if the application programs do not use commitment control.
Specify whether you want duplicate key feedback. If you specify *YES, duplicate key feedback is returned on I/O operations. If you specify *NO, duplicate key feedback is not returned on I/O operations. Use the default (*NO) if the application programs are not written in the COBOL/400® language or C/400® language, or if your COBOL or C programs do not use the duplicate-key feedback information that is returned.
If an identifier other than the file name is to be used, you must specify it. The open identifier can be used in other control language (CL) commands to process the file. For example, the Close File (CLOF) command uses the identifier to specify which file is to be closed.
This parameter specifies the scoping of the open data path (ODP). Specify *ACTGRPDFN if the request is from the default activation group, and the ODP is to be scoped to the call level of the program issuing the command. If the request is from any other activation group, the ODP is scoped to that activation group. Specify *ACTGRP if the ODP is to be scoped to the activation group of the program issuing the command. Specify *JOB if the ODP is to be scoped to the job. If you specify this parameter and the TYPE parameter you get an error message.
Specify *YES if subsequent application programs process the file sequentially. This parameter can also be used to specify the number of records that should be transferred between the system data buffers and the program data buffers. SEQONLY(*YES) is not allowed unless OPTION(*INP) or OPTION(*OUT) is also specified on the Open Database File (OPNDBF) command. Sequential-only processing should not be used with a keyed sequence access path file unless the physical data is in access path order.