Discussion:
DB2 Codepage conversion problem with XML
(too old to reply)
cma
2003-09-08 20:37:53 UTC
Permalink
Hi all,

i have the following problem.

I'm using a DB2-Client V7 on a Linux-Server from a Java-Application.
This application connected to zOS(OS390)/DB2 V7 with the App- Driver
(db2java.zip). Because I can't use Unicode on the zOS/DB2, I have
disabled Unicode n the "db2cli.ini" on the DB2-Client
(disableunicode=1).

When I store data in a char-field on the zOS-Side everything works reat.
Also characters over 0xFF was converted/translated. All these haracters
where stored in the zOS/DB2 as 0x3F (I know, that I lost he information
what character it was, but it is ok).

But now my problem begin. When the Java-Application read the data, it
parsed the data with a XML-Parser. Everything works fine until it get a
character with the code 0x3F, because of codepage conversion (I think)
the application get a character with a hexcode 0x1A, and the XML-Parser
throws an exception that 0x1A is an illegal XML character.

After testing a lot, I have no more ideas, where and how I can change
settings to say, that the conversion should not be like this: over 0xFF
-> 0x3F or x3F -> 0x1A

Before you answer :-), please notice my limitations what I can
change or not:
- can't change the codepage on zOS/DB2
- can't change the translationstable on zOS/DB2 (if there is any)
- can't change the Java-Application (to handle the exception)

- can change DB2-Client-Settings
- can change the Users, so that i don't get characters over 0xFF
anylonger ;-)

Have anyone any ideas (and understand my problem)?

TIA cma



--
posted via MFF : http://www.MainFrameForum.com - USENET Gateway
++++++ +++++++++
2003-09-08 21:01:37 UTC
Permalink
Don't know your operating system but for OS/390 there is a UNICODE feature
with is free.
Ask you system programmer to setup (it's easy) and DB2 will use the this
undercover.

It's a base feature of z/OS R2 or R4

Verify the z/OS Unicode feature with system command D UNI,ALL

++++++
Post by cma
Hi all,
i have the following problem.
I'm using a DB2-Client V7 on a Linux-Server from a Java-Application.
This application connected to zOS(OS390)/DB2 V7 with the App- Driver
(db2java.zip). Because I can't use Unicode on the zOS/DB2, I have
disabled Unicode n the "db2cli.ini" on the DB2-Client
(disableunicode=1).
When I store data in a char-field on the zOS-Side everything works reat.
Also characters over 0xFF was converted/translated. All these haracters
where stored in the zOS/DB2 as 0x3F (I know, that I lost he information
what character it was, but it is ok).
But now my problem begin. When the Java-Application read the data, it
parsed the data with a XML-Parser. Everything works fine until it get a
character with the code 0x3F, because of codepage conversion (I think)
the application get a character with a hexcode 0x1A, and the XML-Parser
throws an exception that 0x1A is an illegal XML character.
After testing a lot, I have no more ideas, where and how I can change
settings to say, that the conversion should not be like this: over 0xFF
-> 0x3F or x3F -> 0x1A
Before you answer :-), please notice my limitations what I can
- can't change the codepage on zOS/DB2
- can't change the translationstable on zOS/DB2 (if there is any)
- can't change the Java-Application (to handle the exception)
- can change DB2-Client-Settings
- can change the Users, so that i don't get characters over 0xFF
anylonger ;-)
Have anyone any ideas (and understand my problem)?
TIA cma
--
posted via MFF : http://www.MainFrameForum.com - USENET Gateway
Rolf Loeben
2003-09-08 21:42:22 UTC
Permalink
cma,

OT.
You don't refer to db2.mvs, you relate to db2.udb. Please post there or
consult your IBM representative. The data provided here are insufficient
for my crystal ball. The are not versions, ptf levels, codes pages used
e.t.c.

Regards Rolf
cma
2003-09-09 18:26:18 UTC
Permalink
@ Rolf

Don't understand why OT? Store the Data in a OS390/DB2, wasn't this in
earlier times MVS?

But if it will help, some more informations about the systems:

Linux-Server: java: 1.4.1_04, Java HotSpot(TM) Client VM mixed mode os:
Linux version 2.4.21 on i386 encoding: ISO-8859-15

DB2-Client: driver: IBM DB2 JDBC 2.0 Type 2 (App-Driver from
../java12/db2java.zip) version: 07.02.0008 isolation: read committed
opened to: jdbc:db2:adb set in "db2cli.ini" "disableunicode=1" in the
"[common]"-section


z/OS: os-version: sorry, don't know the version

zA1:database: DB2 OS/390 version: 07.01.0001 codepage: 273
(EBCDIC 8-Bit ?)


After reading data from DB2 getting the this error: Error:
editor.proxy: Error while reading sgml Unzulässiges XML-Zeichen:
 org.xml.sax.SAXParseException: Unzulässiges XML-Zeichen:
 at
org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
at org.apache.crimson.parser.InputEntity.parsedContent(InputEntity-
java:593) at
org.apache.crimson.parser.Parser2.content(Parser2.java:1826) at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at or-
g.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.jav-
a:223) . . .


Think you can translate "Unzulässiges XML-Zeichen" to "Illegal
XML-Character"


For information how I get this error please read my first post.

Thanks, cma



--
posted via MFF : http://www.MainFrameForum.com - USENET Gateway
Rolf Loeben
2003-09-10 01:09:13 UTC
Permalink
cma,

OT for you are asking about db2.udb, not db2.mvs. So please post there. I
think that promises more success.

Regards Rolf

Loading...