Previous Page | Next Page

SAS Component Language Dictionary

LIBLIST



Displays a host selection window that lists the currently assigned librefs, and returns user's selections
Category: SAS Table

Syntax
Styles of Name Specification
Details
Examples
See Also

Syntax

selections=LIBLIST(<sel-excl<,engine<,message <,autoclose<,num-sel>>>>>);

selections

contains one or more librefs from the list, or blank if no selection is made. Multiple selections are separated by blanks. By default, selections is 200 bytes long. To accommodate values longer than 200 bytes, explicitly declare selections with a longer length.

Type: Character

sel-excl

is one or more librefs to include or exclude from the selection list window. Specify names using a style described in Styles of Name Specification.

Type: Character

engine

is one or more engines to use as criteria for determining which librefs are displayed. Specify names using a style described in Styles of Name Specification.

Type: Character

message

is the text for a message to display above the selection list. The default message tells users to make up to the number of selections in num-sel.

Type: Character

autoclose

is an obsolete argument but is retained for compatibility with earlier releases. If you want to specify a value for num-sel, then specify ' ' as a placeholder for this argument.

Type: Character

num-sel

specifies the maximum number of items a user can select from the list. To display the list for information purposes only (no selections allowed), specify 0. To specify unlimited selections, use a value such as 9999 that is larger than the number of available selections. A user cannot make a number of selections that exceeds the number of items in the list.

Type: Numeric


Styles of Name Specification

To specify more than one name, separate the names with a space -- for example, MYLIB1 MYLIB2.

To specify all names, use an asterisk ('*') or a null string ('').

To specify all names except those listed after the NOT sign, use a NOT sign (¬ or ^) followed by one or more names. For example, ^MYLIB1 displays all defined librefs except MYLIB1.


Details

LIBLIST opens the Library Selector window, which lists librefs, engines, and the physical names of the operating system files. However, only the selected libref is returned. The window contains a Browse button which a user can select to display the SAS Explorer window and select from the librefs that are currently assigned and their contents. After browsing data libraries, a user can select File [arrow] Close to return to the Library Selector window.

If you omit all the arguments for LIBLIST (for example, selections=liblist(); ), the selection list window lists all librefs that have been assigned in the current SAS session.

You can provide a default value that will be initially selected when the libref selection list is displayed. To do this, assign the value to the selections variable before calling LIBLIST.

If a user closes the selection list window without making a selection, LIBLIST returns a blank value unless there was an initial value for selections before LIBLIST was called.

Selections from the window can be returned in the current result list, if one is available. The current result list is a special SCL list that is automatically filled with the values that are selected from a selection list. To use a current result list, use the MAKELIST function to create the list, and use the CURLIST function to designate it as the current result list. The current result list must exist before you call the LIBLIST function.

When LIBLIST is invoked, the current result list is cleared. After LIBLIST is invoked, the result list contains the following named items:

TAG

identifies the list as one that was created by the LIBLIST function.

Type: Character

COUNT

contains the number of selected librefs, or 0 if a user makes no selections or issues a CANCEL command in the list window.

Type: Numeric

LIBREF

contains the name of each selected libref. There is one LIBREF element for each selected libref name.

Type: Character

LIBNAME

contains the physical name of the operating system file for each selected libref. There is one LIBNAME element for each selected libref.

Type: Character


Examples


See Also

CATLIST

DIRLIST

FILELIST

Previous Page | Next Page | Top of Page