Previous Page | Next Page

Using External Files and Devices

Introduction to External Files and Devices in UNIX Environments

At times during a SAS session, you might want to use external files, that is, files that contain data or text, or files in which you want to store data or text. These files are created and maintained by the operating system, not by SAS.

You can use external files in a SAS session to perform the following functions:

For SAS, external files and devices can serve both as sources of input and as receivers of output. The input can be either raw data to be read in a DATA step or SAS statements to be processed by SAS. The output can be one of the following:

You might also want to use peripheral devices such as a printer, plotter, or your own terminal. UNIX treats these I/O devices as if they were files. Each device is associated with a file, called a special file, which is treated as an ordinary disk file. When you write to a special file, the associated device is automatically activated. All special files reside in the dev directory or its subdirectories. Although there are some differences in how you use the various devices, the basic concept is the same for them all.

UNIX also enables you to use pipes to send data to and from operating system commands as if they were I/O devices.

If you need to access an external file containing a transport data library, refer to Moving and Accessing SAS Files.

Previous Page | Next Page | Top of Page