Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7306

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 TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us