Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
The Override with Database File (OVRDBF) command is used to (1) override (replace) the file named in the program, (2) override certain parameters of a file that are used by the program, or (3) override the file named in the program and override certain parameters of the file being processed. Parameters overridden by this command are specified in the file description, in the program, or in other previously issued file override commands. This command applies to physical files, logical files, and distributed data management (DDM) files.
To override (replace) a file named in the program, specify the name of that file in the FILE parameter, and specify the name of the file that overrides it (the file to be processed by the program) in the TOFILE parameter. The other parameters of this command can be used to override parameter values contained in the file description of the overriding file.
To override only certain parameters of the file named in the program, instead of replacing the entire file, specify the name of the file in the FILE parameter and specify the *FILE value for the TOFILE parameter. Then use the other parameters of this command to override specific parameters of the file. Parameters that are not specified do not affect parameters specified in the file description, in the program, or in other previously issued file override commands.
Restrictions:
Note: The override cannot be used for all commands. A list of the commands that cannot be overridden, along with more information on overriding files is in the Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Note: Using this command does not cause a file to be overridden immediately. Information provided on this command is stored until the file is used, at which time the file is overridden.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | File being overridden | Name | Required, Positional 1 |
TOFILE | Overriding to data base file | Single values: *FILE Other values: Qualified object name |
Optional, Positional 2 |
Qualifier 1: Overriding to data base file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
MBR | Overriding member | Name, *FIRST, *LAST, *ALL | Optional, Positional 3 |
POSITION | Starting position in file | Single values: *NONE, *START, *END Other values: Element list |
Optional |
Element 1: Retrieve order | *RRN, *KEYB, *KEYBE, *KEY, *KEYAE, *KEYA | ||
Element 2: *RRN-rcd nbr *KEY-nbr key flds | Unsigned integer | ||
Element 3: *KEY-rec format having key | Name | ||
Element 4: *KEY-key value | Character value | ||
RCDFMTLCK | Record format lock | Values (up to 32 repetitions): Element list | Optional |
Element 1: Record format | Name | ||
Element 2: Lock state | *SHRRD, *SHRNUP, *SHRUPD, *EXCLRD, *EXCL | ||
FRCRATIO | Records to force a write | Integer, *NONE | Optional |
FMTSLR | Rcd format selector program | Qualified object name | Optional |
Qualifier 1: Rcd format selector program | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
WAITFILE | Maximum file wait time | Integer, *IMMED, *CLS | Optional |
WAITRCD | Maximum record wait time | Integer, *IMMED, *NOMAX | Optional |
NBRRCDS | Records retrieved at once | Integer | Optional |
EOFDLY | EOF retry delay in sec | 1-99999, *NONE | Optional |
LVLCHK | Record format level check | *NO | Optional |
EXPCHK | Check expiration date | *YES, *NO | Optional |
INHWRT | Inhibit write | *YES, *NO | Optional |
SECURE | Secure from other overrides | *NO, *YES | Optional |
OVRSCOPE | Override scope | *ACTGRPDFN, *CALLLVL, *JOB | Optional |
SHARE | Share open data path | *NO, *YES | Optional |
OPNSCOPE | Open scope | *ACTGRPDFN, *JOB | Optional |
SEQONLY | Limit to sequential only | Single values: *NO Other values: Element list |
Optional |
Element 1: Sequential only | *YES | ||
Element 2: Number of records | Integer | ||
DSTDTA | Distributed Data | *BUFFERED, *PROTECTED, *CURRENT | Optional |
Top |
Specifies the file in the using program to which this override command is applied. The specified file must be a database file when *FILE is specified in the Overriding to data base file (TOFILE) parameter. Otherwise, any device file or database file name can be specified.
This is a required parameter.
Top |
Specifies the database file that is used instead of the file specified on the File being overridden (FILE) parameter, or, if *FILE is specified, specifies that certain attributes are overridden by parameters specified in this command. The parameters specified on this command override the same parameters specified in the database file, in the program, or in other previously issued OVRDBF commands.
Single values
Qualifier 1: Overriding to data base file
Qualifier 2: Library
Top |
Specifies the members used within the database file. This parameter is not valid for distributed data management (DDM) files that refer to remote systems other than the System/38 or the AS/400 system.
Top |
Specifies the starting position for reading records from the database file. The first record to get can be at the beginning (*START) or at the end (*END) of the file, the nth record in the file (*RRN), or the record indicated by a key field value and one of the key-search values (*KEY, *KEYA, *KEYAE, *KEYB, or *KEYBE). This parameter overrides the value specified in the program, or in other called OVRDBF commands.
Note: This parameter cannot be specified if *ALL was specified previously on the Overriding member (MBR) parameter.
Single values
Element 1: Retrieve order
Element 2: *RRN-rcd nbr *KEY-nbr key flds
Element 3: *KEY-rec format having key
Element 4: *KEY-key value
For example, POSITION(*KEY 1 FMT2 X'123F') specifies that:
The Distributed Data Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter has more information on the effects of using the POSITION parameter with DDM files.
Top |
Specifies the lock state of the named record format while it is used by the program. The lock state indicates how the data associated with each format is locked. The following example shows the lock states that are specified for each record format and the operations allowed to other programs when the lock is in effect:
Lock State Other Program Operations --------------------- ------------------------- *SHRRD (Shared read) Read and update allowed *SHRNUP (Shared read, Read allowed, update no update) not allowed *SHRUP (Shared update) Read and update allowed *EXCLRD (Exclusive Read allowed, update allow read) not allowed *EXCL (Exclusive no Neither read nor read) update allowed
An explanation of each lock state is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
For each record format, specify the record format name, followed by one lock state value. If the lock state specified for the file in an Allocate Object (ALCOBJ) command is more restrictive than the lock state specified in this parameter, this parameter is ignored. Thus, this parameter can only impose a more restrictive lock state on a record format than the lock state specified for the file.
You can specify 32 values for this parameter.
Element 1: Record format
Element 2: Lock state
Top |
Specifies the number of insert, delete, or update operations that can occur on records before those records are forced into auxiliary (permanent) storage. If this physical file is being journaled, either a large number or *NONE should be used. *NONE may cause long synchronization of the journal and physical files. More information on this parameter is in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter, Appendix A. More information on journal management is in the Backup and Recovery book, SC41-5304.
This parameter overrides the force-write ratio specified in the database file, in the program, or in other previously issued OVRDBF commands.
Top |
Specifies the record format selection program that is called when a logical file member contains more than one logical record format. The user-written selection program is called when a record is inserted into the database file and a record format name is not included in the high-level language program. More information about the use of format selector programs is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. This parameter overrides the value specified in the database file and in other previously issued OVRDBF commands.
A program specified as the format selector program cannot be created with USRPRF(*OWNER) specified in the Create CL Program (CRTCLPGM) command.
Note: This parameter cannot be specified if *ALL was specified previously on the Overriding member (MBR) parameter.
Qualifier 1: Rcd format selector program
Qualifier 2: Library
Top |
Specifies the number of seconds that the program waits for the file resources to be allocated when the file is opened, or the device or session resources to be allocated when an acquire operation is performed to the file. If the file resources cannot be allocated in the specified wait time, an error message is sent to the program.
This parameter overrides the wait time specified in the database file, in the program, or in other previously issued OVRDBF commands.
More information on this parameter is in CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter, Appendix A.
Top |
Specifies the number of seconds that a program waits for a record to be updated or deleted, or for a record read in the commitment control environment with LCKLVL(*ALL) specified. More information on record locking is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. If the record is not allocated in the specified wait time, an error message is sent to the program.
Note: This parameter overrides the record wait time specified in the database file, specified in the program, or in other previously issued OVRDBF commands. The minimum delay for DDM files is 60 seconds. This value may need to be longer than the delay specified for local database files.
Top |
Specifies the number of records read from auxiliary storage as a unit and written to main storage as a unit. The amount of data actually read is equal to the number of records times the physical record length, not the logical record length.
This parameter is valid for sequential or random processing and is specified only when the data records are physically located in auxiliary storage in the sequence in which they are processed. This parameter overrides the number of records value specified in the program, or in other previously issued OVRDBF commands.
Top |
Specifies the number of seconds of delay before trying to read additional records when end of file is reached. This delay is used to allow other jobs an opportunity to add records to the file, and have the new records processed without having to start the job again. When the delay time ends, the job is made active, and data management determines whether any new records were added. If no new records were added, the job waits for another time delay without informing the application program. When a number of seconds is given, no end of file occurs on the given database file until an End Job (ENDJOB) command or forced end of data (FEOD) occurs.
Note: This parameter cannot be specified if *ALL was specified previously on the Overriding member (MBR) parameter.
There are several ways to end a job that is waiting for records due to an EOFDLY. They are:
Top |
Specifies whether the level identifiers for the record formats of the database file are checked when the file is opened by a program. For this check, which is done while the member is opened, the system compares the record format identifiers of each record format used by the program with the corresponding identifiers in the database member. Level checking cannot be done unless the program contains the record format identifiers. This command cannot override level checking from *NO to *YES.
Top |
Specifies whether the expiration date of the named member is checked. This date check is valid only on a physical file member. This parameter overrides the value specified in the program, or in other called OVRDBF commands.
Top |
Specifies whether the processed records are written, deleted, or updated in the database file. The inhibit write parameter allows you to test a program without storing the processed records in the database. This parameter overrides the INHWRT parameter in other previously issued OVRDBF commands.
Note: This parameter cannot be specified if *ALL is specified on the Overriding member (MBR) parameter.
Top |
Specifies whether this file is safe from the effects of previously called file override commands.
Top |
Specifies the extent of influence (scope) of the override.
Top |
Specifies whether the open data path (ODP) is shared with other programs in the same routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.
More information on shared database files is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Specifies the extent of influence (scope) of the open operation.
Top |
Specifies, for database files whose records are processed in sequential order only, 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 if sequential only processing is used. If a number is not specified, a default number is determined by the system. This parameter is used to improve the performance of programs that process database files in a sequential manner. This parameter overrides the value specified in the program or in other previously issued OVRDBF commands.
For files opened for input only in a program, the specified number of records is transferred as a group from the database to an internal data management buffer.
For files opened for output only in a program, a group of records is transferred to the database whenever the internal data management buffer receives the specified number of processed records from the program. For output files, sequential-only processing is valid for physical file members and for logical file members that are based on one physical file member only.
If SEQONLY(*YES) is specified, and any of the following conditions are true, the SEQONLY parameter is ignored and a message is issued.
Note: Unpredictable results occur when this parameter is used for alternate index files for DDM on a system other than an iSeries or AS/400 system.
Single values
Element 1: Sequential only
Element 2: Number of records
While records are in the internal data management buffer, other jobs can make changes to the same records in the database, and the program performing sequential-only input processing does not see the updates. To ensure that no other updating is done to records while they are in the buffer, the Allocate Object (ALCOBJ) command can be used in the program to specify either an *EXCLRD or an *EXCL lock on the file.
If a program performs sequential-only output processing and does not handle output errors (such as duplicate keys and conversion mapping errors) that may occur when the records in the buffer are written to the database, records in the buffer after the first record in error are not written.
If the file is opened for output and the value specified in this parameter is not the same as the force write ratio specified for the file, the value used by the system is the smaller of the two; a message stating which value is changed is sent to the user.
When processing SEQONLY(*YES) for writing records into a database file, feedback information for each record (such as relative record number) is not always changed. If such feedback information is important, specify SEQONLY(*NO) or SEQONLY(*YES 1).
More information on sequence-only database files is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Specifies the data retrieval method used for a distributed file. This parameter has no effect if used against a non-distributed file. Other parameters, such as SEQONLY, still affect how the data is retrieved from each system, and this parameter controls how all the data is managed when accessing a distributed file. This parameter overrides the distributed file data retrieval method selected by the system, or specified in other previously issued OVRDBF commands. More information on DSTDTA can be found in the DB/2 Multisystem for iSeries information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Example 1: Overriding An Existing Member
OVRDBF FILE(ORDERSIN) MBR(MONDAY)
This command overrides the existing member with member MONDAY. With the override in effect, the member MONDAY will be processed when the file ORDERSIN is opened.
Example 2: Overriding a Share Specification
OVRDBF FILE(ORDERSIN) SHARE(*YES)
This command overrides the share specification for the file ORDERSIN. Because of this override, any subsequent opens of this file within the routing step share the ODP for the file.
Example 3: Overriding a File, Member and Lock State
OVRDBF FILE(INPUT) TOFILE(PAYROLL) MBR(MBR1) RCDFMTLCK((EMPDATA *EXCL))
This command overrides the file, the member, and the lock state of the record format EMPDATA. The override will cause the following to occur when the file INPUT is opened:
Top |
Top |