Joined: 03 Jul 2007 Posts: 1288 Location: Chennai, India
From the manuals
To transform COBOL data to XML, use the XML GENERATE statement as in the example below.
XML GENERATE XML-OUTPUT FROM SOURCE-REC
COUNT IN XML-CHAR-COUNT
DISPLAY 'XML generation error ' XML-CODE
NOT ON EXCEPTION
DISPLAY 'XML document was successfully generated.'
I have always used this SYNTAX and it works. I seriously doubt whether "WITH" can be used.