Conflicts Between Model File-names and XML Data Files

In this COBOL system, model file-names, as created by the compiler, are of the form program-name.xml. You should ensure your XML data files do not share the same name as this, to avoid any conflicts.

In this COBOL system, if the ModelFileName#DataName parameter does not include a hash, it is always treated as a model data-name, and the model file-name is assumed to be program-name.xml for the program (or one of its callers) that executed an XML Extensions export or import statement. With this in mind, if you do not explicitly set a model file-name, you should ensure that your XML data files do not share the same name as your COBOL programs when performing import and export XML Extensions statements.


To avoid conflicts between model file-names and XML data file-names, do one of the following:

  • Ensure you set the DocumentName parameter in your import and export statements to a name other than your COBOL program name.

  • If you want to keep your XML data file-names the same as the program-name, rename the model file-name after compilation and specify the new name in the value of the ModelFileDataName parameter before the hash, separating it from the ModelDataName.

When using the second technique, it is recommended that the compilation be done with a script that includes the renaming command, to avoid forgetting this step.


In RM/COBOL, you can use the environment variable RM_MISSING_HASH to determine the meaning of the ModelFileDataName parameter when the hash is omitted. In this COBOL system, the environment variable is not supported.

Also, RM/COBOL v12 and later generally did not use model files because the model was embedded in the object program file; this COBOL system is more like RM/COBOL v11 and earlier, which always used model files. Thus, care must be taken to distribute model files with applications that use XML Extensions.