|
Chapter Contents |
Previous |
Next |
| DIRLIST |
| Category: | Selection List |
| Syntax | |
| Name Specifications for Arguments | |
| Details | |
| Example | |
| See Also |
Syntax |
| selections=DIRLIST(lib-spec,member-type,num-sel,prefix<,table-type<,sel-excl<,message>>>); |
Type: Character
Type: Character
Type: Character
Type: Numeric
'Y''N' or
"DATA is one of the values of member-type. For information about table types, see the description
of the TYPE= data set option in SAS Language Reference: Dictionary.
Type: Character
N, then specify the
name here as member. If prefix is Y, then specify the name
here as libref.member.
Type: Character
Type: Character
" as a
placeholder for this argument.| Name Specifications for Arguments |
For lib-spec, member-type, and table-type, use these guidelines for specifying names:
*) or a null string
('').
| Details |
If a user closes the selection list window without making a selection, selections contains a blank value unless that variable contained a valid value before DIRLIST was called.
The values for all selections 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 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 DIRLIST function.
When the function is invoked, the current result list is cleared. After DIRLIST is invoked, the current result list contains the following named elements:
Type: Character
Type: Numeric
Y, then the name is in the form libref.member. Otherwise, it is in the form
member.
There is one NAME element for each selection made.
Type: Character
Type: Character
Type: Character
if (dirlist(dsid, 'TESTNDX')='NDXVAR')must be changed to
if (upcase(dirlist(dsid, 'TESTNDX'))='NDXVAR'If the application cannot be modified, you may need to specify the VALIDVARNAME=V6 system option when you run the application to ensure that the selections returned from the DIRLIST function will be uppercased.
| Example |
Display a selection list of SAS tables in the SAS libraries MYLIB1 and MYLIB2 except MYLIB1.ANSWERS, and enable users to select up to three table names. The selections are retrieved from the current environment list by using GETNITEMC.
listid=makelist();
rc=curlist(listid);
selections=dirlist('mylib1 mylib2','data',3,'Y',
' ','^ mylib1.answers');
n=getnitemn(listid,'COUNT');
do i=1 to n;
member=getnitemc(listid,'NAME',i);
descript=getnitemc(listid,'DESC',i);
memtype=getnitemc(listid,'TYPE',i);
put member= descript= memtype=;
end;
| See Also |
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.