Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

Tip: Supports RUN- group processing.

Tip: Supports the Output Delivery System. See Output Delivery System on page 32 for details.

ODS Table Name : See: Results: CATALOG Procedure on page 168

Reminder: You can perform similar functions with the SAS Explorer window and with dictionary tables in the SQL procedure. For information on the Explorer window, see the online Help. For information on PROC SQL, see Chapter 45, The SQL Procedure, on page 1041.

See: CATALOG Procedure in the documentation for your operating environment.

PROC CATALOG CATALOG=< libref .> catalog <ENTRYTYPE= etype > <FORCE> <KILL>;

To do this

Use this statement

Copy entries from one SAS catalog to another

 
 

Copy or move all entries

COPY (with MOVE option)

 

Copy entries to a new catalog (overwriting the catalog if it already exists)

COPY (with NEW option)

 

Copy only selected entries

COPY, SELECT

 

Copy all except the entries specified

COPY, EXCLUDE

Delete entries from a SAS catalog

 
 

Delete all entries

PROC CATALOG (with KILL option)

 

Delete all entries in catalog opened by another resource environment

PROC CATALOG (with FORCE and KILL options)

 

Delete all except the entries specified

SAVE

Alter names and descriptions

 
 

Change the names of catalog entries

CHANGE

 

Switch the names of two catalog entries

EXCHANGE

 

Change the description of a catalog entry

MODIFY

Print

 
 

Print the contents of a catalog

CONTENTS

PROC CATALOG Statement

PROC CATALOG CATALOG=< libref .> catalog <ENTRYTYPE= etype > <FORCE> <KILL>;

To do this

Use this option

Restrict processing to one entry type

ENTRYTYPE=

Delete all catalog entries

KILL

Force certain statements to execute on a catalog opened by another resource environment

FORCE

Required Arguments

CATALOG=< libref .> catalog

Options

ENTRYTYPE= etype

FORCE

KILL

CHANGE Statement

Renames one or more catalog entries.

Tip: You can change multiple names in a single CHANGE statement or use multiple CHANGE statements.

Featured in: Example 2 on page 172

CHANGE old-name-1 = new-name-1

Required Arguments

old-name = new-name

Options

ENTRYTYPE= etype

CONTENTS Statement

Lists the contents of a catalog in the procedure output or writes a list of the contents to a SAS data set, an external file, or both.

Featured in: Example 2 on page 172

CONTENTS <OUT= SAS-data-set > <FILE= fileref >;

Without Options

The output is sent to the procedure output.

Options

Note: The ENTRYTYPE= (ET=) option is not available for the CONTENTS statement.

CATALOG=< libref .> catalog

FILE= fileref

OUT= SAS-data-set

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: Example 1 on page 168

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

Options

ENTRYTYPE= etype

IN=< libref .> catalog

MOVE

NEW

NOEDIT

NOSOURCE

DELETE Statement

Deletes entries from a SAS catalog.

Tip: Use DELETE to delete only a few entries; use SAVE when it is more convenient to specify which entries not to delete.

Tip: You can specify multiple entries. You can also use multiple DELETE statements.

See also: SAVE Statement on page 163

Featured in: Example 1 on page 168

DELETE entry(s) </ ENTRYTYPE= etype >;

Required Arguments

entry(s)

Options

ENTRYTYPE= etype

EXCHANGE Statement

Switches the name of two catalog entries.

Restriction: The catalog entries must be of the same type.

EXCHANGE name-1 = other-name-1

Required Arguments

name = other-name

Options

ENTRYTYPE= etype

EXCLUDE Statement

Specifies entries that the COPY statement does not copy.

Restriction: Requires the COPY statement.

Restriction: Do not use the EXCLUDE statement with the SELECT statement.

Tip: You can specify multiple entries in a single EXCLUDE statement.

Tip: You can use multiple EXCLUDE statements with a single COPY statement within a RUN group.

See also: COPY Statement on page 158 and SELECT Statement on page 163

Featured in: Example 1 on page 168

EXCLUDE entry(s) </ ENTRYTYPE= etype >;

Required Arguments

entry(s)

Options

ENTRYTYPE= etype

MODIFY Statement

Changes the description of a catalog entry.

Featured in: Example 2 on page 172

MODIFY entry (DESCRIPTION=<< > entry-description < >>) </ ENTRYTYPE= etype >;

Required Arguments

entry

DESCRIPTION=<< > entry-description < >>

Options

ENTRYTYPE= etype

SAVE Statement

Specify entries not to delete from a SAS catalog.

Restriction: Cannot limit the effects of the KILL option.

Tip: Use SAVE to delete all but a few entries in a catalog. Use DELETE when it is more convenient to specify which entries to delete.

Tip: You can specify multiple entries and use multiple SAVE statements.

See also: DELETE Statement on page 160

SAVE entry(s) </ ENTRYTYPE= etype >;

Required Arguments

entry(s)

Options

ENTRYTYPE= etype

SELECT Statement

Specifies entries that the COPY statement will copy.

Restriction: Requires the COPY statement.

Restriction: Cannot be used with an EXCLUDE statement.

Tip: You can specify multiple entries in a single SELECT statement.

Tip: You can use multiple SELECT statements with a single COPY statement within a RUN group.

See also: COPY Statement on page 158 and EXCLUDE Statement on page 161

Featured in: Example 1 on page 168

SELECT entry(s) </ ENTRYTYPE= etype >;

Required Arguments

entry(s)

Options

ENTRYTYPE= etype

Категории