CENTERLEFT returns a string that is the result of inserting string x in the center (or one position to the left of center) of a string with length y and padded on the left and on the right with the character z as needed.
Specifying a value for z is optional.
>>-+-CENTERLEFT-+--(x,y-+----+-)------------------------------->< '-CENTRELEFT-' '-,z-'
Abbreviation: CENTER
dcl Source char value('Feel the Power');
dcl Target20 char(20);
dcl Target21 char(21);
Target20 = center (Source, length(Target20), '*');
/* '***Feel the Power***' - exactly centered */
Target21 = center (Source, length(Target21), '*');
/* '***Feel the Power****' - leaning left! */
If z is omitted, a blank is used as the padding character.