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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 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 INREC PARSING and dictionary items migusd SYNCSORT 6 Fri Jun 02, 2017 8:02 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