how could we convert the the data in binary to char

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

how could we convert the the data in binary to char

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Post 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
Post Reply