XML PUT TEXT

This statement has the following parameters:

Parameter Description
DocumentPointer Identifier of a COBOL pointer data item that points to the in-memory text to put into the file specified by the DocumentName parameter.
DocumentLength Numeric literal or identifier of a COBOL numeric data item that specifies the length of the in-memory text.
DocumentName Nonnumeric literal or identifier of an alphanumeric data item that specifies the filename of the file to contain the content of the memory area upon successful completion of the statement. If an extension is not specified in the filename, the extension .xml is appended to the specified filename.

Description

The XML PUT TEXT statement copies the content of the memory area specified by the DocumentPointer and DocumentLength parameters to the external file specified by the DocumentName parameter. The text is normally, but not necessarily, an XML document. 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 PUT TEXT
    MY-DOCUMENT-POINTER
    MY-DOCUMENT-LENGTH
    "MY-DOCUMENT".
IF NOT XML-OK GO TO Z.