This statement has the following parameters:
| Parameter | Description |
|---|---|
| DocumentName | The name of the file that contains the XML document to be tested. |
| SchemaName/ModelFileName | The name of the schema file or set of model files that will be used to validate the XML document specified in DocumentName. |
The XML VALIDATE FILE statement tests the XML document specified by the DocumentName parameter to see if it is well-formed and valid.
A well-formed XML document is one that conforms to XML syntax rules. A valid XML document is one that is both well-formed and has content that conforms to rules specified by an XML schema file. The schema file is supplied by the user.
A status value is returned in the XML-data-group data item, which is defined in the copybook, lixmldef.cpy.
XML VALIDATE FILE
"MY-DOCUMENT"
"MY-SCHEMA".
IF NOT XML-OK GO TO Z.