SCL Lists |
You can delete items from SCL lists by specifying the position, or index, of the item to delete; by clearing all of the values from a list; or by deleting the entire list. You can also pop items from lists, which enables you to create queues or stacks. See Using SCL Lists as Stacks and Queues.
To delete a single list item, use the DELITEM or DELNITEM function, specifying either the index or the name of the item to delete.
To clear all the values from a list, use the CLEARLIST function, which leaves the list with a length of 0.
To delete an entire list, use the DELLIST function. This function returns to the system the memory that was required for maintaining the list and its items.
Note: When you delete a list that has sublists, you should delete the list recursively if you do not need to use the information in the sublists. When you do not delete a list, the memory occupied by the list is not available for other tasks. To delete a list recursively, specify Y as the value of the recursively argument in the DELLIST function. For example:
rc=dellist(mylist,'Y');
For more information, see Assigning Names to SCL List Items and DELLIST.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.