30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

48 <strong>File</strong> <strong>Management</strong> V4R5<br />

same call level as the program that contained the TFRCTL command. An<br />

override command in a program that transfers control to another program is not<br />

deleted during the transfer of control.<br />

For an example, see “Effect of TFRCTL on overrides-Scenario” on page 49.<br />

v Several overrides (possibly one per call level, one at the activation group level,<br />

and one at the job level) to a single file are allowed. They are processed<br />

according to the priorities in “Processing priority of overrides” on page 43.<br />

For an example of processing overrides, see “How the system processes<br />

overrides-scenario 1” on page 43.<br />

v You can protect an override from being overridden by overrides at lower call<br />

levels, the activation group level, and the job level; specify SECURE(*YES) on<br />

the override. For an example, see “Securing files against overrides” on page 51.<br />

Effect of exits on overrides: scenario<br />

Exits (ENDPGM, RETURN, or abnormal exits) from a call operation delete<br />

overrides that are scoped to that call level. However, they do not delete overrides<br />

that are issued in that call level that are scoped to the activation group level or the<br />

job level. For example, a RETURN command deletes all overrides scoped to that<br />

call level. Thus, overrides that are scoped to the call level in called programs that<br />

end with a RETURN or ENDPGM command do not apply to the calling program.<br />

This is not true for programs that use the Transfer Control (TFRCTL) command.<br />

In Figure 7, the RETURN command deletes the first override in program B, and<br />

FILE X is opened in program A. However, the RETURN command does not delete<br />

the second override because it is scoped to the job level. FILE B is opened in<br />

program A when program A processes the Open FILE A command.<br />

Program A<br />

.<br />

.<br />

.<br />

CALL PGM(B)<br />

Program B<br />

Override 1 OVRDBF FILE(X) FILE(Y)<br />

Override 2 OVRDBF FILE(A) TOFILE(B) +<br />

OVRSCOPE(*JOB)<br />

.<br />

.<br />

.<br />

RETURN<br />

OPEN FILE X<br />

.<br />

.<br />

.<br />

OPEN FILE A<br />

Figure 7. Example of Effect of Exits on Overrides

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!