SCL Lists |
List indexing is similar to array indexing. An index I specifies the position of an item in the list. The first item is at index I=1, and the last item is at index I=LISTLEN(mylistid), which is the length of the list. Thus, you can use DO loops to process all items in a list, as shown in the following example:
do i=1 to listlen(mylistid); t=itemtype(mylistid,i); put 'Item ' i ' is type ' t; end;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.