Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML GENERATE and use of attributes

Status
Not open for further replies.

Yordaman

Technical User
Dec 18, 2000
27
GB
Not having much luck in the manuals, which makes me think this isn't possible.......

I have a small XML structure that is to be generated from my Enterprise COBOL v3.3 program. Although simple, one of the elements has a number of attributes.

Question: Is it possible to define the w-s group field to contain values that will emerge as attributes, as well as those that must become elements, and if so how is this achieved?
 
I appreciate what you are saying, but since such technology doesn't appear to exist within the COBOL compiler, I'm afraid the advice is not very useful (after all, what's the point in referring to an answer that in this instance isn't possible).

The question is whether the required process is possible (in COBOL) or not, and if so how?
 
As you might have read in the referenced thread, perhaps IBM, because it has such a limited XML capability, expects one to use some extra-COBOL mechanism to achieve the result.

It would seem that one very straightforward mechanism would be to generate a document with the values destined to be attributes contained in elements. Then, using XSLT after the COBOL job step, transform the XML document you can generate using XML GENERATE into the desired document.

Or...if it really is a small document, just create it using STRING.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top