SCL Lists |
You can create new lists and then insert numbers, character strings, objects, and even other lists into them. You can replace or delete list items, and you can move them around by reversing, rotating, or sorting a list. You can also assign names to the items in a list, and you can refer to items by their names rather than by their index (position) in the list. Thus, you can use a list to implement data structures and to access and assign values to list items by their names. Using this feature, you can add new fields to the list data structure or change the order of the list's items without modifying your SCL program.
SCL lists are maintained entirely in memory. Keep this in mind as you develop your applications. If your data is more appropriately maintained in a SAS table, you will probably want to design your application in that manner instead of trying to read the entire SAS table into a list. However, if you know your SAS table will not contain a large number of rows and many columns, and if you do not need to maintain data sharing, then you may find it convenient to read the SAS table into a list. That is, you can use SCL lists for data that you would have liked to put into an array but could not because of the restrictions imposed by arrays.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.