$ZJustify()

Returns a formatted and fixed length byte sequence.

The format for the $ZJUSTIFY() function is:

$ZJ[USTIFY](expr,intexpr1[,intexpr2])

Examples of $ZJUSTIFY()

Example:

GTM>write "123456789012345",! write $zjustify("新年好",15),!,$zjustify("新年好",5)
123456789012345
     新年好
新年好
GTM>

This example uses $ZJUSTIFY() to display the sequence of octets represented by "新年好" in fields of 15 space octets and 5 space octets. Because the byte length of "新年好" is 9, it exceeds 5 spaces, the result overflows the specification.