Page 1 of 1

how could we convert the the data in binary to char

Posted: Thu Mar 24, 2005 2:38 am
by pongal
Hi

i have extracted the data from DB2 Database through ODBC Stage, but most of the fields datatypes are binary.
how could we convert from binary to actual char format at the time of extraction itself.

for more info, DB2 Database resides on AS/400.
i think this may be a problem with the ODBC interpretation of AS400 data types. I know the AS/400 uses a "packed" format to store some data, and it appears that it may be interpreted as binary by the ODBC connection.

Thanks in advance
pongal

Posted: Thu Mar 24, 2005 3:31 am
by ArndW
Hello Pongal,

usually the database connectivity stage takes care of data conversions. Do you have the DB/2 ddl for the table and could you post the parts that would be of interest to us? Even though the AS/400 uses EBCDIC instead of ASCII, that conversion should also be working; but it does depend upon how you declare your table and columns in DatStage. Do you have *any* columns (i.e. NUMBER or INTEGER) that come across correctly?

Posted: Thu Mar 24, 2005 4:23 am
by pongal
ArndW,
I am connecting DB2 at remote site, so it may not be possible for me to post DB2 table dll file.
Here is the structure of the table F8903

Field Datatype Length eg:- Correct val
GMMCCU Binary 24 340334033403340334033403 'TM"
GMMLDA Binary 6 463046374638 some chars
GMM01A CHAR 30 INSURANCE RECEIVABLES -do-
GMMPEC Binary 14 4537 "X' or "L"
Except GMM01A, remaining above field values should be in chars, but it is showing in some other format.

Pongal