How to: |
Reference: |
RPAD uses a specified character and output length to return a character string padded on the right with that character.
RPAD(string, out_length, pad_character)
where:
Alphanumeric
Is a string to pad on the right side.
Integer
Is the length of the output string after padding.
Alphanumeric
Is a single character to use for padding.
In the following request against the WF_RETAIL data source, RPAD right-pads the PRODUCT_CATEGORY column with @ symbols:
DEFINE FILE WF_RETAIL RPAD1/A25 = RPAD(PRODUCT_CATEGORY,25,'@'); DIG1/A4 = DIGITS(ID_PRODUCT,4); END TABLE FILE WF_RETAIL SUM DIG1 RPAD1 BY PRODUCT_CATEGORY ON TABLE SET PAGE NOPAGE ON TABLE SET STYLE * TYPE=DATA,FONT=COURIER,SIZE=11,COLOR=BLUE,$ END
The output is: