Date: Wed, 25 Jul 2001 11:19:11 -0400
Reply-To: mark.k.moran@CENSUS.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: mark.k.moran@CENSUS.GOV
Subject: Not Proc Summary: Proc Append
Content-type: text/plain; charset=us-ascii
> have you taken your issue up with SAS tech support?
> i'll be happy to be the go between. how big is the dataset for which
proc summary shows
> these incorrect averages - if i can get a copy of the dataset and the sas
program, i can
> have the developers here in R&D investigate this more thoroughly
> Paul Kent
> Director, BASE SAS Research
> http://www.sas.com/rnd/base -- The Power to Know
There's news: My real problem is and was not questioning, fixing, or
taking up issues on the Proc Summary. My problem was *not getting fired*,
because a week ago I was told to take the averages from the COUNT cells of
four more or less identical files. The first way I tried had syntax
problems, so I posted the question to SAS-L. A couple people suggested
Proc Appends followed by a Proc Summary. I just wanted the average values
for the COUNT cells of these four files, what could be simpler? It turns
out, I have just now figured out today, that the problem is *not* in the
Proc Survey or Proc Means but in these *Proc Append*. These Proc Append's
are literally taking my four little old files and giving me back eight rows
where there should only be four, one from each file. So I take back what I
said about Proc Survey -- I apologize for calling Proc Survey into
disrepute -- and, based on the suggestions of people on SAS-L to use proc
append, which I have done exactly as recommended, apply the comment to Proc
Append. I will avoid Proc Append like the plague, because I fixed this
problem by simply going back to the more familiar Datastep with set
file1of4 file2of4 etc., instead of Proc Append!
proc append data=file1of4 base=srvcva; run;
proc append data=file2of4 base=srvcva; run;
proc append data=file3of4 base=srvcva; run;
proc append data=file4of4 base=srvcva; run;
proc sort data=srvcva;
by super k;
run;
proc means data=srvcva;
var count;
by super k;
output out=srvcva2 mean=;
run;
|