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.
Tips: Use SELECT or EXCLUDE statements, but not both, after the COPY statement to limit which entries are copied.

You can copy entries from multiple catalogs in a single PROC step, not just the one specified in the PROC CATALOG statement.

The ENTRYTYPE= option does not require a forward slash (/) in this statement.

Copying, Deleting, and Moving Catalog Entries from Multiple Catalogs


Summary of Optional Arguments

restricts processing to one type of entry.
copies from a different catalog in the same step.
enables concurrent users to copy to the same catalog at the same time.
moves (copy and then delete) a catalog entry.
copies entries to a new catalog (overwriting the catalog if it already exists).
protects several types of SAS/AF entries from being edited with PROC BUILD.
does not copy source lines from a PROGRAM, FRAME, or SCL entry.

Required Argument

names the catalog to which entries are copied.

Optional Arguments

restricts processing to one entry type for the current COPY statement and any subsequent SELECT or EXCLUDE statements.
specifies the catalog to copy.
Interaction:The IN= option overrides a CATALOG= argument that was specified in the PROC CATALOG statement.
specifies whether to enable more than one user to copy to the same catalog at the same time. Using LOCKCAT=SHARE locks individual entries rather than the entire catalog, which enables greater throughput. The default is LOCKCAT=EXCLUSIVE, which locks the entire catalog to one user. Note that using the LOCKCAT=SHARE option can lessen performance if used in a single-user environment because of the overhead associated with locking and unlocking each entry.
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.
overwrites the destination (specified by OUT=) if it already exists. If you omit NEW, PROC CATALOG updates the destination.
See:For information about using the NEW option with concatenated catalogs, see Catalog Concatenation.
prevents the copied version of the following SAS/AF entry types from being edited by the BUILD procedure:
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.
omits copying the source lines when you copy a SAS/AF PROGRAM, FRAME, or SCL entry.
Restriction:If you specify this option for an entry other than a PROGRAM, FRAME, or SCL entry, it is ignored.