Compatibility
![]()
|
You might find these techniques helpful in maintaining files together that were created under different releases of SAS.
After migrating a library to SAS 9, you might want to put SAS 9 files together with SAS 6, 7, or 8 files in one library. This can be done with library concatenation. When you concatenate SAS libraries, you reference multiple SAS data libraries with a single libref. This is called a multi-version library.
Here is an example. Suppose you have files in both a SAS 6 library and a SAS 9 library. The following LIBNAME statements enable you to process both SAS 6 and SAS 9 libraries using one libref.
You assign a libref to the SAS 6 library to use the V6 compatibility engine:
libname old v6 'v6-SAS-data-library';You assign a libref to the SAS 9 library to use the SAS 9 base SAS engine:
libname new v9 'v9-SAS-data-library';You concatenate the two into one libref:
libname mylib (new old);Now you can invoke the application using the MYLIB libref, which accesses both data libraries.
For more information about library concatenation, see "Library Concatenation" in the chapter "SAS Data Libraries" in SAS Programmer's Guide: Essentials.
For example, the following LIBNAME statements assign two librefs to the same directory: one for the V6 compatibility engine and the other for the V9 base SAS engine:
libname v6files v6 'SAS-data-library'; libname v9files v9 'SAS-data-library';To process the files, reference the appropriate libref. For example, the following statements print a SAS 6 data set:
proc print data=v6files.member1; run;These statements print a SAS 9 data set:
proc print data=v9files.member2; run;
The special topic Migrating Files from a Multi-Version Directory provides instructions for migrating files from a multi-version directory and a workaround for migrating a selected file from a directory.