MIGRATE Procedure

Considerations for Each Member Type

Here are the considerations for each member type. Remember that a SAS data set can be a data file or a data view. See also several important restrictions at the beginning of the syntax section.

Data Files

PROC MIGRATE retains compression, created and modified datetimes, deleted observations, encryption, indexes, integrity constraints, and passwords. The audit trail and generations are also migrated. Indexes and integrity constraints are rebuilt on the member in the target library. Migrated data files take on the data representation and encoding attributes of the target library. See Migrating a Data File with Audit Trails, Generations, Indexes, or Integrity Constraints.

Views

As with data files, migrated data views take on the data representation and encoding attributes of the target library. When you migrate a library that contains DATA step views to a different operating environment, and the views were created before SAS 9.2, setting the proper encoding might be necessary. In releases before SAS 9.2, DATA step views did not save encoding information. Therefore, if the view has a different encoding than the target session, you must specify the INENCODING= option for the source library's LIBNAME statement. Here is an example:
libname srclib 'c:\mysource' inencoding="OPEN_ED-1047";
libname lib1 'c:\mytarget';
proc migrate in=srclib out=lib1;
run;
A note is printed to the log that recommends using the validation tools to recompile the DATA step view and determine whether the migration was successful. See Migrating a Library with Validation Tools .
In addition, embedded librefs associated with a view are not updated during migration. The following example illustrates the issue. In this example, LIB1.MYVIEW contains a view of the data file LIB1.MYDATA:
data LIB1.MYDATA;x=1;
run;
proc sql;
   create view LIB1.MYVIEW as select * from LIB1.MYDATA;
quit;
After you migrate LIB1 to LIB2, you have LIB2.MYVIEW and LIB2.MYDATA. However, because LIB2.MYVIEW was originally created with an embedded libref of LIB1, it still references the data file LIB1.MYDATA, not LIB2.MYDATA. The following example fails with an error message that LIB1 cannot be found:
proc print data=LIB2.MYVIEW;
run;
PROC MIGRATE supports three types of views: DATA step views, SQL views, and SAS/ACCESS views:
DATA Step Views
Beginning with SAS 8, when you create a DATA step view, you can specify the SOURCE= option to store the DATA step code along with the view. PROC MIGRATE supports DATA step views with stored code. The stored code is recompiled the first time the DATA step view is accessed by SAS in the target environment. PROC MIGRATE does not support DATA step views that were created before SAS 8 or DATA step views without stored code. For DATA step views without stored code, use the DESCRIBE statement in the source session to recover the DATA step code. Then submit the DATA step code in the target session and recompile it.
PROC SQL Views
PROC MIGRATE supports PROC SQL views with no known issues.
SAS/ACCESS Views
PROC MIGRATE supports SAS/ACCESS views that were written with the Oracle, Sybase, or DB2 engine. PROC MIGRATE automatically uses the CV2VIEW procedure, which converts SAS/ACCESS views into SQL views. Migrating SAS/ACCESS views to a different operating environment is not supported. For more information about the conversion, see the overview of the CV2VIEW procedure in SAS/ACCESS for Relational Databases: Reference.

Catalogs

To migrate catalogs, PROC MIGRATE calls PROC CPORT and PROC CIMPORT. You might notice that CPORT and CIMPORT notes are written to the SAS log during migration. PROC CPORT and CIMPORT restrictions apply. For example, catalogs in sequential libraries are not migrated.
Restriction PROC MIGRATE is not supported for SAS 6 AIX catalogs. Use PROC CPORT and PROC CIMPORT instead. See “Additional Steps for Unsupported Catalogs.”
Requirement If cross-environment data access (CEDA) processing is invoked, and if the IN= source library contains catalogs, then you must specify a SAS/CONNECT or SAS/SHARE libref in the IN= option or in the SLIBREF= option. See “Using the SLIBREF= Option” to determine whether to specify the libref in the IN= or SLIBREF= argument. If the catalogs were created in SAS 6 or SAS 8, SLIBREF= must be assigned through a SAS 8 server.

MDDBs

PROC MIGRATE supports MDDBs with no known issues.

Program Files

PROC MIGRATE does not support program files. If a program file exists in the library, a message is written to the SAS log.

Items Stores

PROC MIGRATE supports item stores unless you migrate from a 32-bit to a 64-bit environment. Migrations from 32-bit to 64-bit environments use Remote Library Services (RLS), which does not support item stores. In that case, an error message is not written to the SAS log, but item stores might not work correctly in the target library.