SAS Component Language Dictionary |
Category: | List |
Syntax | |
Details | |
See Also |
Syntax |
item-name=NAMEITEM(list-id<,index<,new-name>>); |
contains the name of the specified list item, or a blank if the item does not have a name.
is the identifier of the list that contains the indexed item. An invalid list-id produces an error condition.
is the position of the item in the list. The position can be specified as a positive or negative number. By default, index is 1 (the first item). If index is a positive number, then the item is at position index from the beginning of the list. If index is a negative number, then the item is at position ABS(index) from the end of the list. An error condition results if the absolute value for index is zero or if it is greater than the number of items in the list.
Details |
NAMEITEM returns the name of the item at the list position specified by index. If a value for new-name is also provided, then NAMEITEM assigns that name to the item, replacing the old name.
An error condition results if the value for new-name is provided and the list has any of the following attributes:
To check the attributes of a list or list item, use HASATTR. To change attributes, use SETLATTR.
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.