Data type not supported

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Data type not supported

Post by abhilashnair »

I am facing problem with DB2 data type Long Varchar. The column is defined as Long Varchar in DB2. The max length of the contents inside this field is 16000. I fired a query to make sure of this. I am using ODBC Enterprise stage and trying to read this column data in datastage. I have imported meta data using ODBC table Definition. It is taking it as LongVarChar with Length of 32800 at the time of import. But when I try to view data it gives an error "Data type not Supported"

DataStage V8.1, DB2 v9.5

Pls advise
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, view data may not work but does the job run?
-craig

"You can never have too many knives" -- Logan Nine Fingers
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Post by abhilashnair »

The job fails with error " Data type not supported"
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Post by abhilashnair »

Resolved. Query used inside ODBC.

SELECT CAST(COLNAME AS VARCHAR(4000) AS COLNAME FROM TABLENAME

Define Metadata as VARCHAR. Length 4000
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm curious how that solves your problem when your max data length is four times the size of the CAST output? You don't care if it gets truncated? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply