The process
of justifying the values in columns in a LISTING output is determined
by the format of the variable and the values of two attributes: JUST=
and JUSTIFY=. It is a three-step process:
-
ODS puts the value into
the format for the column. Character variables are left-justified
within their format fields; numeric variables are right-justified.
-
ODS justifies the entire
format field within the column width according to the value of the
JUST= attribute for the column, or, if that attribute is not set,
JUST= for the table. For example, if you right-justify the column,
the format field is placed as far to the right as possible. However,
the placement of the individual numbers and characters within the
field does not change. Thus, decimal points remain aligned. If the
column and the format field have the same width, then JUST= has no
apparent effect because the format field occupies the entire column.
-
If you specify JUSTIFY=ON
for the column or the table, ODS justifies the values within the column
without regard to the format field. By default, JUSTIFY=OFF.
For example, consider
this set of values:
123.45
234.5
.
987.654
If the values are formatted
with a 6.2 format and displayed in a column with a width of 6, they
appear this way, regardless of the value of JUST= (asterisks indicate
the width of the column):
******
123.45
234.50
.
987.65
If the width of the
column increases to 8, then the value of JUST= does affect the placement
of the values, because the format field has room to move within the
column. Notice that the decimal points remain aligned but that the
numbers shift in relation to the column width.
just=left just=center just=right
******** ******** ********
123.45 123.45 123.45
234.50 234.50 234.50
. . .
987.65 987.65 987.65
Now, if you add JUSTIFY=ON,
then the values are formatted within the column without regard to
the format width. The results are as follows:
justify=on justify=on justify=on
just=left just=center just=right
******** ******** ********
123.45 123.45 123.45
234.50 234.50 234.50
. . .
987.65 987.65 987.65
All destinations except
LISTING justify the values in columns as if JUSTIFY=ON.