Override ICF File (OVRICFF)

The Override with Intersystem Communications Function File (OVRICFF) command overrides the file named in the program and overrides certain parameters of the file being processed. Parameters overridden by this command can be specified in the file description, in the program, or in other file override commands that are run later.

If a file named in the program is being overridden, the name of that file is specified in the FILE parameter and the name of the overriding file (the file being processed) is specified in the TOFILE parameter.

This command can also specify parameters to override values contained in the file description of the overriding file. If the file named in the program is not being replaced but certain parameters of the file are being overridden, the name of the file is specified in the FILE parameter and *FILE is specified in the TOFILE parameter. The parameters being overridden are then specified by the other parameters of the OVRICFF command. Parameters that are not specified do not affect parameters specified in the file description, in the program, or in other override commands run later.

More information on how overrides processing is performed is in the Files and file systems category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/, the Application Display Programming book, SC41-5715, and the Printing category in the IBM i Information Center at http://www.ibm.com/systems/i/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.

Parameters

Keyword Description Choices Notes
FILE File being overridden Name Required, Positional 1
TOFILE Overriding to ICF file Single values: *FILE
Other values: Qualified object name
Optional, Positional 2
Qualifier 1: Overriding to ICF file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
ACQPGMDEV Acquire program device Element list Optional, Positional 3
Element 1: Program device to acquire Character value, *NONE
MAXRCDLEN Maximum record length Integer, *CALC Optional
WAITFILE Maximum file wait time Integer, *IMMED, *CLS Optional
WAITRCD Maximum record wait time 1-32767, *NOMAX, *IMMED Optional
LVLCHK Record format level check *NO Optional
SECURE Secure from other overrides *NO, *YES Optional
OVRSCOPE Override scope *ACTGRPDFN, *CALLLVL, *JOB Optional
DTAQ Data queue Single values: *NONE
Other values: Qualified object name
Optional
Qualifier 1: Data queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SHARE Share open data path *NO, *YES Optional
OPNSCOPE Open scope *ACTGRPDFN, *JOB Optional

File being overridden (FILE)

Specifies the file to which this override command is applied. The specified file must be an intersystem communications function (ICF) file when *FILE is specified in the Overriding to ICF file (TOFILE) parameter. Otherwise, any device file or database file name can be specified.

This is a required parameter.

name
Specify the name of the ICF file.

Overriding to ICF file (TOFILE)

Specifies the qualified name of the ICF file (up to 10 characters) that is used instead of the file specified in the File being overridden (FILE) parameter or, if *FILE is specified, indicates that certain attributes are overridden by parameters in this command. The parameters on this command override the other values in the ICF file or in the program.

Single values

*FILE
Some parameters of the ICF file named in the File being overridden (FILE) parameter are overridden by values specified in this command.

Qualifier 1: Overriding to ICF file

name
Specify the name of the ICF file that is used instead of the overridden file.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the ICF file description. If no library is specified as the current library for the job, QGPL is used.
name
Specify the library where the ICF file description is located.

Acquire program device (ACQPGMDEV)

Specifies which program device is acquired by the file when the file is opened. This parameter overrides the value in the ICF file, in the program, or in the other OVRICFF commands run later.

*NONE
The file is opened without any devices acquired. All devices used with this file must be explicitly acquired before input/output can be directed to them.
character-value
Specify the name of the program device that is acquired when the file is opened. The name should be specified on the Add ICF Program Device Entry (ADDICFDEVE) command or the override ICF program device entry (OVRICFDEVE) command as a program device name before the file is opened.

Maximum record length (MAXRCDLEN)

Specifies the maximum record length used when the file is opened. This parameter overrides the value in the ICF file, in the program, or in the other OVRICFF commands run later.

*CALC
The value calculated in the file is used when the file is opened.
integer
Specify the record length (in characters) that is used when the file is opened. Valid values range from 1 through 32767. If the record length is less than the calculated value in the file, the calculated value is used.

