Chapter Contents

Previous

Next
The CATALOG Procedure

COPY Statement


Copies some or all of the entries in one catalog to another catalog.

Restriction: A COPY statement's effect ends at a RUN statement or at the beginning of a statement other than the SELECT or EXCLUDE statement.
Tip: Use SELECT or EXCLUDE statements, but not both, after the COPY statement to limit which entries are copied.
Tip: You can copy entries from multiple catalogs in a single PROC step, not just the one specified in the PROC CATALOG statement.
Tip: The ENTRYTYPE= option does not require a forward slash (/) in this statement.
Featured in: Copying, Deleting, and Moving Catalog Entries from Multiple Catalogs


COPY OUT=<libref.>catalog <options>;

To do this Use this option
Restrict processing to one type of entry ENTRYTYPE=
Copy from a different catalog in the same step IN=
Move (copy and then delete) a catalog entry MOVE
Copy entries to a new catalog (overwriting the catalog if it already exists) NEW
Protect several types of SAS/AF entries from being edited with PROC BUILD NOEDIT
Not copy source lines from a PROGRAM, FRAME, or SCL entry NOSOURCE


Required Arguments

OUT=<libref.>catalog
names the catalog to which entries are copied.


Options

ENTRYTYPE=etype
restricts processing to one entry type for the current COPY statement and any subsequent SELECT or
EXCLUDE statements.
See: The ENTRYTYPE= Option
See also: Specifying an Entry Type

IN=<libref.>catalog
specifies the catalog to copy.
Interaction: The IN= option overrides a CATALOG= argument that was specified in the PROC CATALOG statement.
Featured in: Copying, Deleting, and Moving Catalog Entries from Multiple Catalogs

MOVE
deletes the original catalog or entries after the new copy is made.
Interaction: When MOVE removes all entries from a catalog, the procedure deletes the catalog from the library.

NEW
overwrites the destination (specified by OUT=) if it already exists. If you omit NEW, PROC CATALOG updates the destination.

NOEDIT
prevents the copied version of the following SAS/AF entry types from being edited by the BUILD procedure:

CBT PROGRAM
FRAME SCL
HELP SYSTEM
MENU

Restriction: If you specify the NOEDIT option for an entry that is not one of these types, it is ignored.
Tip: When creating SAS/AF applications for other users, use NOEDIT to protect the application by preventing certain catalog entries from being altered.
Featured in: Copying, Deleting, and Moving Catalog Entries from Multiple Catalogs

NOSOURCE
omits copying the source lines when you copy a
SAS/AF PROGRAM, FRAME, or SCL entry.
Alias: NOSRC
Restriction: If you specify this option for an entry other than a PROGRAM, FRAME, or SCL entry, it is ignored.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.