Returns the result of inserting a string at the right of another string with a certain length. It can be padded on the left with a character. If no padding character is inserted, a blank is used as a padding.
RIGHT(s,l,c)
RIGHT returns a string which is formed by inserting a string s to the right of another string with length l. An optional padding character c can be attached to the left. If not, a blank is used as a padding.
dcl s char (40) var; dcl t char (40) var; s = 'This string is 33 characters long'; t = right(s, 40, '+'); put skip list (t);
will print:
+++++++This string is 33 characters long
None.