Date: Wed, 24 May 2006 22:04:49 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: Best. informat in input function?
On Wed, 24 May 2006 09:56:57 -0500, Yu Zhang <zhangyu05@GMAIL.COM> wrote:
>The informat BESTw.d can perserve the digits after decimal point.
You don't need the "d" to preserve the digits after the decimal point. In
fact, you probably don't want to code it. If the character values all
contain explicit decimal points, the "d" spec does absolutely nothing. If
some character values lack decimal points, the "d" will imply them and
divide the read-in value by 10**d. Eg, if you have the string
and the informat 32.2, the numeric value will be
By the way, the concept of a "best" informat is meaningless, or circular.
It's just an alias for the w.d informat.
>On 5/24/06, David Ryerson <firstname.lastname@example.org> wrote:
>> I am trying to convert a character variable to a numeric variable with
>> input function. The twist is that the values of the character variable
>> vary quite a bit in terms of no decimal, one digit after decimal, etc.
>> have been using the following to do this:
>> Is the best. informat the way to go here? To this point it seems to be
>> working, but I'm wondering if there are any problems lurking around the