|
Dear Katie,
It depends on the format that you use.
If you use e.g. 10.4 all values will be decimal justified,
possibly causing leading spaces.
If you omit the format values the result may be left justified:
DATA TestData;
INPUT c $ @@;
n = INPUT ( c, BEST.); * no further w.d info;
PUT c= n=;
CARDS;
1 .00001 999999
;
RUN;
yields in the log:
c=1 n=1
c=.00001 n=0.00001
c=999999 n=999999
Show us your code where you want left justification.
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Tue, 2 Dec 2008 11:59:32 -0500, Katie Schmidt <kathryn.schmidt@IBX.COM>
wrote:
>I converted a variable with a character format to a variable with a numeric
>format. Now the the numeric variable shows up in the SAS dataset with
>leading spaces (in other words, the values are not left-justified).
>
>How do I get rid of the leading spaces and left justify the numeric
>variable?
>
>The trim and left functions work but they also convert the variable back to
>a character format at the same time, which is NOT what I want.
>
>Thanks to anyone who can help!
|