|SAS Logical: _getMembers|
|_getMembers List Items|
|Example 1: Select-exclude lists|
|Example 2: Item masks|
|Example 3: Obtaining a list of librefs and paths|
|CALL SEND (object-id, '_getMembers', members-list<, select-exclude><, item-mask><, 'APPEND'>);|
||N||specifies the identifier of an SCL list. Each entry in members-list corresponds to a SAS logical name and is a sublist containing the items in Table 1. Specify members-list as a numeric variable that is initialized either to 0 or to a valid list identifier. If the value of members-listis 0, then _getMembers will create a new list, fills it with the members of the Catalog object, and returns the list identifier. If members-listis nonzero, then it must be a valid list identifier; otherwise, the program halts with an error.|
||C||specifies the entries that are returned in members-list.
Uses this form:
||C||specifies the named items that are included in each members-list entry. item-mask is a blank-separated string of the item names from members-list. To exclude an item from each entry of members-list, precede it with a "not" character, for example '^' or '¬'.|
||C||appends any members entries to members-list; members-list is cleared by default.|
|NAME||C||the SAS Logical name of the entry|
|ENGINE||C||the engine used to access NAME, for example, 'v608'|
|PATH||C||the external pathname|
|TYPE||C||the Logical name type. If TYPE cannot be determined, _unknownFile is returned. More descriptive information is returned in the lists returned by _getLibrary or _getExtfile, and TYPE can be checked in those lists.|
|SERVER||C||the name of the server if the member is a remote SAS library|
|DATA_REP||C||the type of data representation if the member is a remote SAS library; can be _dndText, _dndFile, or _dndDataset. For more information about these representations, see SAS/AF online help.|
_getMembers and _loadMembers perform the same function except _getMembers allows you to select the members and items that are loaded.
By default, _getMembers clears all items from members-list
and fills it with the SAS Logical object members. If
'APPEND' is specified, the SAS Logical object members are appended to the existing members-list. The conditions defined by the select-exclude, item-mask, and
options arguments determine the items that
are returned in the list.
The following select-exclude string restricts the entries in members-list to only those librefs with a V608 engine:
"type='library' engine='v608' name='^sashelp ^sasuser'"
The following select-exclude string restricts the entries in members-list to all non-libref logical names:
The following item-mask restricts the items in each entry to only NAME and TYPE:
The following item-mask excludes the ENGINE item from each entry, but all other items (NAME, PATH and TYPE) will be included:
This example demonstrates how to use the Logical class to obtain a
list of librefs and paths for all currently defined SAS librefs. Since members is set to
0 before the method invocation, after
returning from _getMembers, members will contain the list of
logclass=loadclass ('sashelp.fsp.logical.class'); logobj3=instance(logclass); members=makelist(); call send (logobj3, '_get_members_', members, "type='library'", "name path");
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.