formats string by adding pad characters between nonblank characters to justify to both margins and length of bytes length (length must be nonnegative). Rules for adjustments are the same as for the JUSTIFY function. The default pad character is a blank.>>-DBCJUSTIFY--(--string--,--length-----------------------------> >--+---------------------------+--)---------------------------->< '-,--+-----+--+-----------+-' '-pad-' '-,--option-'
The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not count the SO and SI and is the default.
DBCJUSTIFY('<><AA BB><CC>',20,,'Y')
-> '<AA> <BB> <CC>'
DBCJUSTIFY('<>< AA BB>< CC>',20,'<XX>','Y')
-> '<AAXXXXXXBBXXXXXXCC>'
DBCJUSTIFY('<>< AA BB>< CC>',21,'<XX>','Y')
-> '<AAXXXXXXBBXXXXXXCC> '
DBCJUSTIFY('<>< AA BB>< CC>',11,'<XX>','Y')
-> '<AAXXXXBB> '
DBCJUSTIFY('<>< AA BB>< CC>',11,'<XX>','N')
-> '<AAXXBBXXCC> '