Chapter Contents |
Previous |
Next |
LVARLEVEL |
Category: | List |
Syntax | |
Details | |
Examples | |
Example 1: Placing Values in the Current List | |
Example 2: Placing Values in a Specified List | |
See Also |
Syntax |
rc=LVARLEVEL(dsid,varname,n-level<,list-id>); |
0 | successful |
0 | not successful |
Type: Numeric
Type: Numeric
Type: Character
Note: This parameter is an update parameter. See Input, Output, and Update Parameters for
more information.
Type: Numeric
Type: Numeric or List
Details |
The values are placed in the list identified by list-id, or in the current result list identified by CURLIST (if list-id is not specified). The values placed in the list are always character values. It is an error if list-id is omitted and you have not created a current result list with the CURLIST function. n-level must be a column, because LVARLEVEL uses it to store the number of unique values it finds. n-level must be initialized to any value except missing before LVARLEVEL executes.
Examples |
Get the unique formatted values for the table column NAME from SASUSER.CLASS, place the values in the current list, and print them:
dsid=open('sasuser.class'); nlevels=0; rc=curlist(makelist()); rc=lvarlevel(dsid,'name',nlevels); put nlevels=; call putlist(curlist(),'levels',0); rc=close(dsid);
Get the unique formatted values for the table column NAME from SASUSER.CLASS, place the values in the specified list, and print them:
dsid=open('sasuser.class'); nlevels=0; listid=makelist(); rc=lvarlevel(dsid,'name',nlevels,listid); put nlevels=; call putlist(listid,'levels',0); rc=close(dsid); rc=dellist(listid);
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.