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
 
Mapping b/w XML data and Cobol copy book

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

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Thu Jul 12, 2012 2:33 pm    Post subject: Mapping b/w XML data and Cobol copy book
Reply with quote

Hi,

I have a req to map the XML data with COBOL copybook. I have read a xml msg and parsed the script. I want to map the xml data to cobol copybook.

I need a guidance to map fields and occurance fields.


ex:

<firstname>SAMLPE</firstname> ==> this should be map to

firstname pic x(20).

XML Script
<CUSTOMER-DETAILS><CUSTOMER-NAME><FIRSTNAME>rrrrrrrrrrrrr</FIRSTNAME><LASTNAME>yyyyyyyyyyyy</LASTNAME></CUSTOMER-NAME><ADDRESS-DETAILS><CITY>CHENNAI</CITY><STATE>TAMILNADU</STATE></ADDRESS-DETAILS><ADDRESS-DETAILS><CITY>SALEM</CITY><STATE>TAMILNADU</STATE></ADDRESS-DETAILS></CUSTOMER-DETAILS>


Need to be map as below

firstname pic x(20)
lastname pic x(20)
addresss occurs 3 times
city pic x(10)
state pic x(15)
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 12, 2012 4:45 pm    Post subject:
Reply with quote

Are you using XML PARSE in COBOL? If so, have you looked at the output of the XML PARSE? If so, then you know there is no "mapping" involved -- you identify each field, then you move it to the appropriate COBOL variable name -- field by field by field.

If not, then there's a link to Manuals at the top of this page. Start by reading the COBOL Language Reference manual on the XML PARSE statement, then do some testing to see how it works.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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