Previous Page | Next Page

SAS 9.2 Compatibility with SAS Files from Earlier Releases

Using SAS Library Engines

In order to access a SAS library, SAS needs a libref and a library engine name. For example, you assign a libref to the SAS library with the LIBNAME statement or the New Library window, but usually you do not have to specify an engine name because SAS automatically selects the appropriate engine.

If you do not specify an engine, SAS automatically assigns one based on the contents of the SAS library. For example, SAS is able to differentiate between a SAS 6 library and a SAS 9 library. Note that in SAS 9, a SAS library containing SAS 7 and 8 files is the same as a SAS 9 library, because the engine that creates a SAS file determines its format, and the file format for SAS 7, 8, and 9 is the same.

For example, in a SAS 9 session, if you issue the following LIBNAME statement to assign a libref to a SAS library containing SAS 8 SAS files, SAS automatically uses the SAS 9 engine:

libname mylib 'v8-SAS-library';

In a SAS 9 session, if you issue the following LIBNAME statement to assign a libref to a SAS library that contains only SAS 6 files, SAS automatically uses the Version 6 compatibility engine:

libname mylib 'v6-SAS-library';

SAS automatically assigns an engine based on the contents of the SAS library as shown in the following table:

Default Library Engine Assignment in SAS 9
Engine Assignment SAS Library Contents
V9 No SAS files; the library is empty
V9 Only SAS 9 SAS files
V9 Only SAS 8 SAS files
V9 Only SAS 7 SAS files
V6 Only SAS 6 SAS files
V9 Both SAS 9 SAS files and SAS files from earlier releases

Note:   Even though SAS will automatically assign an engine based on the library contents, it is more efficient for you to specify the engine. For example, specifying the engine name in the following LIBNAME statement saves SAS from determining which engine to use:

libname mylib v6 'v6-SAS-library';

  [cautionend]

For more information about SAS engines, see SAS Engines.

Previous Page | Next Page | Top of Page