View previous topic :: View next topic |
Author |
Message |
satyenderd Beginner
Joined: 26 Aug 2005 Posts: 144 Topics: 73
|
Posted: Thu Aug 23, 2007 3:53 am Post subject: XML PARSER - PROBLEM |
|
|
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 |
|
|
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Thu Aug 23, 2007 5:24 am Post subject: |
|
|
I have found that the parser is very sensitive about finding the "<?xml version= |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu Aug 23, 2007 6:15 am Post subject: |
|
|
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 |
|
|
William Thompson Beginner
Joined: 15 May 2007 Posts: 5 Topics: 0
|
Posted: Thu Aug 23, 2007 8:07 am Post subject: Re: XML PARSER - PROBLEM |
|
|
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 |
|
|
nagamanitv@gmail.com Beginner
Joined: 29 Nov 2006 Posts: 2 Topics: 0 Location: Hyderabad
|
Posted: Tue Aug 28, 2007 1:28 am Post subject: |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Aug 28, 2007 1:41 am Post subject: |
|
|
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 |
|
|
nagamanitv@gmail.com Beginner
Joined: 29 Nov 2006 Posts: 2 Topics: 0 Location: Hyderabad
|
Posted: Tue Aug 28, 2007 3:46 am Post subject: |
|
|
When I displayed the variable, it's showing the XML document correctly |
|
Back to top |
|
|
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Tue Aug 28, 2007 4:46 am Post subject: |
|
|
Well, what does the first 20 or so bytes look like? Please post...(hex?)...
Is your error a 317 also? |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Aug 28, 2007 4:56 am Post subject: |
|
|
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 |
|
|
|
|