Previous Page | Next Page

The MIGRATE Procedure

PROC MIGRATE Statement


PROC MIGRATE IN=libref-1 OUT=libref-2 <BUFSIZE=n> <MOVE> <SLIBREF=libref> <KEEPNODUPKEY> ;


Required Arguments

IN=libref-1

names the source SAS library from which to migrate members.

Requirement: If you use a server, such as SAS/CONNECT or SAS/SHARE, the server must be SAS 9 or later.
Requirement: If cross-environment data access (CEDA) processing is invoked, and if the IN= source library contains catalogs, then you must specify the SLIBREF= option. See Using the SLIBREF= Option.
Requirement: 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 'path to source library';
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.
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.

Options

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.

Default: the original buffer page size that was used to create the source library member
n

specifies the number of bytes.

nK

specifies the number of kilobytes.

nM

specifies the number of megabytes.

nG

specifies the number of gigabytes.

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. See Using the MOVE Option 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. You must specify the SLIBREF= option when the processing invokes CEDA and catalogs members exist in the library. See Using the SLIBREF= Option.

Requirement: If the catalogs were created in SAS 6 or SAS 8, SLIBREF= must be assigned through a SAS 8 server.
Requirement: The SLIBREF= server must be running on the same kind 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.
Interaction: If CATALOG is the only member type in the library and you are using the SLIBREF= option, then omit the IN= argument.
Interaction: 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. Instead, specify the SAS/CONNECT or SAS/SHARE server libref in the IN= argument.
KEEPNODUPKEY

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

Previous Page | Next Page | Top of Page