Date: Sun, 22 Dec 1996 14:51:07 GMT
Reply-To: Rob Thomas <rob.thomas@HIS.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Rob Thomas <rob.thomas@HIS.COM>
Organization: Advanced Data Analysis
Subject: Re: Char data in numeric field
Check out the use of formatted input and put statements to change the
value of a variable 'on the fly'. You'll need to preceed this with
proc format to create a format to change 'N' and 'n' values to 0.
On 20 Dec 1996 01:00:34 GMT, firstname.lastname@example.org (hootspa1) wrote:
>I've got this data from the census bureau that displays some "N"'s when I
>do a proc print of the SAS data set it came in. Proc contents says the
>field is numeric.
>I would like to do a sum treating the N's as 0.
>The sume sometimes gives the correct answer and sometimes not.
>BTW, my missing char is set to '.';
>I've tried the sum function -- no help.
>I've tried to check for missing -- no help.
>I would expect SAS to tell me that I
>ve got char data in anumeric field but it doesn't complain.
>I've thought of writng out to a flat file and reading back in
>or reading as char with the @ so ican set it to a numeric 0 as a
>Any other ideas??
Advanced Data Analysis, Est.'89. Over 19 years experience with general
statistical consulting and multi-platform SAS programming. Also: data
conversions across platforms/media/apps. 301-949-8065, 3321 Camden St.
Silver Spring, MD, 20902. www.his.com/rltstats, email@example.com