XML DISABLE ALL-OCCURRENCES

This statement has no parameters.

Description

The XML DISABLE ALL-OCCURRENCES statement causes unnecessary empty array (COBOL table) occurrences not to be generated by the statements, XML EXPORT FILE and XML EXPORT TEXT. An empty array occurrence is one in which all numeric elements have a zero value and all nonnumeric elements have a value of all spaces.

There is some interoperation with whether attributes are enabled or disabled. If attributes are enabled (that is, XML ENABLE ATTRIBUTES has been used), then no empty occurrences are exported; when attributes are enabled, the subscript is present in the exported document and thus empty occurrences need not be exported as placeholders to ensure that the correct subscript is calculated on import. If attributes are disabled (the default state or when XML DISABLE ATTRIBUTES has been used), then only trailing empty occurrences are not exported, except that, if all occurrences are empty, the first empy occurrence will be exported.

The A_XMLIF_EXPORT_EMPTY_ARRAY runtime configuration variable can be used to modify the export behavior for an array that is empty, that is, all the occurrences are empty. When set to the value 1, Y, T or ON (case-insensitively), XML Extensions exports one empty occurrence regardless of whether attributes are enabled or disabled. When set to the value 0, N, F or OFF (case-insensitively), XML Extensions does not export any occurrences for the empty array regardless of whether attributes are enabled or disabled. When not set or set to a value not listed (for example, “UNSET”), the behavior for an empty array varies as described above, that is, the behavior depends on whether attributes are enabled or disabled

A status value is returned in the data item XML-Status of XML-data-group, which is defined in the copy file lixmldef.cpy.

Example

XML DISABLE ALL-OCCURRENCES.
IF NOT XML-OK GO TO Z.