Previous Topic Next topic Print topic


C$JUSTIFY

C$JUSTIFY performs left or right justification of data and centering of data.

Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

Usage

CALL "C$JUSTIFY" 
    USING DATA-ITEM, JUSTIFY-TYPE

Parameters

This data item contains the data to be justified.

This optional parameter contains one of three literal values:

L    indicates left justification
R indicates right justification
C indicates centering

If this parameter is omitted, then "R" is implied.

Description

This routine removes all leading and trailing spaces from DATA-ITEM and justifies the remaining data as indicated by JUSTIFY-TYPE. The resulting string is returned in DATA-ITEM. If centering is chosen, there will be one more space on the right than on the left if an odd number of spaces is used.

Compatibility Issues

None
Previous Topic Next topic Print topic