Format
{ CENTER }
{ DECIMAL }
JUSTIFIED { LEFT }
{ }
{ RIGHT }
1 – Description
The JUSTIFIED field property indicates how to fill the storage
space allocated to a field element.
o JUSTIFIED CENTER centers a TEXT field.
o JUSTIFIED DECIMAL right-justifies the whole part of a
number to the left of a decimal point and left-justifies the
fractional part of the number to the right of a decimal point.
DIGITAL DECforms provides interactive decimal justification
that appears as a user types numeric data.
o JUSTIFIED LEFT truncates or fills a TEXT field against the
left margin. This is the default value.
o JUSTIFIED RIGHT truncates or fills a TEXT field against the
right margin.
Only DIGITAL DECforms supports JUSTIFIED DECIMAL. All other
products ignore it. JUSTIFIED DECIMAL requires a decimal string
or floating-point data type.
Only COBOL and DIGITAL DECforms support the JUSTIFIED RIGHT
option. Other language processors ignore it. COBOL displays
as much of the right portion of a JUSTIFIED RIGHT string as
possible. If this adjustment leaves storage space to the left
of the string, COBOL fills this space with blanks.
Use the JUSTIFIED field property only with fields that have the
following data types:
o TEXT
o UNSPECIFIED
o Decimal string
o Fixed-point
o Floating-point
2 – Examples
1.CDO> DEFINE FIELD STREET
cont> DATATYPE IS TEXT 15
cont> NAME FOR COBOL IS C_STREET
cont> JUSTIFIED RIGHT.
In this example, the DEFINE FIELD command allocates space
for 15 right-justified text characters in the STREET field
element.
2.thsonian Avenue
15 Maple Street
---6 Oak Street
In this continuation of the previous example, COBOL displays
the strings "137 Smithsonian Avenue," "15 Maple Street", and "6
Oak Street" in the STREET field element. The deltas represent
blanks that COBOL enters to fill the 15 characters allocated
for the STREET field element. In this example, 15 characters
appear on a line; however, the individual line lengths vary due
to the different character sizes.
3.CDO> CHANGE FIELD STREET
cont> NOJUSTIFIED.
In this example, the NOJUSTIFIED keyword removes the JUSTIFIED
RIGHT property from the STREET field element.