Chapter Contents |
Previous |
Next |
CATLIST |
Category: | Catalog, Selection List |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
selections=CATLIST(catalog-name,type,num-sel,prefix<,message>); |
Type: Character
*
to allow
a user to interactively select a libref, catalog, and entry.
Type: Character
'ALL'
or ' '
.0
. To specify an unlimited number of
selections, use a value that is equal to or 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
'Y' |
returns selected names in the form libref.catalog.entry.type. This is the default value if catalog-name is *. |
'N' | ' ' |
returns selected names in the form entry.type. |
Type: Character
Type: Character
' '
as a placeholder
for this argument.
Type: Character
Details |
You can provide default values that will be initially selected when the catalog selection list is displayed. To do this, assign the values to the selections variable before calling CATLIST. If selections contains valid values when the function is invoked, then those names are automatically designated as selected when the selection list is displayed.
If a user closes the Catalog Entry Selector window without making a selection, then CATLIST returns a blank value unless there was an initial value for the selections variable before CATLIST 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 have been selected from a selection list. To create a current result list, use the MAKELIST function to create it, and use the CURLIST function to designate it as the current result list. The current result list must exist before you call the CATLIST function.
When CATLIST is invoked, the current result list is cleared. After CATLIST is invoked, the result list contains the following named items:
Type: Character
Type: Numeric
Y
, then the prefix is appended to the beginning of each name.
There is one NAME element for each selection.
Type: Character
Type: Character
Type: Character
if (catlist(dsid, 'TESTNDX')='NDXVAR')must be changed to
if (upcase(catlist(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 CATLIST function will be uppercased.
Example |
Display a selection list that contains the entries in the catalog MYLIB.TEST, and allow users to make up to five selections. Use GETNITEMC to retrieve the selected values from the current result list.
listid=makelist(); rc=curlist(listid); selections=catlist('mylib.test','all',5); n=getnitemn(listid,'COUNT'); do i=1 to n; name=getnitemc(listid,'NAME',i); desc=getnitemc(listid,'DESC',i); date=getnitemc(listid,'DATE',i); put name= desc= date=; end;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.