MIGRATE Procedure

PROC MIGRATE Statement

Migrates a SAS library forward to the current release of SAS.

Syntax

Required Arguments

IN=libref-1
names the source SAS library from which to migrate members.
Requirements:If you use a server, such as SAS/CONNECT or SAS/SHARE, the server must be SAS 9.1.3 or later.

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 CATALOG is the only member type in the library and you are using the SLIBREF= option, then omit the IN= argument.

OUT=libref-2
names the target SAS library to contain the migrated members.
Restriction:Do not assign the OUT= target library to a server, such as SAS/CONNECT or SAS/SHARE. The REMOTE engine is not supported for the target library. The following example causes an error:
libname lib1 'source-library-pathname';
libname lib2 server=server id;
proc migrate in=lib1 out=lib2;
run;
Requirement:Assign the OUT= target library to a different physical location than the IN= source library.
Interaction:PROC MIGRATE can use the LIBNAME option OUTREP= for DATA, VIEW, ACCESS, MDDB, and DMDB member types. If you specify the OUTREP= option, you might also want to specify the EXTENDOBSCOUNTER= option. These options are appropriate in the LIBNAME statement for the OUT= library. See SAS Statements: Reference.
Tip:Assign the target library to an empty location. If a member already exists in the target library that has the same name and member type as a member in the source library, the member is not migrated. An error message is written to the SAS log, and PROC MIGRATE continues with the next member. Note that members in a sequential library are an exception, because PROC MIGRATE does not read the entire tape to determine existence.

Optional Arguments

BUFSIZE=n | nK | nM | nG
specifies the buffer page size of the members that are written to the target library. For example, a value of 8 specifies a page size of 8 bytes, and a value of 4k specifies a page size of 4096 bytes.
n
specifies the number of bytes.
nK
specifies the number of kilobytes.
nM
specifies the number of megabytes.
nG
specifies the number of gigabytes.
Default:the original buffer page size that was used to create the source library member
MOVE
deletes the original members from the source library. If a member already exists in the target library, the member is not deleted from the source library and a message is sent to the SAS log. If a catalog already exists in the target library, then no catalogs are deleted from the source library and a message is sent to the SAS log. Specifying MOVE reduces the scope of the validation tools. The validation tools are located on the SAS Web site at http://support.sas.com/rnd/migration/procmigrate/validtools.html. For more information, see Migrating a Library with Validation Tools .
Restriction:The engine that is associated with the IN= source library must support the deletion of tables. Sequential engines do not support the deletion of tables.
Tip:Use the MOVE option only if your system is space-constrained. It is preferable to verify the migration of the member before it is deleted.
SLIBREF=libref
specifies a libref that is assigned through a SAS/CONNECT or SAS/SHARE server. 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.
Requirements:If the catalogs were created in SAS 6 or SAS 8, SLIBREF= must be assigned through a SAS 8 server.

The SLIBREF= server must be running on the same type of operating environment as the source library. For example, if the source session is running under UNIX, then the server must be running under UNIX.

Interactions:If CATALOG is the only member type in the library and you are using the SLIBREF= option, then omit the IN= argument.

If you are migrating from a SAS®9 release or later (for example, migrating from SAS 9.1.3 to SAS 9.2), then SLIBREF= is not required. If you have incompatible catalogs, specify the SAS/CONNECT or SAS/SHARE server libref in the IN= argument and omit the SLIBREF= argument. For the IN= argument, the server must be SAS 9.1.3 or later.

KEEPNODUPKEY
specifies to retain the NODUPKEY sort order. See Migrating a SAS Data Set with NODUPKEY Sort Indicator.