Accessing Files Programmer's Guide (32650-90885)

80 Chapter3
Specifying a File Designation
System-Defined Files
Figure 3-1. Passing Files between Program Runs
.
.
.
FILE SOURCE1=DSFIL
FILE INTERFIL=$NEWPASS <---
RUN PROG1 |- Same File
FILE SOURCE2=$OLDPASS <---
RUN PROG2
.
.
.
A program file must pass through several steps as it is executed; passed files are most
frequently used between these steps. A program file must be compiled and linked before it
is executed. By default, the compiled form of a text file is written to $NEWPASS. When the
compiler closes $NEWPASS, its name is changed to $OLDPASS; it is this file that is linked
for execution. The linked form of the program file is written to a new $NEWPASS, which is
renamed $OLDPASS when the file is closed; the old $OLDPASS is deleted. Now, this file is
ready to be executed. This $OLDPASS may be executed any number of times, until it is
overwritten by another $OLDPASS file.
The steps that a program takes as it is run are depicted in Figure 3-2..