Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
The Open Database File (OPNDBF) command opens a database file member. Processing of records is done later by application programs that do shared open operations.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | File | Qualified object name | Required, Positional 1 |
Qualifier 1: File | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OPTION | Open option | *INP, *OUT, *ALL | Required, Positional 2 |
MBR | Member to be opened | Name, *FIRST, *LAST | Optional, Positional 3 |
OPNID | Open file identifier | Name, *FILE | Optional, Positional 4 |
ACCPTH | Access path to use | *FILE, *ARRIVAL | Optional |
SEQONLY | Limit to sequential only | Element list | Optional |
Element 1: Sequential only | *NO, *YES | ||
Element 2: Number of records | Integer | ||
COMMIT | Commitment control active | *NO, *YES | Optional |
OPNSCOPE | Open scope | *ACTGRPDFN, *ACTGRP, *JOB | Optional |
DUPKEYCHK | Duplicate key check | *NO, *YES | Optional |
TYPE | Type of open | *NORMAL, *PERM | Optional |
Top |
Specifies the file that contains the member to be opened. Overrides currently in effect are processed.
This is a required parameter.
Qualifier 1: File
Qualifier 2: Library
Top |
Specifies the options to use to open a file. The options chosen on the first full open operation of a file are not changed on subsequent shared options.
This is a required parameter.
Top |
Specifies the member to open in the database file.
Top |
Specifies the identifier used for naming this open operation so it can be referred to when the member is closed or positioned. This identifier must be specified on the Close File (CLOF) command, and on the Position Database File (POSDBF) command. It is not used on another Open Database File (OPNDBF) command until the file is closed, or an escape message is sent and the open operation fails.
Top |
Specifies which access path to use for this open operation.
Top |
Specifies, for database files whose records are normally processed in sequential order, whether sequential-only processing is used on the file. This parameter also specifies the number of records transferred as a group to or from the database file if sequential-only processing is used. If an override specifying sequential only processing is in effect, it takes precedence over what is specified on this parameter.
Note: If *ALL is specified for the Open option (OPTION) parameter or *YES is specified for the Commitment control active (COMMIT) parameter, the *NO value is used for this parameter.
Element 1: Sequential only
Element 2: Number of records
Top |
Specifies whether this file is placed under commitment control.
Before a database file is opened under commitment control, the user must ensure that all files in the commitment transaction are journaled. If only the after images are being journaled, the system implicitly begins journaling both the before and the after images for the duration of the changes being made to files opened under this commitment definition.
Top |
Specifies the extent of influence (scope) of the open operation.
Top |
Specifies whether duplicate key checking is done on input and output operations opened by this command.
Top |
Specifies the recursion level at which the reclaim resources function (RCLRSC) is effective.
Note: This parameter is not valid when the Open scope (OPNSCOPE) parameter is specified.
Top |
OPNDBF FILE(MASTER/PAYROLL) OPTIONS(*INP)
This command opens the first member in the file PAYROLL for input processing. The open identifier associated with this open operation has the file name as its identifier. If the file is specified as SHARE(*YES), subsequent open operations of the file PAYROLL (such as in an application program) perform more efficiently and use the same ODP.
Top |
*ESCAPE Messages
Top |