environments. See the SAS documentation for your operating environment for more
information.
Sequential Data Libraries
SAS provides a number of features and procedures for reading from and writing to files
that are stored on sequential format devices, either disk or tape. Before you store SAS
libraries in sequential format, you should consider the following:
You cannot use random access methods with sequential SAS data sets.
You can access only one of the SAS files in a sequential library, or only one of the
SAS files on a tape, at any point in a SAS job.
For example, you cannot read two or more SAS data sets in the same library or on
the same tape at the same time in a single DATA step. However, you can access:
two or more SAS files in different sequential libraries, or on different tapes at the
same time, if there are enough tape drives available
a SAS file during one DATA or PROC step, and then access another SAS file in
the same sequential library or on the same tape during a later DATA or PROC
step
Also, when you have more than one SAS data set on a tape or in a sequential library
in the same DATA or PROC step, one SAS data set file might be opened during the
compilation phase. The additional SAS data sets are opened during the execution
phase. For more information, see the “SET Statement” in SAS DATA Step
Statements: Reference.
For some operating environments, you can read from or write to SAS data sets only
during a DATA or PROC step. However, you can always use the COPY procedure to
transfer all members of a SAS library to tape for storage and backup purposes.
Considerations specific to your site can affect your use of tape. For example, it might
be necessary to manually mount a tape before the SAS libraries become available.
Consult your operations staff if you are not familiar with using tape storage at your
location.
For information about sequential engines, see Chapter 37, “SAS Engines,” on page
745.
Operating Environment Information
The details for storing and accessing SAS files in sequential format vary with the
operating environment. See the SAS documentation for your operating environment
for more information.
Tools for Managing Libraries
SAS Utilities
The SAS utilities that are available for SAS file management enable you to work with
more than one SAS file at a time, as long as the files belong to the same library. The
advantage of learning and using SAS Explorer, functions, options, and procedures is that
596 Chapter 26 SAS Libraries

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.