Chapter Contents

Previous

Next
SAS/AF Software: Class Dictionary

Using the SAS Metalib Class

When you instantiate a SAS Metalib object, only the object identifier is created. You then add information about SAS library members to the object. This step is referred to as initializing the object. To initialize a SAS Metalib object, use the _setup method. This example creates a SAS Metalib object, METLIBOBJ, and initializes with information about any currently defined librefs, except SASUSER and SASHELP:

metlibclass=loadclass
            ('sashelp.fsp.metalib.class');
metlibobj=instance(metlibclass);
call send(metlibobj, '_setup_', '^sasuser
          ^sashelp');

Note:   All examples assume that you have instantiated a SAS Metalib object and initialized it using _setup.  [cautionend]

If you use PUTLIST to list the contents of METLIBOBJ, you see that it is associated with many automatically allocated librefs, such as WORK and MAPS, and also with any personal librefs you may have allocated. In this case LIB and EX were librefs that existed when the SAS Metalib object was created:

( _class=2621
  DESC='SAS Metalib Class'
  LIBRARIES=( WORK=( _class=2653
                     DESC='SAS Library Class'
                     ATTRIBUTES=( SEQUENTIAL=0
                                 )[2655]
                     ENGINE='V611'
                     NAME='WORK'
                     PATHS=_blank
                     SERVER=''
                     PATH=('pathname/saswork'
                           )[2657]
                     DATA_REP=''
                    )[2661]
              LIB=( _class=2653
                    DESC='SAS Library Class'
                    ATTRIBUTES=( SEQUENTIAL=0
                                )[2689]
                    ENGINE='V611'
                    NAME='LIB'
                    PATHS=_blank
                    SERVER=''
                    PATH=( 'pathname'
                          )[2687]
                    DATA_REP=''
                   )[2685]
              EX=( _class=2653
                   DESC='SAS Library Class'
                   ATTRIBUTES=( SEQUENTIAL=0
                               )[2705]
                   ENGINE='V611'
                   NAME='EX'
                   PATHS=_blank
                   SERVER=''
                   PATH=( 'pathname'
                         )[2703]
                   DATA_REP=''
                  )[2701]
              MAPS=( _class=2653
                     DESC='SAS Library Class'
                     ATTRIBUTES=(SEQUENTIAL=0
                                 )[2711]
                     ENGINE='V611'
                     NAME='MAPS'
                     PATHS=_blank
/* */
                     SERVER=''
                     PATH=( '(pathname'
                            'pathname)'
                           )[2709]
                     DATA_REP=''
                    )[2707]
             )[2639]
 )[2635]


Chapter Contents

Previous

Next

Top of Page

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