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: 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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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