|
Step 2
|
In some operating environments, you can store SAS 6 files in the same physical directory as SAS 7, 8, or 9 files, which is called a multi-version directory. See Maintaining Files from Different Releases for more information.
You can migrate SAS library members from a multi-version directory by performing a separate migration for each version. In other words, although the library members are stored together in one physical directory, you must think of each version as a separate library of data. For each SAS version that is represented in the directory, submit a LIBNAME statement and a MIGRATE procedure that are specific to the version.
For example, the following code migrates SAS 6 and SAS 8 members from one physical location to SAS®9 members in another physical location:
/* step 1: Migrate V6 members to the target library */ libname source6 v6 'source-library-pathname'; libname target base 'target-library-pathname'; proc migrate in=source6 out=target; run; /* step 2: Migrate V8 members to the target library */ libname source8 v8 'source-library-pathname'; libname target base 'target-library-pathname'; proc migrate in=source8 out=target; run;
Notice that you must specify the appropriate engine name in each LIBNAME statement. Otherwise, SAS assigns the engine. For example, if a library contains only SAS 8 members, SAS assigns the V8 engine. If a library contains only SAS 6 members, SAS assigns the V6 engine. But if a library contains both SAS 6 and SAS 8 members, SAS assigns the default V8 engine, and only the SAS 8 members are migrated. You can avoid this error by specifying the appropriate engine name in each LIBNAME statement.
See the PROC MIGRATE Calculator for the remainder of your migration instructions.
The MIGRATE procedure migrates an entire SAS data library to SAS®9 format within one engine family. However, you might not want to migrate all the members of a library. In order to migrate one member of a library, you must first move the file to its own physical directory. Then assign a new libref to the new directory, and use PROC MIGRATE against the new library. See your SAS Cmpanion for information about assigning a SAS libref to a physical directory.
Return to Step 2.