COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-87
JUSTIFIED Clause
Usage Considerations:
•
LEFT and RIGHT
The optional keywords LEFT and RIGHT have no effect in HP COBOL.
•
Where You Can Use the SYNCHRONIZED Clause
You can use the SYNCHRONIZED clause only in the data description entry of an
elementary item that does not have a USAGE POINTER clause. You cannot imply
or specify the SYNCHRONIZED clause for national data items.
•
DISPLAY Data Items That the SYNCHRONIZED Clause Does Not Affect
The SYNCHRONIZED clause does not affect DISPLAY items at levels other than
01 or 77. They are composed of one or more character positions and stored as a
corresponding number of 8-bit bytes aligned on byte or 2-byte boundaries, whether
or not they are described with the SYNCHRONIZED clause.
•
COMPUTATIONAL or BINARY Data Items
If the program is not compiled with the PORT directive, then a data item is aligned
on a 2-byte boundary unless it is described with the SYNCHRONIZED clause. If it
is described with the SYNCHRONIZED clause, it is aligned on a 2-byte boundary if
its size is less than 4 bytes, and on a 4-byte boundary if its size is 4 bytes or larger.
If the program is compiled with the PORT directive, and the COMPUTATIONAL or
BINARY data item is not described with the SYNCHRONIZED clause, it is byte-
aligned.
JUSTIFIED Clause
The JUSTIFIED clause causes nonstandard positioning of data within a receiving item.
It can appear only in the data description of an elementary item that meets these
criteria:
•
Its category is alphabetic or alphanumeric.
•
It is not subordinate to any data structure that has associated condition-names.
•
It is not subordinate to any data structure that is described with a VALUE clause.
When a receiving data item is described with the JUSTIFIED clause, the standard
alignment rules do not apply. Instead, a sending item too big for the receiving item is
truncated on the left. If the sending item is smaller, its rightmost character is aligned
with the rightmost character of the receiving field and the value is extended to the left
with space characters.
JUSTIFIED
JUST
RIGHT
VST107.vsd