trim (default all)

The trim option specifies whether whitespace (blanks, newlines, tabs etc.) should be trimmed from text data before the data is assigned to RPG variables
  • all indicates that before text content is assigned to the RPG character or UCS-2 variable, the following steps will be done:
    1. Leading and trailing whitespace will be trimmed completely from text content
    2. Strings of interior whitespace in the text content will be reduced to a single blank
  • none indicates that no whitespace will be trimmed from text content. This option will have the best performance, but it should only be used if the whitespace is wanted, or if the data is known to contain no unwanted whitespace, or if the RPG program is going to handle the removal of the whitespace itself.
Note:
  1. Whitespace includes blank, tab, end-of-line, carriage-return, and line-feed.
  2. This option applies only to data that is to be assigned to character and UCS-2 RPG variables. Trimming of whitespace is always done for other data types.
  3. This option is mainly provided for data from files, but it also applies to data from a variable.
  4. For the XML-INTO operation, whitespace between XML elements is always ignored. The trim option controls the whitespace within text content of elements and attributes.