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
 

 

how to use xml-schema while parsing xml in cobol

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

New User


Joined: 23 Jun 2005
Posts: 22

PostPosted: Tue May 15, 2007 11:59 am    Post subject: how to use xml-schema while parsing xml in cobol
Reply with quote

hi

i know how to parse xml , but i need there is way to use the xml-schema while parsing xml in cobol .

ex: prioritigation , parent field s and child fields and blanks fields
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue May 15, 2007 2:32 pm    Post subject:
Reply with quote

Directly in COBOL, I don't think so.... I think, some how, you need to get into the JAVA services for that.
Back to top
View user's profile Send private message
kiran_polnati
Warnings : 2

New User


Joined: 23 Jun 2005
Posts: 22

PostPosted: Wed May 16, 2007 10:21 am    Post subject: how to use xml-schema while parsing xml in cobol
Reply with quote

Hi Thomson

while parsing xml , i will put the data into array dependingup on no of records coming var coming through xml data. depending up on no records the array should occurs n times .

how come to know the var no records

ex:
01 XML-REC PIC X(190) "<C><REC><NAME>AHI</NAME><AGE>23</AGE></REC><REC><NAME>TOM</NAME><AGE>28</AGE></REC><REC><NAME>BIL</NAME><AGE>36</AGE></REC><NREC>2</NREC></C>".

abouve example i should know the <nrec> values dependin up on the array should occurs

i did in xml handler

when "NREC"
MOVE XML-TEXT TO NO OF RECORDS
WHEN "REC"
SET R UP BY 1

but above every REC R UP BY 1 IT IS NOT CONSERNING THE ARRAY OF OCCURS TIMES

PLEASE HELPME
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed May 16, 2007 2:48 pm    Post subject:
Reply with quote

I'm sorry, I don't see a connection between your first post and your second.
I am having great dificulty understanding your last post.
Back to top
View user's profile Send private message
kiran_polnati
Warnings : 2

New User


Joined: 23 Jun 2005
Posts: 22

PostPosted: Wed May 16, 2007 3:26 pm    Post subject: Re: how to use xml-schema while parsing xml in cobol
Reply with quote

hi william,


how can we put the xml data into array of elements

but this array occurs var1 times , as we comes to know that var1 was coming through xml data

ie <data>
<d1> </d1>
<d2> </d2>
</data>

above example <data> tag is repeated var1 no of times

the var1 no of times also comes through the xml data
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed May 16, 2007 3:53 pm    Post subject:
Reply with quote

Code:
<payment>
   <payinfo>
      <total$>5.2</total$>
   </payinfo>
   <iteminfo>
      <item#>1208</item#>
      <item$>.99</item$>
   </iteminfo>
   <iteminfo>
      <item#>1948</item#>
      <item$>3.52</item$>
   </iteminfo>
   <iteminfo>
      <item#>314159</item#>
      <item$>.69</item$>
   </iteminfo>
</payment>


When you get "payment", set the subscript to zero. Every time you get a new "iteminfo", increment that subscript and move the "item#" and "item$" to its entry in the table.
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 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
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am


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