C$JUSTIFY
The C$JUSTIFY library routine changes the alignment of a data item's content.
Syntax:
 CALL "C$JUSTIFY" USING text 
                        alignment
Parameters:
text
PIC X(n)
Specifies the text to be justified.
alignment
PIC X(1)
It specifies a value representing the justification alignment. Valid values are:
 
"L" Left justified.
"C" Centered.
"R" Right justified.
Examples:
Example - Justify a string Center, Right and then Left
working-storage section.
77 str1   pic x(10value "hello".
77 ruler  pic x(10value "1234567890".
...
 procedure division.
...
   display ruler
   display str1
   call "c$justify" using str1 "C"
   display str1
   call "c$justify" using str1 "R"
   display str1
   call "c$justify" using str1 "L"
   display str1.