Previous Topic Next topic Print topic


Appendix D - Trimming of Generated JSON Data

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:

  • -0063.435 becomes -63.435
  • 0000.022 becomes 0.022
  • 0044 becomes 44
  • 0000 becomes 0

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.

Previous Topic Next topic Print topic