Maximum file wait time (WAITFILE)

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.

*IMMED
The program does not wait. Immediate allocation of file resources is required.
*CLS
The default wait time specified in the class description is used as the wait time for the allocation of the file resources.
integer
Specify the number of seconds that the program waits for the allocation of the file resources. Valid values range from 1 through 32767.

Maximum record wait time (WAITRCD)

Specifies the number of seconds the program waits for the completion of a read-from-invited-devices operation to a multiple device file in a high-level language program. Refer to the high-level language reference manual to determine when a file is treated as a multiple device file. The program performing the read operation waits for the input form all invited devices currently accessing the file. If a record is not returned from any of the invited program devices in the specified amount of time, a notify message is sent to the program. This parameter has no effect on an input operation directed to a single device.

*NOMAX
There is no limit on the time the system waits for the completion of the operation.
*IMMED
The program does not wait. If a record is not available when the read-from-invited-devices operation is done, a notify message is sent to the program.
1-32767
Specify the number of seconds that the program waits for the completion of the read-from-invited-program-devices operation.

Record format level check (LVLCHK)

Specifies whether the level identifiers of the record formats in this device file are checked when the file is opened by a program. While the file is being opened, the system verifies the level identifiers and compares the record format identifiers of each record format used by the program with the same identifiers in the device file. Because the same record format name can exist in more than one file, each record format is given a unique internal system identifier when the format is created.

Note: This command cannot override level checking from *NO to *YES.

*NO
The level identifiers of the record formats are not checked when the file is opened.

Secure from other overrides (SECURE)

Specifies whether this file is protected from the effects of previous file override commands.

*NO
This file is not protected from other file overrides. Its values can be overridden by the effects of any file override commands started earlier.
*YES
This file is protected from the effects of any file override commands started earlier.

Override scope (OVRSCOPE)

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

*ACTGRPDFN
The scope of the override is determined by the activation group of the program that calls this command. When the activation group is the default activation group, the scope equals the call level of the calling program. When the activation group is not the default activation group, the scope equals the activation group of the calling program.
*CALLLVL
The scope of the override is determined by the current call level. All open operations done at a call level that is the same as or higher than the current call level are influenced by this override.
*JOB
The scope of the override is the job in which the override occurs.

Data queue (DTAQ)

Specifies the data queue on which entries are placed. The specified data queue must have a minimum length of 80 characters. The data queue need not exist when the display file is created since the name specified for this parameter is not evaluated until the file is used.

Note: Keyed data queues are not supported for this parameter. If a keyed data queue is specified, a run-time error will occur; but because it is not required that a data queue exist at the time the command is issued, the error will not be flagged.

More information on the data queue function is in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Single values

*NONE
No data queue is specified.

Qualifier 1: Data queue

name
Specify the name of the data queue on which entries are placed.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library is used to locate the data queue. If no library is specified as the current library, QGPL is used.
name
Specify the library where the data queue is located.

Share open data path (SHARE)

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.

*NO
The ODP is not shared with other programs in the routing step. A new ODP for the file is created and used every time a program opens the file.
*YES
The same ODP is shared with each program in the job that also specifies *YES when it opens the file.

Open scope (OPNSCOPE)

Specifies the extent of influence (scope) of the open operation.

*ACTGRPDFN
The scope of the open operation is determined by the activation group of the program that called the OVRICFF command processing program. If the activation group is the default activation group, the scope is the call level of the caller. If the activation group is a non-default activation group, the scope is the activation group of the caller.
*JOB
The scope of the open operation is the job in which the open operation occurs.

Examples

OVRICFF   FILE(ICFHIST)  TOFILE(PRSNNL/ICFCURT)

This command overrides the file named ICFHIST to the ICF file named ICFCURT in library PRSNNL.

Error messages

*ESCAPE Messages

CPF180C
Function &1 not allowed.
CPF1892
Function &1 not allowed.