UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.

cbl2xml tool


I am trying to use the CBL2XML tool, to convert an XML schema to a cpy cobol file, in order to generate XML invoice files. But it always crashes, and does not generate anything. I have to close the version with the task manager.
I try from the command interface, any of the versions of CBL2XML, included in VC 6.0 in 32 and 64 bits, and also the wizard version included in NetExpress 5.1 (CBL2XMLWZ.exe), and I follow the instructions detailed when writing the command, and the result is always the same. Crash,

I ask, is CBL2XML really operative? or if there is another alternative.

Attached are the XML schematics that I need to generate the cpys.


3 Replies
Micro Focus Expert
Micro Focus Expert

It appears to be a problem with the schemaLocation element being set to a URL.

If I copy the contents of the following file:

To a local file "xmldsig-core-schema.xsd" in the current folder and then change the schemaLocation from:

<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>


<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>

then it works fine and generates the copybook.

I tested with Visual COBOL 6.0.



Thank you, Chris

I have changed the schema according to your indications, and from the CBL2XML wizard it generates the .cpy, (with some error or warnings),

but from the command interface I can not write correctly the sentence that executes CBL2XML, I try to follow

cbl2xml filename [-c cpyBook] [-x schemaFile] [-m mapFile] [-p prefix] [-d directiveFile] [-v validationFile] [-noprompt] [-nocountin]

I would appreciate, if you have no problem, to answer me
with an example, about the schema Anula_ticketBai V1-2.xsd,
how would be the correct syntax to have a anulatbai.cpy.


Thanks again

Micro Focus Expert
Micro Focus Expert

If I try to validate that schema using the command:

cbl2xml -v "Anula_ticketBai V1-2.xsd"

It reports errors in the schema.

These errors must be fixed before cbl2xml will be able to create a copybook from the file.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.