IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Data truncation while parsing XML


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Chalcedony Herbertson

New User


Joined: 30 Dec 2010
Posts: 3
Location: Chennai

PostPosted: Thu Dec 30, 2010 1:03 pm
Reply with quote

Hi,

While using an XML PARSE, the data is getting truncated.

EX: my input XML tag is <MyName>Mainframe</MyName>
when i display the XML-TEXT inside the "CONTENT-CHARACTERS" Event, i get two values "Mainfram" and "e".

Can any one please help me out with this?

Thanks
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Thu Dec 30, 2010 3:19 pm
Reply with quote

Check the variable length of transmitting end and receiving end variables of your MOVE statement.

Code:
MOVE <transmitting end VAR> TO <receiving end VAR>
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Thu Dec 30, 2010 4:24 pm
Reply with quote

Sorry I mis-interpreted your post. I thought you are parsing the XML using pure COBOL code. But Enterprise COBOL has XML PARSE function.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Dec 30, 2010 4:29 pm
Reply with quote

It would be nice to show the XML PARSE statement you use.
Back to top
View user's profile Send private message
Chalcedony Herbertson

New User


Joined: 30 Dec 2010
Posts: 3
Location: Chennai

PostPosted: Thu Dec 30, 2010 5:35 pm
Reply with quote

Thanks Peter,

I am able to get it now. icon_biggrin.gif

The issue was the spilting of data was oaccuring at certain length icon_sad.gif .

so I tried reorganising the internal table size and it worked out. icon_surprised.gif

I am not sure why it happened or the reason behind it. I will post the reason if i am able to find it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top