Data values are trimmed once they have been converted to character format.
For more information about the conversion process, see Appendix D - Elementary Data Format Conversions.
The leading space, if positive, is removed for values converted from signed numeric data items. The leading zeroes (after any initial minus sign) up to but not including the digit immediately before the actual or implied decimal point are eliminated for values converted from numeric items. The trailing zeroes after a decimal point are retained. For example:
Trailing or leading spaces are removed from character values for data items of class alphabetic, alphanumeric, DBCS, and national, depending on whether the corresponding data items have left (default) or right justification, respectively. That is, trailing spaces are removed from values whose corresponding data items do not specify the JUSTIFIED clause. Leading spaces are removed from values whose data items do specify the JUSTIFIED clause. If a character value consists solely of spaces, one space remains as the value after trimming is finished.