Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Using XML GENERATE in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ssurendran

New User


Joined: 09 Jan 2006
Posts: 1

PostPosted: Sat May 07, 2011 1:37 am    Post subject: Using XML GENERATE in COBOL
Reply with quote

I am trying to create an XML file from a COBOL program using the XML GENERATE function . My program would run on Mainframe Z/OS

There appears to be one limitation though
COBOL structure
01 EMPLOYEE.
05 ID PIC X(1).
05 NAME PIC X(10.
05 DEPT PIC X(10).

XML GENERATE will create all sub elements
<employee>
<id>1</id>
<name>xyz</name>
<dept>abc</dept>
</employee>

XML GENERATE WITH ATTRIBUTES will create all attributes
<employee id="1" name="xyz" dept="abc">
</employee>

Is there a way we can somehow indicate that some sub group items should be attributes and some sub elements
<employee id="1">
<name>xyz</name>
<dept>abc</dept>
</employee>
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat May 07, 2011 5:49 am    Post subject: Re: Using XML GENERATE in COBOL
Reply with quote

Look it up in the Programming Guide. Only elementary items will be attributes, group items not. However, all your group items will have to have attributes, so you'll have to see if that suits your purposes. Check it out yourself, as I've not done this, just got it from the manual.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us