473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DB2 Connect returning data in HEX?

Lee
Hi All,
I am using DB2 Connect on AIX 5.3 to access DB2/400 data. I can see
and return data from some libraries/tables as you would expect but when
I access some JD Edwards data (e.g. library.F0902) the columns are
being returned as HEX values.
For example, using STRSQL form within my 5250 emulator I run the
following SQL:
select GBCO, count(*) from library.F0902 group by GBCO
which returns the following:

GBCO Count(*)
00100 3734656
00110 4258
....
....

DB2Connect returns this:
GBCO 00002
------------- -----------
x'F0F0F1F0F0' 3734656
x'F0F0F1F1F0' 4258

Any idea what I can do to resolve this? (It is not happening with
every table.)
Many thanks in advance for your suggestions.
Regards,
Lee

Apr 13 '06 #1
3 4783
Lee wrote:
Hi All,
I am using DB2 Connect on AIX 5.3 to access DB2/400 data. I can see
and return data from some libraries/tables as you would expect but when
I access some JD Edwards data (e.g. library.F0902) the columns are
being returned as HEX values.
For example, using STRSQL form within my 5250 emulator I run the
following SQL:
select GBCO, count(*) from library.F0902 group by GBCO
which returns the following:

GBCO Count(*)
00100 3734656
00110 4258
...
...

DB2Connect returns this:
GBCO 00002
------------- -----------
x'F0F0F1F0F0' 3734656
x'F0F0F1F1F0' 4258

Any idea what I can do to resolve this? (It is not happening with
every table.)
Many thanks in advance for your suggestions.

You might check the data type and CCSID (if a string type) of GBCO on
the server. Comparing column attributes between tables that work (vs
not) may offer a clue. In a 5250 emulator session, either:

Command line: dspffd library/f0902
STRSQL: select substr(column_name,1,20), data_type, ccsid from syscolumns

where table_schema = 'LIBRARY' and table_name = 'F0902'

--
Karl Hanson
Apr 13 '06 #2
Lee
Karl, you are right - the CCSIDs are different. For the tables that
come back as text the CCSID is 37, for the others it is 65535. I do
not expect to be able to modify these on the source systems, so a
colleague told me about a setting in the Client Access ODBC setup for
my desktop to change - I am testing that next. However, does anyone
know if (and how) you can configure the DB2Connnect connection on the
AIX server to do the same thing (convert binary to text)?
Thanks Again,
Lee

Apr 13 '06 #3
Lee wrote:
Karl, you are right - the CCSIDs are different. For the tables that
come back as text the CCSID is 37, for the others it is 65535. I do
not expect to be able to modify these on the source systems, so a
colleague told me about a setting in the Client Access ODBC setup for
my desktop to change - I am testing that next. However, does anyone
know if (and how) you can configure the DB2Connnect connection on the
AIX server to do the same thing (convert binary to text)?


Don't know of a config option, but a suggested workaround is to use a
cast on the client side:

select cast(GBCO as char(5) ccsid 37), count(*)
from library.F0902 group by GBCO

--
Karl Hanson
Apr 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Fraser Ross | last post by:
I need to know the syntax for writing a reference of an array. I haven't seen it done often. I have a class with a member array and I want a member function to return an reference to it. ...
6
by: Generic Usenet Account | last post by:
Is it okay to return a local datastructure (something of type struct) from a function, as long as it does not have any pointer fields? I think it is a bad idea, but one of my colleagues does not...
1
by: David Lozzi | last post by:
It use to be so easy in ASP, but now in ASP.NET i'm lost and confused. I'm trying to connect to a SQL database, open a table via a SQL string. Then take the returning recordset and do what I want...
2
by: iwdu15 | last post by:
hey, i was wondering if 1) anyone could tell me whats wrong with my code, i did a little fixing to the msdn version fo this, or 2) how to make a simple program that will connect and listen for...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
10
by: blurryimage | last post by:
Ok guys I have racked my brain on this one. I have a vb .net service installed on a win2k server. I am trying to get it to connect to sql 2000 box but I get this error: An error has occurred...
23
by: pauldepstein | last post by:
Below is posted from a link for Stanford students in computer science. QUOTE BEGINS HERE Because of the risk of misuse, some experts recommend never returning a reference from a function or...
3
by: =?Utf-8?B?QWxpY2UgV2Vp?= | last post by:
Hi, I am not sure if this is the right place for me to post this question. I have a VB.NET program written up for a user-interface, and I wanted to connect this to a PHP script to allow back end...
3
by: A. W. Dunstan | last post by:
I'm creating a socket as follows: m_networkSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); m_networkSocket.LingerState = new LingerOption(true, 1);...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.