Model files

XML Extensions for Visual COBOL employs a model template file to describe the COBOL data structures for export or import operations. Since XML Extensions for Visual COBOL has only the one model file, a reference in this help to 'model template file', 'model file' or 'template file' are all references to this one file.

The model template file is produced by the XMLGEN directive when a COBOL program that uses XML Extensions is compiled. This model file must be distributed with the application for use when the application is run. As produced by the XMLGEN directive, the extension is xml and the base name is the same as the base file-name of the compiled source program. For example, if the compiled program source is in file program01.cbl, the model template file is program01.xml.

Since an application can have multiple COBOL programs in its implementation, the term 'model files' refers to the set of model files produced for the multiple programs in the implementation.

The model template file contains an XML document that describes the COBOL data structures in the compiled application program. The XML EXPORT FILE, XML EXPORT TEXT, XML IMPORT FILE and XML IMPORT TEXT statements have a parameter ModelFileName#DataName that specifies the model file to be used for the statement and, separated by a "#", the DataName to be selected from the model file descriptions of data-names.