datasubf

The datasubf option specifies the name of the extra scalar subfield used to handle the situation where there is text data for an item 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 item matching the data structure.

Default: When the datasubf option is not specified, items matching RPG data structures cannot have text data. Text data can only be associated with the subfields of the data structure.

Note:
  1. When an RPG data structure has a scalar subfield whose name is specified by the datasubf option, the following rules apply:
    • If the matching item 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 attributes. Therefore, the item cannot have any child items, and the other subfields of the data structure must all be scalar subfields.
    • The item matching the data structure cannot have an attribute or child item with the same name as the datasubf option.
    • If the item 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.
  2. 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 item matching the RPG data structure cannot have text data.
  3. 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.
  4. A complex RPG data structure may have many data structure subfields. The datasubf option is considered separately for each data structure subfield. The data for one data structure subfield might require the datasubf option for the XML-INTO or DATA-INTO operation to complete successfully, while another data structure subfield might not require it.
  5. 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.