XML TERMINATE

This statement has no parameters.

Description

The XML TERMINATE statement flushes the document cache and closes a session with XML Extensions. The interface to the underlying XML parser is also closed. Any memory blocks that were allocated by XML Extensions are freed.

A status value is returned in the data item XML-data-group, which is defined in the copybook, lixmldef.cpy. Errors can occur under the following circumstances:

The calls to free memory fail.

The underlying XML parser termination fails.

It is not considered an error to execute an XML TERMINATE statement when XML Extensions has not been initialized or has already been terminated.

Example

XML TERMINATE.
IF NOT XML-OK GO TO Z.