```Date: Tue, 16 Jan 2007 00:27:29 +0000 Reply-To: toby dunn Sender: "SAS(r) Discussion" From: toby dunn Subject: Re: questions about input function Comments: To: master2005_sas@YAHOO.COM In-Reply-To: <1168906943.851682.310290@q2g2000cwa.googlegroups.com> Content-Type: text/plain; format=flowed Mindy , Use input function to go from character to numeric and Put function to go from numeric to character. Data Try; Num = Input( '123' , 8. ) ; Run ; Proc Print Data = Try ; Run ; Data Try ; Num = Put( 123 , 8. -L ) ; Run ; Proc Print Data = Try ; Run ; Toby Dunn To sensible men, every day is a day of reckoning. ~John W. Gardner The important thing is this: To be able at any moment to sacrifice that which we are for what we could become. ~Charles DuBois Don't get your knickers in a knot. Nothing is solved and it just makes you walk funny. ~Kathryn Carpenter From: Mindy Reply-To: Mindy To: SAS-L@LISTSERV.UGA.EDU Subject: questions about input function Date: Mon, 15 Jan 2007 16:22:23 -0800 Hey guys, I play with input function, but feel confused about some questions: (a) data try; num=input('123', 4.); run; proc print data=try; run; (b) data try; num=input(123, 4.); run; proc print data=try; run; (a) runs correctly, which give me output as num=4. (b) give me a note as numeric value has been converted to character value, which is expected. The unexpected thing is the output is num=., which means SAS doesn't really do numberic value to character value converting as it said in the note. Any one know why? Thanks. Mindy _________________________________________________________________ Communicate instantly! Use your Hotmail address to sign into Windows Live Messenger now. http://get.live.com/messenger/overview ```

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