Skip to main content

Hi,

I am using Microfocus visual cobol(3.0.2). I want to create an XML file with the XD structure in FILE SECTION.

 XML GENERATE WS-XML-DATA FROM XML-DATA
COUNT IN WS-XML-COUNT
WITH XML-DECLARATION
END-XML.

I can see the proper data in WS_XML_DATA while debugging but file is not created in the folder.

Could you please help me in fixing this problem.

 

Thanks,

Anusha.

Hi,

I am using Microfocus visual cobol(3.0.2). I want to create an XML file with the XD structure in FILE SECTION.

 XML GENERATE WS-XML-DATA FROM XML-DATA
COUNT IN WS-XML-COUNT
WITH XML-DECLARATION
END-XML.

I can see the proper data in WS_XML_DATA while debugging but file is not created in the folder.

Could you please help me in fixing this problem.

 

Thanks,

Anusha.

XML GENERATE does not automatically created a file it simply generates the proper XML into the data-item you are using as identifier-1. It would be up to your program to write out a line sequential file that contained this information. An XD is used with the XML syntax extensions which use a preprocessor which is completely different from XML GENERATE. XML syntax extensions are documented here:

Partial General Rules for XML GENERATE...

  1. Identifier-1 is the receiving area for a generated XML document.
  2. If identifier-1 is a national data item, the generated XML document is encoded in UTF-16.
  3. Identifier-1 must be large enough to contain the generated XML document. Typically, it should be from five to eight times the size of identifier-2, depending on the length of the data name or data names within identifier-2. If identifier-1 is not large enough, an error condition occurs at the end of the XML GENERATE statement.

Hi,

I am using Microfocus visual cobol(3.0.2). I want to create an XML file with the XD structure in FILE SECTION.

 XML GENERATE WS-XML-DATA FROM XML-DATA
COUNT IN WS-XML-COUNT
WITH XML-DECLARATION
END-XML.

I can see the proper data in WS_XML_DATA while debugging but file is not created in the folder.

Could you please help me in fixing this problem.

 

Thanks,

Anusha.

Thanks for the clarification. It helped.