You must specify any overrides before the file is opened by the ILE COBOL program. The system uses the file override command to determine the file to open and the attributes of the file. File overrides are scoped to the call level, the activation group level, or the job level.
For call level scoping, an override issued at a particular call level is effective for any invocations after the call level regardless of which activation group the invocations are in, and its effect ends when control is returned for the call level at which the override is issued.
For activation group level scoping, the override applies to all program objects running in that activation group and the override remains in effect until the activation group ends or the override is explicitly deleted.
For job level scoping, the override applies to all program objects within the job, and it remains active until the job ends or the override is explicitly deleted.
Use the OVRSCOPE parameter of any override CL command to specify the scope of the override. If you do not explicitly specify the scope, the default scope of the override depends on where the override is issued. If the override is issued from the default activation group, it is scoped at the call level. If the override is issued from any other activation group, it is scoped to the activation group.
The simplest form of overriding a file is to override some attributes of the file. For example, FILE(OUTPUT) with COPIES(2) is specified when a printer file is created. Then, before the ILE COBOL program is run, the number of printed copies of output can be changed to 3. The override command is as follows:
OVRPRTF FILE(OUTPUT) COPIES(3)
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.