You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
18 <strong>File</strong> <strong>Management</strong> V4R5<br />
v “Displaying information about open files” on page 22<br />
v “Detecting file description changes” on page 21<br />
v “Monitoring file status with the open and I/O feedback area” on page 23<br />
Scoping of opened files<br />
<strong>File</strong>s that are opened within the user default activation group are scoped to the call<br />
level number of the calling program (default). A call level number is a unique<br />
number that the system assigns to each call stack entry. <strong>File</strong>s that are opened<br />
within a named activation group are scoped to the activation group level (default).<br />
You can change the scope of an open operation by using override commands. For<br />
example, you can change the scope of an open operation to the job level. For more<br />
information on using overrides to change the scope of an open operation, see<br />
“Chapter 3. Using overrides” on page 33. For information on displaying the scope<br />
of existing open operations, see “Displaying information about open files” on<br />
page 22.<br />
Opening files using temporary file descriptions<br />
Temporary changes can provide greater flexibility to the application. The system<br />
makes temporary changes when the program is first establishing a path to the file<br />
by opening the file. Temporary changes can be made in one of two ways:<br />
v By information that is specified within the program itself, and which is passed<br />
as parameters on the open operation.<br />
v By using override CL commands in the input stream that is used to set up the<br />
run-time environment for the application<br />
The ability to use the first way depends very much on which programming<br />
language you used to write the program. Some programming languages do not<br />
allow you to control the open process to any great extent. These languages do the<br />
open process more or less automatically and control what information gets passed.<br />
Other languages allow you to have greater control over the open process.<br />
You can use the second option regardless of which programming language you<br />
use. AS/400 provides override CL commands for each file type. By including<br />
override commands with the application, you may temporarily change the file<br />
description in a file that the program wants to use.<br />
You can use both options together. Information that is contained in the application<br />
can change some parameters; an override command can change others. Both can<br />
change the same parameter. The operating system follows this order when making<br />
temporary changes to a file:<br />
1. The file description provides a base of information.<br />
2. Change information received from the application during the open process is<br />
applied first to the base information.<br />
3. Change information found in the override command is applied last. If both the<br />
change information from the application and the override change the same<br />
information, the override has precedence.<br />
Only the application that makes the changes can see the temporary changes. The<br />
file, as seen by another application, remains unchanged. In fact, two applications<br />
may use the same file at the same time, and each may change it temporarily<br />
according to its needs. Neither application is aware the other has made a