Records and Files in the File System

The File System manages data being transferred or stored with peripheral devices. It handles I/O operations, suc h as passing information to and from user processes, compilers, and information managemen t subsystems. Conceptually , information for data transfers is arranged as elements of data in a record. The record is input, processed, and output as a single unit. Logically related records are grouped in to sets called ￿les, whic h can be kept in any storage medium or sent to any I/O peripheral, as sho wn in Figure 6-2. In some cases, records ma y be physically grouped together in bloc ks when they are in a ￿le residing on a non-disc device.

Figure 6-2. Records and Files Relationship

Since all I/O operations are done through the mec hanism of ￿les, y ou can access di￿eren t devices in a standard, consisten t way. The names assigned to a ￿le when it is de￿ned in a program do not restrict that ￿le to residing on the same device ev ery time the program is run; the program is device independen t.

The File System recognizes t wo basic types of ￿les, classi￿ed b y the media on whic h they reside when processed: disc ￿les and device ￿les.

For detailed information on the File System in terface, disc ￿les, device ￿les, and spooled device ￿les, refer to Accessing Files Programmer's Guide (32650-90017).

Device Files

Device ￿les are ￿les curren tly being input to or output from an y peripheral device, except a system or priv ate domain disc volume. A foreign disc or serial disc ￿le is considered to be a device ￿le. A device ￿le is nonsharable; it is accessed exclusiv ely by the job or session that acquires it and is o wned by that job or session un til the job or session explicitly releases it or terminates.

A device ￿le is a set of logically related records transferred to or from a non-random disc device such as a terminal, magnetic tape, or line prin ter. A device ￿le is built di￿eren tly from a disc ￿le. You de￿ne the physical and operational c haracteristics eac h time you access the device. However, the File System is used to open, access, and close a device ￿le, just as it does a disc ￿le. When you have a program that is written to use a disc ￿le and y ou want it to use a device ￿le at run time, use the DEV= parameter of the :FILE command to specify a device class (such as TAPE) or a speci￿c logical device n umber that corresponds to a device on y our

6-2 File System