Hi,
First time posting a question. I have a COBOL DB2 program compile error on the following XML Generate statement.
XML GENERATE WS-XML-DOC-T FROM trade
With XML-DECLARATION
NAMESPACE 'http://www.xxxxxx.com/xyz/trade'
NAMESPACE-PREFIX 'TRD'
NAME OF Qtype IS 'TYPE'
TYPE OF Qtype IS ATTRIBUTE
TYPE OF Qcontent IS CONTENT
ON EXCEPTION
DISPLAY XML-CODE
DISPLAY '************************************
DISPLAY ' ERROR IN GENERATING XML !!!!
DISPLAY '************************************
DISPLAY WS-XML-DOC-T
NOT ON EXCEPTION
DISPLAY 'XML GENERATED OK '
END-XML.
Trade definition in W-S:
01 Trade.
05 Segmnt1.
10 SegmentNumber PIC 999.
10 TotalSegments PIC 999.
...
15 Quantity.
20 Qtype PIC X(13).
20 Qcontent PIC 999,999,999.
* above was cut/pasted from pgm and formatting was lost, but data is accurate.
Using Enterprise COBOL V5.2.0
Error: IGYPS2072-S "TYPE" was invalid. Skipped to the next verb, period or procedure-name.
on line for "TYPE OF Qtype IS ATTRIBUTE" in source.
It appears that the compiler is seeing the word "type" and getting confused. It I comment out the line, everything compile correctly and runs OK, but the desired XML tags/attributes are incorrect.
There was a similar issue in V4.2.0 with APAR PQ62995. Not sure if this issue has already been reported and/or fixed.
Any assistance would be greatly appreciated.
Thanks,
E.
Chi_Guy