Function
The JUSTIFIED clause permits non-numeric data to be aligned within a non-numeric receiving item in an alternative manner to the standard.
Format
{JUSTIFIED | JUST} RIGHT
Syntax rules
JUST is the abbreviation of JUSTIFIED.
The JUSTIFIED clause can be specified for elementary items only.
The JUSTIFIED clause can only be specified for alphabetic, alphanumeric or national data items.
The JUSTIFIED clause must not be specified for data items with level number 66 or 88.
The JUSTIFIED clause must not be specified for a receiving item of a STRING statement (see "STRING statement").
General rules
If the JUSTIFIED clause is specified for the receiving item, and the sending item is longer than the receiving item, the data is aligned at the rightmost character position, and the leftmost characters of the sending item are truncated.
If the JUSTIFIED clause is specified for the receiving item, and the receiving item is longer than the sending item, the data is aligned at the rightmost character position, and the leftmost character positions are filled with blanks according to the class of the receiving item.
When the JUSTIFIED clause is omitted, the standard rules for data alignment within an elementary item are applicable (see the section "Concept of computer-independent data description").
Example 7-7
Normal alignment (without JUSTIFIED): | ||||||||||||
Sending item | smaller than | Receiving item | ||||||||||
|
| |||||||||||
Sending item larger than or equal to | Receiving item | |||||||||||
|
| |||||||||||
| ||||||||||||
Sending item | smaller than | Receiving item | ||||||||||
|
| |||||||||||
Sending item | larger than | Receiving item | ||||||||||
|
|