Previous Page | Next Page

The GIS Procedure

MOVE Statement


Moves a SAS/GIS catalog entry or data set. You can move a single GIS entry or include the dependent entries and data sets that are referenced by the source.
Note: Before you use the MOVE statement on a catalog entry or data set, make sure that you have WRITE permission to the source location. The MOVE statement deletes the original entry or data set and creates a new copy in the target directory. If you do not have WRITE permission to the source location, MOVE leaves the original entry or data set in its directory and creates a copy in the target directory.

MOVE <libref.catalog.>entry<.type> </ options>;

Options

ALIAS=(old-libref-1=new-libref-1 <, ... ,old-libref-n=new-libref-n>)

specifies libref translations. The old-libref value is the libref that is stored in the existing catalog entry. The new-libref value is the libref that you want to substitute in the moved entry.

BLANK

specifies that internal pathnames should be cleared in the moved entries.

CHECKPARENT

specifies that data sets and catalog entries are checked before they are moved to see what other GIS entries references them. If any references are found, the catalogs and data sets are copied instead of being moved.

If CHECKPARENT is not specified (the default), data sets and catalog entries are moved without checking for references, which might cause problems with other GIS entries.

CAUTION:
Do not use host commands to move or rename SAS data sets that are referenced in GISSPA entries.

Moving or renaming a data set that is referred to in a spatial entry breaks the association between the spatial entry and the data set. To prevent breaking the association, use the PROC GIS MOVE statement with the CHECKPARENT option instead of a host command.  [cautionend]

DESTCAT=libref.catalog

specifies the destination for the moved catalog entries.

If libref is omitted, WORK is used as the default. Entries are moved to the WORK.catalog. If DESTCAT= is omitted, libref defaults to WORK and the catalog to the catalog name of the source being moved. For example, if you are moving MAPS.USA.STATE, and you omit DESTCAT=, the data set that you are moving is written to WORK.USA.STATE.

DESTLIB=libref

specifies the destination library for the moved data sets.

If DESTLIB= is omitted, the default libref is WORK.

ENTRYTYPE=type

specifies the type of GIS catalog entry to move. The following are the values for type:

  • GISSPA or SPATIAL

  • GISMAP or MAP

  • GISLAYER or LAYER

  • GISCOVER or COVERAGE

This argument can be omitted if a complete, four-level entry name is specified. The following statements are identical:

  • MOVE MAPS.USA.STATE ENTRYTYPE=MAP

  • MOVE MAPS.USA.STATE.GISMAP

Note:   When you specify four-level entry names, type must be the actual SAS/GIS catalog entry extension, for example, GISMAP, not MAP.  [cautionend]

REPLACE

specifies that both existing catalog entries and data sets that have the same name as moved entries and data sets should be overwritten.

SELECT= _ALL_ | ENTRY | DATASETS | SPATIAL | LABEL | OTHER | NOSOURCE

specifies which data sets or catalog entries that are referenced by the source entry should be moved. The following are the values for this argument:

_ALL_

moves all dependent catalog entries and data sets. Equivalent to specifying both ENTRY and DATA.

DATA

moves all dependent data sets. It is equivalent to specifying SPATIAL, LABEL, and OTHER.

ENTRY

moves all dependent catalog entries.

LABEL

moves dependent label data sets.

NOSOURCE

moves entry dependents as specified, but does not move the specified source entry.

OTHER

moves other dependent data sets (besides spatial and label data sets), such as linked attribute data sets.

SPATIAL

moves dependent spatial data sets.


Details

When you use the MOVE statement, you must specify the catalog entry for the source entry you want to copy. If you specify a one-level name, the current catalog is used.

Note:   When you specify a four-level entry name, the type must be the actual SAS/GIS catalog entry extension, for example, GISMAP instead of MAP.  [cautionend]

Note:   If you use PROC COPY or another utility to move a SAS/GIS catalog entry or data set, you might receive warnings in your SAS log that the paths are not the same. If you receive a message that the paths are not the same, you can use the SYNC statement to reset the paths. See SYNC Statement for more information.  [cautionend]

Previous Page | Next Page | Top of Page