In this COBOL system, you cannot use data items described in any section other than the File or Working Storage Sections, as model data names.
To export data items from or import XML data into this COBOL system, use the XMLGEN Compiler directive to create a model file, for use with XML Extensions.
The model data names specified in the model file are determined by XMLGEN:
- XMLGEN with no parameter specified produces model data names for data items/structures in the File Section only.
- XMLGEN(ws) produces model data names for data items/structures in the Working Storage Section only.
Important: Data items/structures described in the Linkage Section, Communication Section, Local-Storage Section and Thread-Local-Storage Section cannot be used as model data names in a model file.
Solution:
Using a copybook containing your data items, compile a dummy program that copies the descriptions into the Working Storage section, and then use the XMLGEN(ws) Compiler directive to create a model file containing the required data items.
Notes:
The data items used at runtime when the model file is used can be in any section of the data division.