Chapter Contents |
Previous |
Next |
CLEARLIST |
Category: | List |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
rc=CLEARLIST(list-id<,recursively>); |
0 | successful |
0 | not successful |
Type: Numeric
Type: Numeric or List
'N' |
Sublists are not cleared. (This is the default.) |
'Y' |
All sublists are cleared. |
Type: Character
Details |
CLEARLIST clears all the items from the
SCL list identified by list-id. The list is not
deleted, but its length is reduced to 0. If recursively
is 'Y'
, then all the list's sublists, including
sublists of sublists, are also cleared.
An error condition results if
'Y'
) has the
NODELETE attribute.
'Y'
, and any sublist has the NOUPDATE or FIXEDLENGTH
attribute.
If an error condition results, no further items or sublists are cleared.
Example |
Clear all sublists from an existing list identified by MYLIST without deleting items that are not sublists:
/* Copy the list. */ cp=copylist(mylist); /* Clear the entire list, including sublists */ /* that also appear in CP. */ rc=clearlist(mylist,'Y'); /* Copy the old list data. */ /* Sublists have been cleared. */ mylist=copylist(cp,'N',mylist); /* Delete the copied list. */ rc=dellist(cp);
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.