That is only a matter of the presentation of the data. Have a look at the
PROC REPORT DATA=SASHELP.CLASS LS=96 PS=54 SPLIT="/" CENTER nowindows;
COLUMN Name Sex Age Height Weight;
DEFINE Name / DISPLAY FORMAT= $8. WIDTH=8 SPACING=2 LEFT "Name" ;
DEFINE Sex / DISPLAY FORMAT= $1. WIDTH=3 SPACING=2 LEFT "Sex" ;
DEFINE Age / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Age" ;
DEFINE Height / SUM FORMAT= 5.2 WIDTH=9 SPACING=2 LEFT "Height" ;
DEFINE Weight / SUM FORMAT= BEST9. WIDTH=9 SPACING=2
RIGHT "Weight" ;
The column Height is left justified. Important is the combinbation with a
kind of "static" format, not the default BEST9. The numbers are left-
justified. If you are sure that the numbers have only 2 positions left of
the dot, that format is it (the dot is also part of the length!)
On Tue, 2 Dec 2008 11:59:32 -0500, Katie Schmidt <kathryn.schmidt@IBX.COM>
>I converted a variable with a character format to a variable with a
>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
>The trim and left functions work but they also convert the variable back
>a character format at the same time, which is NOT what I want.
>Thanks to anyone who can help!