%DATA options for the DATA-INTO operation code

Several options are available for customizing the DATA-INTO operation. The options are specified as the second parameter of the %DATA built-in function. The parameter can be a constant or a variable expression. The options are specified in the form 'opt1=val1 opt2=val2'.

See %DATA (document {:options}) for more information on how to specify the options.

  • The path option specifies where to locate the desired information within the document.
  • The doc option specifies whether the first parameter of the %DATA built-in function has an document, or has the name of a file containing the document.
  • The ccsid option specifies the CCSID to be used to parse the document.
  • The case option specifies the way that DATA-INTO should interpret the element and attribute names in the DATA document when searching for names that match the the RPG field names and the names in the path option.
  • The trim option specifies whether you want blanks, tabs and line-end characters to be trimmed from the data before it is assigned to your RPG variables.
  • The allowmissing option specifies how the RPG runtime should handle the situation when the document does not have enough information to provide data for all the RPG subfields of a data structure.
  • The allowextra option specifies how the RPG runtime should handle the situation when the document has additional information that is not needed to set the RPG variable.
  • The data subfield option specifies the name of the extra subfield used to handle the situation where there is text data for an item that matches an RPG data structure.
  • The countprefix option specifies the prefix for the names of the additional subfields that receive the number of RPG array elements set by the DATA-INTO operation.