Chapter Contents

Previous

Next
MAKELIST

MAKELIST



Creates an SCL list

Category: List


Syntax
Details
Example
See Also

Syntax

list-id=MAKELIST(<n<, visibility>>);

list-id
contains the identifier of the new list, or 0 if the list could not be created.

Type: Numeric or List

n
is the number of items to place in the list initially. By default, n is 0.

Type: Numeric

visibility
specifies whether the list is global or local:
'G' The list is global and can be shared by all applications executing in the same SAS session. A global list is deleted when the SAS session ends.
'L' The list is local to the current SAS application. A local list is deleted when the application ends. (This is the default.)

Type: Character


Details

MAKELIST creates either an empty list or a list with the number of items specified in n. Each item contains a missing value. Use the list identifier returned by MAKELIST with all other SCL list functions that use the list.

SCL lists can contain numeric items, character items, other list items, or object items. Each item can have a name. Both lists and list items have attributes. See SCL Lists for complete information about using SCL lists.


Example

Create lists in the local and global environments:

n = 12;
   /*  Make an empty local list.  */
list1=makelist();
   /*  Make a local list with 24 items.  */
list2=makelist(2*n);
   /*  Make an empty global list.  */
list3=makelist(0,'G');

See Also

CLEARLIST

COPYLIST

DELLIST

LISTLEN

MAKENLIST

PUTLIST

SAVELIST


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.