Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText," both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
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
DATA-ITEM Any data item
This data item contains the data to be justified.
JUSTIFY-TYPE PIC X
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