Chapter Contents

Previous

Next
SAS Library: _getCatalog

SAS Library: _getCatalog



Creates and initializes a SAS Catalog object


Syntax
Details
Example

Syntax

CALL SEND (library-object-id, '_getCatalog', catalog-name, catalog-object-id);

Argument Type Description
catalog-name
C specifies the one-level name of the SAS catalog
catalog-object-id
N returns the object identifier of the SAS Catalog object that is created. If no library member name matches catalog-name, the value returned in catalog-object is 0.


Details

The returned object identifier, catalog-object-id, can be accessed and manipulated by all of the methods defined in the SAS Catalog class.


Example

This example associates the SAS Library object, LIBOBJ3, with the libref, SASHELP. _getCatalog then creates the SAS Catalog object, CATOBJ, and associates it with SASHELP.FSP.

libclass=loadclass
         ('sashelp.fsp.library.class');
libobj3=instance(libclass);
call send(libobj3, '_setup_', 'sashelp');
call send(libobj3, '_get_catalog_', 'fsp', 
          catobj);

If you use PUTLIST to list the contents of CATOBJ, you see that it is associated with SASHELP.FSP:

( _class=2643
  DESC='SAS Catalog Class'
  FULLNAME='SASHELP.FSP'
  LIBRARY=<invalid list id>[0]
  ATTRIBUTES=<invalid list id>[0]
 )[2649]

LIBRARY and ATTRIBUTES are list identifiers. Notice that at this point, they have a value of 0, an invalid list ID. The reason is that these values are not yet initialized. Use _getLibrary and _getAttributes for the SAS Catalog class to initialize these lists.


Chapter Contents

Previous

Next

Top of Page

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