MIGRATE Procedure

Migrating a Data File with Audit Trails, Generations, Indexes, or Integrity Constraints

In all cases, the data file migrates first, and then the audit trails, generations, index, or integrity constraints are applied. Errors are handled in the following ways:
  • If an error occurs while an index is created for a migrated data file, the data file might migrate without the index, or processing might stop. A message is written to the SAS log. If an index fails to migrate, resolve the error and recreate the index in the target library.
    If an index is missing from the source library, then depending on the environment and system options, SAS might try to repair the data set during migration by recreating the index. If the data set is incompatible with the session encoding or data representation, recreating the index produces an error. To resolve the error, recreate the index in the source library using the original operating system or move the index from its original location, and submit the PROC MIGRATE again. The error can occur when a customer has moved a data set using the operating system and failed to include an index in the move.
  • If an error occurs while integrity constraints are applied to a migrated data file, or while an audit trail or generations are migrated, the data file is removed from the target library. A note is written to the SAS log. If the MOVE option is specified, it does not delete the data file from the source library.
  • For a data file with referential integrity constraints, the MOVE option does not delete any members in the source library, even when the migration is successful. You must remove referential integrity constraints before the member can be deleted. An error message is written to the SAS log.