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 (May 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Magnus Wiberg <MagnusW@IUI.SE>
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. ) ;


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

-----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?


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