Chapter Contents |
Previous |
Next |
LIBLIST |
Category: | SAS Table |
Syntax | |
Styles of Name Specification | |
Details | |
Examples | |
See Also |
Syntax |
selections=LIBLIST(<sel-excl<,engine<,message <,autoclose<,num-sel>>>>>); |
Type: Character
Type: Character
Type: Character
Type: Character
' '
as
a placeholder for this argument.
Type: Character
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 | Close |
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:
Type: Character
Type: Numeric
Type: Character
Type: Character
Examples |
'Choose a
libref'
.
select=liblist('^mylib mylib2','*',Choose a libref');
select=liblist('^sashelp maps','v609', 'Choose up to 3 librefs','',3);
listid=makelist(); rc=curlist(listid); select=liblist('^ mylib1 mylib2',' ', 'Choose up to 5 librefs','', 5); n=getnitemn(listid,'COUNT'); do i=1 to n; libref=getnitemc(listid,'LIBREF',i); physname=getnitemc(listid,'LIBNAME',i); put libref= physname=; end;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.