Previous Page | Next Page

The GIS Procedure

COPY Statement


Copies a SAS/GIS catalog entry or data set. You can copy a single GIS entry or include the dependent entries and data sets that are referenced by the source.
COPY <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 new copy of the entry.

BLANK

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

DESTCAT=libref.catalog

specifies the destination for the copied catalog entries.

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

DESTLIB=libref

specifies the destination library for the copied data sets.

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

ENTRYTYPE=type

specifies the type of GIS catalog entry to copy. 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 statement are identical:

  • COPY MAPS.USA.STATE ENTRYTYPE=GISMAP

  • COPY 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 copied entries and data sets should be overwritten.

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

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

_ALL_

copies all dependent catalog entries and data sets. It is equivalent to specifying both ENTRY and DATA.

ENTRY

copies all dependent catalog entries.

DATASETS

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

LABEL

copies dependent label data sets.

NOSOURCE

copies entry dependents as specified, but does not copy the specified source entry.

OTHER

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

SPATIAL

copies dependent spatial data sets.


Details

When you use the COPY 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 copy 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