Chapter Contents |
Previous |
Next |
DELLIST |
Category: | List |
Syntax | |
Details | |
See Also |
Syntax |
rc=DELLIST(list-id<,recursively>); |
0 | successful |
0 | not successful |
Type: Numeric
Type: Numeric or List
'N' |
Sublists are not deleted. (This is the default.) |
'Y' |
Sublists are deleted. |
Type: Character
Details |
A list's contents cannot be retrieved after the list is deleted.
If recursively is 'Y'
,
DELLIST recursively deletes all sublists that do not have the NODELETE attribute.
For sublists that have the NODELETE attribute, the sublist identifiers are
removed from the deleted list, but the sublist is not deleted. Thus, you
should store list identifiers for sublists either in another list or in an
SCL variable so that you can access the lists later. All local lists that
are not explicitly deleted are deleted when the application ends, at the same
time that SCL closes open tables and files.
To conserve memory, delete lists when they are no longer needed. Typically, a DELLIST statement is placed in the termination section (TERM or FSETERM) of the program. Although the program that creates a list is most often responsible for deleting the lists that it creates, it does not have to delete them unless that is the appropriate action for the application; it may return the list that it created to its caller.
The list is not deleted, and a non-zero value is returned to rc, if
To check attributes, use HASATTR. To change attributes, use SETLATTR.
If DELLIST fails because of a condition listed above, the list and/or sublists may be partially cleared, and no further items or sublists are cleared.
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.