PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

How File Overrides Really Work in ILE

View previous topic View next topic Go down

How File Overrides Really Work in ILE

Post  maran on Fri Sep 14, 2012 9:19 pm

How File Overrides Really Work in ILE

[u]Let's look at a few rules that govern how file overrides are applied
.

You're likely familiar with the fact that file overrides were affected by
the call levels within your job prior to the introduction of ILE. There is
an important call level rule that persists -- within a single call level,
only the most recent override is in effect. In other words, the most recent
override replaces the previous override in effect. This, coupled with the
fact that overrides are applied in decreasing call level sequence, explains
how overrides are applied in the OPM environment.

Things are a bit more complex in ILE because of the ways you can scope an
override. An override's scope determines the range of influence that the
override will have on your applications. You can scope an override to the
following levels:

1) Call Level

A call-level override is at the level of the process that issues the
override, except that if the override is issued using a call to program
QCmdExc, the call level is that of the process that called QCmdExc. A
call-level override remains in effect from the time it is issued until
the system replaces or deletes it or until the call level in which the
override was issued ends.

2) Activation Group Level

An activation-group-level override applies to all programs running in
the activation group associated with the issuing program, regardless of
the call level in which the override is issued. In other words, only the
most recently issued activation-group-level override is in effect. An
activation-group-level override remains in effect from the time the
override is issued until the system replaces it, deletes it, or deletes
the activation group. These rules apply only if the override is issued
from an activation group other than the default activation group.
Activation-group-level overrides issued from the default activation
group are scoped to call-level overrides.

3) Job Level

A job-level override applies to all programs running in the job,
regardless of activation group or call level in which the override is
issued. Only the most recently issued job-level override is in effect. A
job-level override remains in effect from the time it is issued until
the system replaces or deletes it or until the job in which the override
was issued ends.

You specify an override's scope when you issue the override by using the
override command's OvrScope (Override scope) parameter.

ILE programs running in a named activation group can scope overrides to any
of these levels. However, programs (whether OPM or ILE) running in the
default activation group can scope overrides to only the job or call level.

The system processes the overrides for a file when it opens that file and
uses the following sequence to check and apply overrides:

1. call-level overrides up to and including the call level of the oldest
procedure in the activation group containing the file open (beginning
with the call level that opens the file and progressing in decreasing
call-level sequence)
2. the most recent activation-group-level overrides for the activation
group containing the file open (beginning with the call level that
opens the file and progressing in decreasing call-level sequence)
3. call-level overrides lower than the call level of the oldest procedure
in the activation group containing the file open (beginning with the
call level immediately preceding the call level of the oldest procedure
in the activation group containing the file open and progressing in
decreasing call-level sequence)
4. the most recent job-level overrides (beginning with the call level that
opens the file and progressing in decreasing call-level sequence)

If you remember nothing else about file overrides, remember this sequence of
applying overrides. I find that lack of knowledge of these steps accounts
for almost all file override problems as well as for the guesswork when
trying to determine or explain how file overrides really work.
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum