MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COBOL - XML Parser - Parsing wrong cont char

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
eskaysem
Beginner


Joined: 31 Mar 2003
Posts: 29
Topics: 13

PostPosted: Sun Oct 03, 2010 11:23 pm    Post subject: COBOL - XML Parser - Parsing wrong cont char Reply with quote

Hello,
We have a case where when we parse the XML, we are getting a single content character being split into two. IN our case, specifically, parser was splitting 50000.00 as 50000 and .00


If you could throw some light on the issue, it would be great.


Thanks
Santosh
_________________
Thanks!,
Santosh Kulkarni
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Oct 04, 2010 10:12 am    Post subject: Reply with quote

eskaysem,

Is the receiving field defined with decimals? Look at the example here

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg10/1.13.3.2.6?

If that is not the case , then post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question. You need to show us the piece of code which you think is causing the problem and a sample of input data.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
eskaysem
Beginner


Joined: 31 Mar 2003
Posts: 29
Topics: 13

PostPosted: Tue Oct 05, 2010 6:57 am    Post subject: Reply with quote

Thanks kolusu for the reply. Sorry I should have been more specific about the scenario.
I got to know from our systems people that we recently upgraded from compat to xmlss on the parser side.

Now coming to the problem, yes, the destination field is X(12), so can handle decimals.
We had many a test cases working just fine, but this one. This one too, is having issues for this particular tab.

To be more specific, let me attach part of image for XML from spy.



It worked for all other tabs, but the highlighted one, that too on just one value - was parsing 50000.00 as 50000 and .00 and overwriting the same variable and ultimately failing the case.

Onto cobol side, we had XMLSS as our parser and we used standard statement -
Code:

 XML PARSE XML-DOCUMENT


If you observe the XML, there was one another tab having the same value - which worked fine.

I even tried adding a dummy tag and it works. Its just decimal place being at that instance in the XML is creating the issue.

Very wired (for me!), but you experts might have a handle. Please let me know. Thanks a lot!!
_________________
Thanks!,
Santosh Kulkarni
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Oct 05, 2010 10:53 am    Post subject: Reply with quote

eskaysem,


Looking at the data , I am guessing that either you have a working storage table which is overflowing after 17 occurrences or one of the field is defined short (ex : coverage field) . You have no trouble parsing the 4th row with the same contents with the only change coming from coverage code. Check for these and see if you find a pattern. Just for sanity move this trouble record to the beginning of the file and see if parses correctly.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Sat Oct 09, 2010 2:54 am    Post subject: Reply with quote

Are you getting the same problem for row 4 which seems almost identical ? (Or are you simply referring to the actual column Limit1 which is failing)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group