LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 17 Jan 2007 17:16:59 +0200
Reply-To:     BoraYavuz@HSBC.COM.TR
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bora Yavuz <BoraYavuz@HSBC.COM.TR>
Subject:      A Suitable Variable List for PROC TABULATE? [Was Re: OT: Chance
              to Make SAS-L History: Did You Know That...]
In-Reply-To:  <200701162353.l0GLeVg1005457@malibu.cc.uga.edu>
Content-type: text/plain; charset=US-ASCII

Arthur, thank you for the tip. Never heard of it before.

However, it seems to me that one cannot always make use of these handy variable lists. One such case is the TABLE statement in PROC TABULATE.

For example, this piece of SAS code will work:

proc tabulate data= my_data missing format= comma21.; var id var1-var9; class vector; table vector all= 'Total', id * n= 'Num_of_cst' ( var9 var8 var7 var6 var5 var4 var3 var2 var1) * sum= 'Amount'; run;

where as this will not:

proc tabulate data= my_data missing format= comma21.; var id var1-var9; class vector; table vector all= 'Total', id * n= 'Num_of_cst' ( var1-var9) * sum= 'Amount'; run;

The error in the log is below:

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, ), *, <, =, [, {. ERROR 202-322: The option or parameter is not recognized and will be ignored.

I wonder if there exists a suitable variable list that I could use with the TABLE statement in PROC TABULATE. Does anybody know of any?

Thank you very much,

Bora Y.

------------------------------

Date: Tue, 16 Jan 2007 18:51:53 -0500 From: Arthur Tabachneck <art297@NETSCAPE.NET> Subject: Re: OT: Chance to Make SAS-L History: Did You Know That...

While I've probably already posted far more than my fair share to this thread, I discovered a tip this afternoon that I can't recall ever having been mentioned on the list.

Did you know that: there are yet more ways to describe variable lists, in sas procedures, beyond _character_, _numeric_, var1-varN, vara--varz, using the colon wildcard (e.g., var:) and _all_?

This afternoon I discovered two more, namely: vara-numeric-varz and vara- character-varz. The first selects all numeric variables including and between vara and varz, while the second selects all character variables including and between vara and varz.

Art

------------------------------


Back to: Top of message | Previous page | Main SAS-L page