Chapter Contents |
Previous |
Next |
CATNAME |
Category: | Catalog |
Syntax | |
Details | |
Examples | |
Example 1: Defining a CATNAME | |
Example 2: Defining a CATNAME for a list-id | |
See Also |
Syntax |
rc=CATNAME(cat-name,action<,catalog-list><,list-id>); |
0 | successful |
1 | not successful |
Type: Numeric
Type: Character
'SET' |
sets the definition. |
'CLEAR' |
clears the definition. |
'LIST' |
lists the members and saves them in the SCL list referenced by list-id. |
Type: Character
Type: Character
SET
and catalog-list is not specified. If
action is LIST
, then the list contains the following information about
all of the entries:
CATNAME
Type: Character
LEVELS
Type: Numeric
(sublist1...sublistn)
Type: List
The sublist elements are as follows:
LEVEL
, which is the level number.
Type: Numeric
CATALOG
, which is the catalog name.
Type: Character
ENGINE
, which is the engine name.
Type: Character
PHYSICAL NAME OF LIBRARY
, which
is the physical name of the library. Type: Character
Details |
CATNAME defines a concatenated catalog that is a logical combination of the entries in two or more SAS catalogs. When the program uses cat-name as the catalog in a catalog entry name, SAS searches for the specified entry in the catalogs specified in catalog-list or list-id. A concatenated catalog name that is defined with CATNAME can be part of catalog-list or list-id for another CATNAME function.
This feature is most useful for debugging and testing during application development. It eliminates the need to copy a whole catalog when you need to test and change a single catalog entry that contains a particular method.
Examples |
Create concatenated catalog S.T, which logically combines the entries in catalogs A.B and C.D. Then, create concatenated catalog E.F, which contains the logical combination of the entries in the concatenated catalog S.T as well as the entries in Q.T and X.Y. A subsequent reference in a program to S.T.TEST.SCL causes SAS to search for A.B.TEST.SCL and then for C.D.TEST.SCL. A reference to E.F.TEST.SCL causes SCL to search for A.B.TEST.SCL, then for C.D.TEST.SCL, then for Q.T.TEST.SCL, and finally for X.Y.TEST.SCL.
rc=catname ('s.t','set','a.b c.d'); rc=catname ('e.f','set','s.t q.t x.y');
Use the 'LIST' action to query the definition of E.F from Example 1.
list=makelist(); rc=catname('e.f','list',",list); call putlist(list);
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.