Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
42 Chapter2
Controlling Asynchronous Devices Programmatically
File System Overview
File System Overview
File System Overview All input/output operations on MPE/iX systems
are done through the mechanism of files. All files are considered the
same (part of the system file domain), and handled in the same way.
Because of this, the way that input or output data is accessed and
treated is the same no matter what medium it resides on. This feature
is called device independence, and allows for a great deal of
flexibility in handling data.
There are two basic types of files:
• Disk files, which are files residing on disk, immediately accessible
to the system and potentially sharable by several sessions/jobs at the
same time.
• Devicefiles, which are files currently being input to or from any
peripheral device except a disk. A devicefile is accessed exclusively
by the session or job that acquires it and is owned by that session/job
until that session/job releases it or terminates.
File Equations
Because of device independence, files are not restricted to the same type
of device every time a program is run. File equations can be used to
specify the device you want your program to access at run time. File
equations associate the formal file designator of a file to a specific
device, or type of device. The formal file designator is the name by
which your program recognizes the file. It is the file name coded in your
program along with the program’s specifications for the file.
As an example of changing device assignment at run time, consider a
program designed to write information contained in a file with the
formal file designator of outfile to a line printer. You may want to direct
the output to a terminal on a one time only basis. You could do this by
using a file equation to direct the file to the terminal’s ldev. For a
terminal with an ldev of 124 the file equation would be:
:FILE OUTFILE;DEV=124
where FILE is the command, OUTFILE is the formal file designator, and
DEV=124 specifies the device configured as ldev 124.
File equations must be issued before a file is accessed, and they take
effect when the file is accessed. They remain in effect until the job or
session ends unless they are canceled with a :RESET command or
overridden by another command for the same file.
The :FILE command can be used to modify many programmatic or
system default file specifications. There are, of course, certain
restrictions on what can be modified by a file equation. The device must