The datasubf option specifies the name of the extra scalar
subfield used to handle the situation where there is text data for
an XML element that matches an RPG data structure.
For example, if this option is specified as datasubf=txt, and an
RPG data structure has a scalar subfield with name txt, then
that subfield will receive the text data for the XML element matching
the data structure.
Default: When the datasubf option
is not specified, XML elements matching RPG data structures cannot
have text data. Text data can only be associated with the subfields
of the data structure.
Note: - When an RPG data structure has a scalar subfield whose name is
specified by the datasubf option, the following rules apply:
- If the matching XML element has text data, that text data will
be assigned to the scalar subfield.
- The values for all the other subfields of the data structure must
be set by XML attributes. Therefore, the XML element cannot have any
child elements, and the other subfields of the data structure must
all be scalar subfields.
- The XML element matching the data structure cannot have an XML
attribute or child XML element with the same name as the datasubf option.
- If the XML element does not have any text data, the datasubf subfield
will be set to an empty value. If the datatype of the subfield does
not support the empty value, for example numeric and date types, assigning
the subfield will result in an exception.
- When an RPG data structure does not have a scalar subfield whose
name is specified by the datasubf option, the datasubf option
is ignored for that data structure. The XML element matching the RPG
data structure cannot have text data.
- When an RPG data structure has an array or data structure subfield
whose name is the same as the name specified by the datasubf option,
the datasubf option is ignored for that data structure. The XML element
matching the RPG data structure cannot have text data.
- A complex RPG data structure may have many data structure subfields.
The datasubf option is considered separately for each data
structure subfield. The XML data for one data structure subfield might
require the datasubf option for the XML-INTO operation to complete
successfully, while another data structure subfield might not require
it.
- A datasubf subfield cannot be the same as a countprefix subfield.
For example, if countprefix=num_ was specified, and the data structure
has subfields arr and num_arr, then num_arr is a countprefix subfield.
Option datasubf=num_arr cannot also be specified for this data structure.