Chapter Contents |
Previous |
Next |
IVARLIST |
Category: | SAS Table |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
varlist=IVARLIST(table-id,key-name); |
Type: Character
Type: Numeric
Type: Character
Details |
An index is an auxiliary data structure used to speed up the selection of records that are specified by the value of a column.
An index is called a simple index if it contains the value of only one column. A composite index merges the values for more than one column to form a single value. A given SAS table can have multiple simple indexes, composite indexes, or a combination of these.
You can create indexes using
Note: Because some engines now support mixed-case filenames, IVARLIST now retains the cases of the returned selected items. If your application contains code that assumes that the returned selection is in uppercase, your application may fail. You may need to modify your application. For example, you can use the UPCASE(footnote 1) function to convert the returned selection to uppercase:
if (upcase(ivarlist(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 IVARLIST function are in uppercase.
Example |
Return the column list that is indexed for the key ITEMTYPE in the SAS table MYLIB.DATAONE. Assume that ITEMTYPE is a simple index (that is, it contains the values of only one column). The returned VARLIST contains the string ITEMTYPE.
tableid=open('mylib.dataone','i'); varlist=ivarlist(tableid,'itemtype');
See Also |
VALIDVARNAME system option in SAS Language Reference: Dictionary
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.