By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,454 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,454 IT Pros & Developers. It's quick & easy.

Codepage conversion and FOR BIT DATA

P: n/a
I am running a statically bound COBOL program on DB2 7.1 OS/390 trying to insert
EBCDIC strings into a varchar column in a table on DB2 UDB 7.2 FP10a Workgroup
edition. The varchar column is defined as FOR BIT DATA which according to the
SQL Reference - "Specifies that the contents of the column are to be treated as bit
(binary) data. During data exchange with other systems, code page conversions
are not performed."
The problem I am having is that the strings are being converted to ASCII
somewhere onlong the way (DB2 Connect maybe?) before being inserted.
Is this correct? How can I stop the conversion happening?
I don't want to define the database as only storing EBCDIC data.

TIA
Ivan
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I have never done it from OS/390 to the PC, but perhaps you can insert
the data as hex strings?

Ivan wrote:
I am running a statically bound COBOL program on DB2 7.1 OS/390 trying to insert
EBCDIC strings into a varchar column in a table on DB2 UDB 7.2 FP10a Workgroup
edition. The varchar column is defined as FOR BIT DATA which according to the
SQL Reference - "Specifies that the contents of the column are to be treated as bit
(binary) data. During data exchange with other systems, code page conversions
are not performed."
The problem I am having is that the strings are being converted to ASCII
somewhere onlong the way (DB2 Connect maybe?) before being inserted.
Is this correct? How can I stop the conversion happening?
I don't want to define the database as only storing EBCDIC data.

TIA
Ivan


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands

Nov 12 '05 #2

P: n/a
We didn't have this problem, but were using different releases of the
mainframe and Windows DB2 (also, we used Enterprise Edition).

I strongly suggest you open a PMR.

"Ivan" <iv**********@hotmail.com> wrote in message
news:68**************************@posting.google.c om...
I am running a statically bound COBOL program on DB2 7.1 OS/390 trying to insert EBCDIC strings into a varchar column in a table on DB2 UDB 7.2 FP10a Workgroup edition. The varchar column is defined as FOR BIT DATA which according to the SQL Reference - "Specifies that the contents of the column are to be treated as bit (binary) data. During data exchange with other systems, code page conversions are not performed."
The problem I am having is that the strings are being converted to ASCII
somewhere onlong the way (DB2 Connect maybe?) before being inserted.
Is this correct? How can I stop the conversion happening?
I don't want to define the database as only storing EBCDIC data.

TIA
Ivan

Nov 12 '05 #3

P: n/a
Unfortunately what you are experiencing is a limitation of the DB2 UDB
for Linux, Unix and Windows v7.2 DRDA server support. To avoid the
conversion of the character data on input the data must be tagged as FOR
BIT DATA at the source.

Alternatively you can upgrade to DB2 UDB for Linux, Unix and Windows
version 8.1 were the limitation has been removed.

Ivan wrote:
I am running a statically bound COBOL program on DB2 7.1 OS/390 trying to insert
EBCDIC strings into a varchar column in a table on DB2 UDB 7.2 FP10a Workgroup
edition. The varchar column is defined as FOR BIT DATA which according to the
SQL Reference - "Specifies that the contents of the column are to be treated as bit
(binary) data. During data exchange with other systems, code page conversions
are not performed."
The problem I am having is that the strings are being converted to ASCII
somewhere onlong the way (DB2 Connect maybe?) before being inserted.
Is this correct? How can I stop the conversion happening?
I don't want to define the database as only storing EBCDIC data.

TIA
Ivan


Nov 12 '05 #4

P: n/a
Mike Springgay <sp******@ca.ibm.com> wrote in message news:<40**************@ca.ibm.com>...
Unfortunately what you are experiencing is a limitation of the DB2 UDB
for Linux, Unix and Windows v7.2 DRDA server support. To avoid the
conversion of the character data on input the data must be tagged as FOR
BIT DATA at the source.

Alternatively you can upgrade to DB2 UDB for Linux, Unix and Windows
version 8.1 were the limitation has been removed.

Ivan wrote:
I am running a statically bound COBOL program on DB2 7.1 OS/390 trying to insert
EBCDIC strings into a varchar column in a table on DB2 UDB 7.2 FP10a Workgroup
edition. The varchar column is defined as FOR BIT DATA which according to the
SQL Reference - "Specifies that the contents of the column are to be treated as bit
(binary) data. During data exchange with other systems, code page conversions
are not performed."
The problem I am having is that the strings are being converted to ASCII
somewhere onlong the way (DB2 Connect maybe?) before being inserted.
Is this correct? How can I stop the conversion happening?
I don't want to define the database as only storing EBCDIC data.

TIA
Ivan


The problem doesn't occur for SELECTs going across platforms in either direction.
I would have thought that if DRDA server can determine that the column is
FOR BIT DATA on a SELECT statement and not do the conversion then it should
also be able to do this for INSERT statements as well.
Am I missing something?

Thanks
Ivan
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.