Accessing Files Programmer's Guide (32650-90885)

87
4 Specifying a File Domain
One way to classify a file is on the basis of its domain. A file can be permanent or
temporary, or it may exist only to one particular process. The file system maintains
separate directories to record the location of temporary files and permanent files. Of
course, there is no file system directory for files that exist only to their creating process
(new files).
In this chapter, we will address the following questions:
What do the various domains mean?
Can a file's domain be changed?
How can the files in various domains be listed?
New Files
When you create a file, you can indicate to the file system that it is a new file; it has not
previously existed. Space for this file has not yet been allocated. As a new file, it is known
only to the program that creates it, and exists only while the program is being executed.
When the program concludes, the file simply vanishes, unless you take actions to retain it.
Temporary Files
A temporary file is one that already exists, but that is known only to the job or session that
created it. Some or all of the space for a temporary file has already been allocated, and its
physical characteristics have already been defined. A file in this domain is considered a job
temporary file; it was created for some specific purpose by its job or session and may not be
needed when the job or session concludes. Like a new file, it vanishes when its creating job
or session is over.