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, and the additional SAS data sets are opened during the execution phase. For more information, see the SET Statement in SAS 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 SAS Engines.
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.