The GIS Procedure

COPY Statement

Copies a SAS/GIS catalog entry or data set.

Note: You can copy a single GIS entry or include the dependent entries and data sets that are referenced by the source.

Syntax

COPY <libref.catalog.>entry-name<.type> </ options> ;

Summary of Optional Arguments

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

specifies libref translations.

BLANK

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

DESTCAT=libref.catalog

specifies the destination for the copied catalog entries.

DESTLIB=libref

specifies the destination library for the copied data sets.

ENTRYTYPE=type

specifies the type of GIS catalog entry to copy.

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.

Required Argument

<libref.catalog.>entry<.type>

specifies the catalog entry to copy. If you specify a one-level name, the current catalog is used.

Note When you specify a four-level entry name, type must be the actual SAS/GIS catalog entry extension (for example, GISMAP, not MAP).

Options

Separate the list of options from the catalog entry name with a slash (/).

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. specifies that internal pathnames should be cleared in the copied entries.

DESTCAT=libref.catalog

specifies the destination for the copied catalog entries. If the libref value is omitted, WORK is used as the default. Entries are copied to WORK.catalog. If DESTCAT= is omitted, the libref value defaults to WORK and the catalog value defaults to the catalog name of the source being copied. For example, if you are copying either MAPS.USA.STATE or MAPSSAS.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 statements are identical:

copy maps.usa.state entrytype=gismap

copy maps.usa.state.gismap

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

You can use PROC COPY or another utility to copy a SAS/GIS catalog entry or data set. However, 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.