Accessing Files Programmer's Guide (32650-90885)

Chapter 1 15
Introduction
Disk Files and Device Files
Disk Files and Device Files
The file system recognizes two basic types of files, classified on the basis of the media on
which they reside when processed:
1. Disk files, which are files residing on disk, are immediately accessible by the system
and potentially shareable by several jobs/sessions at the same time.
2. Device files are files currently being input to or output from any peripheral device
except a disk. When information exists on such a device but is not being processed, the
file system cannot recognize it as a file. Thus, information on a magnetic tape is not
identified as a file until the tape is loaded onto a tape drive and reading begins; data
being written to a line printer is no longer regarded as a file when output to the printer
terminates. A device file is considered nonshareable; it is accessed exclusively by the
job or session that acquires it, and is owned by that job/session until the job/session
explicitly releases it or terminates.
NOTE
Spooled device files, although temporarily residing on disk, are considered
device files in the fullest sense because they are always originated on or
destined for devices other than disk, and because you generally remain
unaware of their storage on disk as an intermediate step in the spooling
process. Whether they deal with spooled or unspooled device files, your
programs handle input/output as if the files reside on nonshareable devices.
The console operator, not the user, controls the spooling operation.
Topics in this Manual
When you create a file, you specify certain permanent attributes that the file will have
based upon its intended use. Chapter 2, "Creating a File" describes the physical
characteristics that are determined when you create a file and the intrinsics and
commands you use to specify those physical characteristics
What name do you give a file that you create? How does MPE/iX recognize your file?
Chapter 3, "Specifying a File Designator" describes how you designate a file name in your
program and discusses file naming conventions maintained by MPE/iX.
You may classify your file as a new, temporary, or permanent file. Chapter 4, "Specifying a
Domain" discusses these classifications.
Before your program can access or otherwise manipulate a file, the program must open
that file. Program examples illustrating various ways you can open a file are described in
Chapter 5, "Opening a File."
Once your program is finished accessing or manipulating a file,the file must be closed.
Program examples illustrating various ways you can close a file are described in Chapter
6, "Closing a File."
One of the file system's principal concerns is the transfer of information to and from your
files. Chapter 7, "Record Selection and Data Transfer" discusses how you can use MPE/iX
file system intrinsics to select records and transfer data between your program and files.