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 (September 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Sep 2006 14:32:05 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Newbi and weird request
Comments: To: Serge.Beaulieu@GNB.CA
In-Reply-To:  <>
Content-Type: text/plain; format=flowed

Serge ,

Id is a character variable while means is expecting a numeric for your var statement. I dont see any reason why you need the variable converted to numeric. Vairable ID should be in a by statement or a class statement not in the var statement. While variable PDO should be in the var statement as it is the varibale that you want to sum.

Try the following:

Proc Summary Data = RegStep4.Registry2003_04_S3 ; Class ID ; Var PDO ; OutPut Out = RegStep4.Registry2003_04_S2 Sum ( PDO ) = PDO ; Run ;

The underlying engine of Proc Means and Summary are the same. THe only difference is by default SUmmary is design to create a data set where means isnt. This just cuts down on the amount of code required and increases the readability of the code.

Toby Dunn

When everything is coming at you all at once, your in the wrong lane.

A truly happy person is someone who can smile and enjoy the scenery on a detour.

From: "Beaulieu, Serge (DHW/SME)" <Serge.Beaulieu@GNB.CA> Reply-To: "Beaulieu, Serge (DHW/SME)" <Serge.Beaulieu@GNB.CA> To: SAS-L@LISTSERV.UGA.EDU Subject: Newbi and weird request Date: Mon, 18 Sep 2006 11:13:53 -0300

Hi folks,

I recently submitted a problem I was having with a proc sort and thanks to you folks, I was able to determine that my installation of SAS had become corrupted and was producing a utility file error - which is now resolved. Thank you.

Now, I am trying to get the following command to work and I am getting this error: "Variable ID in list does not match type prescribed for this list"

Now, the variable in question is character in format ($12 format. $32 informat), but numeric in content (can't be helped).

Is there any way I can manipulate the ID variable to be read as a numeric so that this command will work?

/*Takes duplicates, add PDO's together for each ID creating sum days observed*/;

proc means data=regstep4.registry2003_04_s3 noprint;

var ID;

by ID;

output out=regstep4.registry2003_04_s2

sum (PDO) = PDO;


Thanks in advance!


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