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 

XML PARSER - PROBLEM

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


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Thu Aug 23, 2007 3:53 am    Post subject: XML PARSER - PROBLEM Reply with quote

Could anyone of you help in this regard?

Thanks in advance.

While parsing the XML document which is declared as a CLOB in the COBOL program getting the XML Error 317(ie the Parser can not determine the document encoding). In the compiler options, the default option CODEPAGE(37) is used. Any specific encoding technique needs to be used in the compiler options? If so, what should be used? But with out using the CLOB, if an XML document is declared as CHAR, then the COBOL program is not throwing any errors & successfully parsing the XML document as well. So looks like this is specific to CLOB. Any help on this is appreciated
_________________
Satya
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Aug 23, 2007 5:24 am    Post subject: Reply with quote

I have found that the parser is very sensitive about finding the "<?xml version=
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: Thu Aug 23, 2007 6:15 am    Post subject: Reply with quote

satyenderd,

What version of cobol are you using and what is the size of CLOB data item? The prior versions of cobol had a size limitation of 16M. The newer versions have a limit of 128M.

Show us the definition of the CLOB and version of cobol you are using.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
William Thompson
Beginner


Joined: 15 May 2007
Posts: 5
Topics: 0

PostPosted: Thu Aug 23, 2007 8:07 am    Post subject: Re: XML PARSER - PROBLEM Reply with quote

satyenderd wrote:
But with out using the CLOB, if an XML document is declared as CHAR, then the COBOL program is not throwing any errors & successfully parsing the XML document as well. So looks like this is specific to CLOB. Any help on this is appreciated
Are you parsing the host variable for the CLOB and does that include the CLOB variable length?
Back to top
View user's profile Send private message
nagamanitv@gmail.com
Beginner


Joined: 29 Nov 2006
Posts: 2
Topics: 0
Location: Hyderabad

PostPosted: Tue Aug 28, 2007 1:28 am    Post subject: Reply with quote

Kolusu,

I too have the same problem with the XML parser. We use COBOL compiler V 3.4.1 and the length of the CLOB is 1024K. And the below is the declarion of the CLOB host variable,

Code:
01 WS-STRUCTURE USAGE IS SQL TYPE IS CLOB(1024K).


William Thompson,
For the above CLOB host variable declaration, DB2 generates the equivalent DB2 structure which includes the CLOB variable length.

Thank you verymuch!!!
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 28, 2007 1:41 am    Post subject: Reply with quote

y'all sure that the data in your working-storage area that you think contains the CLOB data is really the xml document?

perhaps display the first 100 bytes or so to insure that you only have the xml portion of the CLOB and not pointer/length data.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
nagamanitv@gmail.com
Beginner


Joined: 29 Nov 2006
Posts: 2
Topics: 0
Location: Hyderabad

PostPosted: Tue Aug 28, 2007 3:46 am    Post subject: Reply with quote

When I displayed the variable, it's showing the XML document correctly
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Tue Aug 28, 2007 4:46 am    Post subject: Reply with quote

Well, what does the first 20 or so bytes look like? Please post...(hex?)...
Is your error a 317 also?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 28, 2007 4:56 am    Post subject: Reply with quote

instead of referencing this:
Code:
01 WS-STRUCTURE USAGE IS SQL TYPE IS CLOB(1024K).


Try referencing the X type data structure that DB2 generates for the CLOB data (not the group item which contains the length). Why? Because of the USAGE clause for WS-STRUCTURE.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
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