Date: Thu, 3 May 2001 09:22:07 -0400
Reply-To: Edward Heaton <HEATONE@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Edward Heaton <HEATONE@WESTAT.COM>
Subject: Re: Character to Numeric
Content-Type: text/plain; charset="iso-8859-1"
Magnus;
The PUT function can be used to convert a numeric value to a character
value; you want to do the reverse. Try
aupnatc = input( hif , 3. ) ;
Ed
Edward Heaton, SAS Senior Statistical Systems Analyst,
Westat (An Employee-Owned Research Corporation),
1550 Research Boulevard, Room 2018, Rockville, MD 20850-3195
Voice: (301) 610-4818 Fax: (301) 294-3992
mailto:EdwardHeaton@westat.com http://www.westat.com
-----Original Message-----
From: Magnus Wiberg [mailto:MagnusW@IUI.SE]
Sent: Thursday, May 03, 2001 8:17 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject:
How do you convert a text variable to a numeric? The command I use doesn´t
work when there is text present.
data distans(drop hif);
set mergers.distans(rename=(aik=hif));
aupnatc=put(hif, 3.);
run;
Is there a problem with the format 3. maybe?
Magnus
|