Command reference / db

OVRDBF

Override with Data Base File

Overrides a file named in the program in one of two ways: it replaces that file with another database file (TOFILE), or it keeps the file and changes some of its parameters (TOFILE(*FILE)). It applies to physical, logical, and DDM files. Overrides take effect when the file is next used, not immediately, and parameters you leave out keep their earlier settings. Not every command can be overridden.

Allowed environments: *ALL. Positional parameters: 3.

Restrictions

Parameters

FILE File being overridden

Names the file in the using program that the override applies to. It must be a database file when TOFILE(*FILE) is used; otherwise any device or database file can be named. This parameter is required.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

TOFILE Overriding to data base file

Names the database file used in place of FILE. Specify *FILE instead to keep FILE and override only the attributes given on this command.

Type
*QUAL
Required
No
Case
Uppercase
*FILE
FILE keeps its identity, but some of its parameters are overridden by this command.
*LIBL
Searches every library in the thread's library list until the first match is found.
*CURLIB
Uses the job's current library to locate the file; QGPL if no current library is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Overriding to data base file Overriding to data base file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

MBR Overriding member

Names the member that is used when the file is opened. If omitted and TOFILE is not *FILE, the first member is used. Not valid for some DDM files.

Type
*NAME
Required
No
Length
10
Case
Uppercase

Suggested / special values: *FIRST, *LAST, *ALL

*FIRST
The first member of the database file is used.
*LAST
The last member of the database file is used.
*ALL
All members are processed in order, each opened with the same override parameters as the first. EOFDLY, FMTSLR, INHWRT, and POSITION cannot be specified with it.

POSITION Starting position in file

Sets where reading starts: at the beginning or end of the file, at a relative record number, or at a key-value search. Cannot be specified after MBR(*ALL).

Type
*ELEM
Required
No
Case
Uppercase
*NONE
No special positioning; the first input/output operation determines which record is read.
*START
Starts at the first record; a read-previous operation gives end-of-file.
*END
Starts at the last record; the next read reaches end-of-file, and a read-previous returns the last record.
*RRN
Starts at the relative record number given as the second element.
Elements in order

Retrieve order Retrieve order

Type
*CHAR
Required
No
Length
6
Case
Uppercase

Allowed values: *RRN, *KEYB, *KEYBE, *KEY, *KEYAE, *KEYA

*RRN-rcd nbr *KEY-nbr key flds *RRN-rcd nbr *KEY-nbr key flds

Type
*UINT4
Required
No
Case
Uppercase

*KEY-rec format having key *KEY-rec format having key

Type
*NAME
Required
No
Length
10
Case
Uppercase

*KEY-key value *KEY-key value

Type
*CHAR
Required
No
Length
50
Case
Uppercase

RCDFMTLCK Record format lock

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Record format Record format

Type
*NAME
Required
No
Length
10
Case
Uppercase

Lock state Lock state

Type
*CHAR
Required
No
Length
7
Case
Uppercase

Allowed values: *SHRRD, *SHRNUP, *SHRUPD, *EXCLRD, *EXCL

FRCRATIO Records to force a write

Type
*INT4
Required
No
Case
Uppercase

Suggested / special values: *NONE

FMTSLR Rcd format selector program

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Rcd format selector program Rcd format selector program

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

WAITFILE Maximum file wait time

Seconds to wait for file resources at open, or for device or session resources at acquire; an error is sent if they are not allocated in time. Integer range 1 to 32767.

Type
*INT4
Required
No
Case
Uppercase

Suggested / special values: *IMMED, *CLS

*IMMED
Does not wait; attempts an immediate allocation.
*CLS
Uses the default wait time from the class description.

WAITRCD Maximum record wait time

Seconds to wait for a record to be updated or deleted, or for a read under commitment control with LCKLVL(*ALL); an error is sent if not allocated in time. Integer range 1 to 32767.

Type
*INT4
Required
No
Case
Uppercase

Suggested / special values: *IMMED, *NOMAX

