allowextra (default no)

For the situation where the document has data that is not needed for assignment to the subfields of an RPG data structure, you can use the allowextra option to indicate whether this is considered an error. Data is considered to be extra in the following circumstances:
  • For data matching an RPG data structure, if non-whitespace text content is found.
  • For data matching an array subfield of an RPG data structure, if the number of items in the document is greater than the dimension of the RPG subfield array.
  • For data matching an RPG scalar variable (neither data structure nor unindexed array), if the item contains child items, other than the special formatting attributes allowed for some data types for the XML-INTO operation (see Rules for transferring XML data to RPG variables).

If unexpected data is found, and 'allowextra=yes' is not specified, the operation will fail with status 00353 (XML does not match the RPG variable) or 00356 (The document for DATA-INTO does not match the RPG variable).

Warning: At any time, for the XML-INTO operation, XML attributes for non-data-structure XML elements elements may be subject to interpretation by the RPG runtime. Currently, "fmt" and "adjust" are already being interpreted by the RPG runtime for some target data types. Support for other attributes may be added at any time, possibly even through PTFs. If an attribute is being ignored by option 'allowextra=yes', and that attribute becomes meaningful for the RPG runtime, it may affect the handling of the data.

  • no indicates that the items in the document used to set the RPG variable or array elements must contain only the data necessary to set the variable.
  • yes indicates that additional data in the document will be ignored.