When you enter two overrides for the same file name at the same call level, the second override replaces the first override. This allows you to replace an override at a single call level, without having to delete the first override.
In the following example, when the program attempts to open FILE A, FILE B overrides FILE A because of override 2. Because only one override can be applied for each call level, the server ignores override 1, and the file opened by the program is FILE B.
Program A
.
.
.
Override 1 OVRDBF FILE(B) TOFILE(C)
Override 2 OVRDBF FILE(A) TOFILE(B)
.
.
.
OPEN FILE A
.
.
.
OVRDBF FILE(A) TOFILE(C)
This does not prevent applying an override at the same call level or job level in which the file is created. Regardless of which attribute is encountered first, file attributes on the override take the place of corresponding attributes on the create statement for the file.