Created On: 20 November 2012
Problem:
Using the compiler directive XMLGEN(WS) instructs the compiler to create the XML model files. However the IDE creates the XML model file(s) in the project root directory, but the runtime is expecting to find them in the output folder so an error 39 is generated, for example:
Error: 39[01] model (symbol table) file that defines model data-name not found
[39]ModdelFileDataName parameter: "Address-Struct"
Resolution:
The XMLGEN directive can specify a path for the directory/folder of where to put the model template file. This path can be relative or absolute. If the ws option is desired, specify it in a separate XMLGEN(ws) directive that follows the XMLGEN(path) directive, where path indicates your desired directory/folder, because setting the path nullifies the XMLGEN(ws) option. For example,
cobol testxmlgen01 XMLGEN(c:\windows\temp) XMLGEN(ws);
will put the model template file in c:\windows\temp\testxmlgen01.xml and it will contain the working-storage section data item descriptions. If file section data items are desired, then
cobol testxmlgen01 XMLGEN(c:\windows\temp);
is sufficient. If XMLGEN(ws) is specified before the XMLGEN(path) directive, then only the file section data descriptions will be in the model template file as if XMLGEN(ws) had not be specified at all.
Note that the full file-name cannot be specified in an XMLGEN directive. The directive specifies the path to the directory/folder where the file should be stored. The file will always be named the same as the source file, but with the extension changed to xml (as in testxmlgen01.xml for the preceding examples).
cobol testxmlgen01 XMLGEN(c:\windows\temp) XMLGEN(ws);
will put the model template file in c:\windows\temp\testxmlgen01.xml and it will contain the working-storage section data item descriptions. If file section data items are desired, then
cobol testxmlgen01 XMLGEN(c:\windows\temp);
is sufficient. If XMLGEN(ws) is specified before the XMLGEN(path) directive, then only the file section data descriptions will be in the model template file as if XMLGEN(ws) had not be specified at all.
Note that the full file-name cannot be specified in an XMLGEN directive. The directive specifies the path to the directory/folder where the file should be stored. The file will always be named the same as the source file, but with the extension changed to xml (as in testxmlgen01.xml for the preceding examples).
Incident #2601486