*NOMAX
Waits indefinitely for the record lock.
*IMMED
Does not wait; the lock is obtained immediately when the record is read.

REUSEDLT Reuse deleted records

Type
*CHAR
Required
No
Length
3
Case
Uppercase

Allowed values: *NO

NBRRCDS Records retrieved at once

Type
*INT4
Required
No
Case
Uppercase

EOFDLY EOF retry delay in sec

Type
*UINT4
Required
No
Range
1 to 99999
Case
Uppercase

Suggested / special values: *NONE

LVLCHK Record format level check

Type
*CHAR
Required
No
Length
3
Case
Uppercase

Allowed values: *NO

EXPCHK Check expiration date

Whether the expiration date of a physical file member is checked. This overrides the setting in the program or in earlier overrides.

Type
*CHAR
Required
No
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
The expiration date is checked; if it has passed, an escape message is sent to the program.
*NO
The expiration date is not checked.

INHWRT Inhibit write

Whether processed records are written, deleted, or updated in the database. Useful for testing a program without storing its changes. Cannot be specified with MBR(*ALL).

Type
*CHAR
Required
No
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
Records are not written to the database; they go only to an output device.
*NO
Records are written normally, except in debug mode with UPDPROD(*NO) in a production library, where an escape message is sent.

SECURE Secure from other overrides

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

OVRSCOPE Override scope

Sets the extent of influence (scope) of the override.

Type
*CHAR
Required
No
Default
*ACTGRPDFN
Length
10
Case
Uppercase

Allowed values: *ACTGRPDFN, *CALLLVL, *JOB

*ACTGRPDFN
Scope comes from the activation group: the call level in the default activation group, otherwise the activation group.
*CALLLVL
Scope is the current call level; opens at that level or higher are affected.
*JOB
Scope is the job in which the override occurs.

SHARE Share open data path

Whether the open data path (ODP) is shared with other programs in the same routing step, including file status and buffers.

Type
*CHAR
Required
No
Length
4
Case
Uppercase

Allowed values: *NO, *YES

*NO
A new ODP is created each time a program opens the file.
*YES
The same ODP is shared with each program in the job that also specifies *YES when opening the member.

OPNSCOPE Open scope

Type
*CHAR
Required
No
Length
10
Case
Uppercase

Allowed values: *ACTGRPDFN, *JOB

SEQONLY Limit to sequential only

For files processed only in sequential order, sets whether sequential-only processing is used and how many records move as a group. Overrides earlier settings.

Type
*ELEM
Required
No
Case
Uppercase
*NO
The file is not restricted to sequential-only processing.
*YES
The file uses sequential-only processing, with the number of records per group chosen by the system unless given.
*BUF32KB
Buffer size of 32 KB.
*BUF64KB
Buffer size of 64 KB.
*BUF128KB
Buffer size of 128 KB.
*BUF256KB
Buffer size of 256 KB.
Elements in order

Sequential only Sequential only

Type
*CHAR
Required
No
Length
4
Case
Uppercase

Allowed values: *YES

Number of records Number of records

Type
*INT4
Required
No
Case
Uppercase

Suggested / special values: *BUF32KB, *BUF64KB, *BUF128KB, *BUF256KB

DSTDTA Distributed Data

Type
*CHAR
Required
No
Length
10
Case
Uppercase

Allowed values: *BUFFERED, *PROTECTED, *CURRENT

Examples

OVRDBF FILE(ORDERSIN) MBR(MONDAY)

When ORDERSIN is opened, member MONDAY is processed instead of the one previously specified.

OVRDBF FILE(INPUT) TOFILE(PAYROLL) MBR(MBR1) RCDFMTLCK((EMPDATA *EXCL))

INPUT is replaced by PAYROLL, member MBR1 is used, and an exclusive (*EXCL) lock is placed on record format EMPDATA.

IBM command documentation

Generated from os/cl/catalog/OVRDBF.json and os/cl/help/OVRDBF.json.