Date: Fri, 25 Sep 1998 13:39:44 -0400
Reply-To: RHOADSM1 <RHOADSM1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: RHOADSM1 <RHOADSM1@WESTAT.COM>
Subject: Re: Tabulate var is character
Content-Type: text/plain; charset=US-ASCII
Dave,
As I understand your problem, CUST contains a count of customers for each
record, and you want to use it as what TABULATE would call an "analysis"
variable, despite the fact that it is currently character. If that's the
case, I think you're stuck, in the sense that analysis variables must be
numeric (which is logical). You could either make CUST numeric or create a
new variable and use that, either by creating a new data set or possibly by
using a DATA step or SQL view.
Mike Rhoads
Westat
RhoadsM1@Westat.com
<<original question>>
I'm trying to summarize a data set using Tabulate. I'm running into trouble
because my 'cust' variable is character. I want to count the number of
customers by state and year. The error is:
'ERROR: Variable CUST in list does not match type prescribed for this list.'
Is there a simple way to get the job done, other than a data step to change
the cust var from character to numeric?
The code is:
Proc tabulate missing data=folder.png;
where yrmo ge 9605 and yrmo le 9607;
class yrmo state;
var cust;
Table state, yrmo*cust*f=comma12.;
run;
Thanks
--------------------------------------
David Boylan
Corporate Forecasting
UtiliCorp United, Inc.
816.467.3062
--------------------------------------