The size specified for column

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
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

The size specified for column

Post by thurmy34 »

Hi All
We just achieved the installation of Datastage 8.7 on a brand new server.
When we performed our test of installation we got this warning :

Code: Select all

The size specified for column 'Col1' (20) is less than that of the source table column (38);data truncation may result.
This happens using the old db2 connector , the job was written in the 8.1 version.
The col1 is really a char of 20 and the 38 comes from the previous colunmn in the source table.
How can we fix that ?
Thank you
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do you still get the warning if you substring while moving the data from one to the other?
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

We are not doing any transformation ,the job is very simple (a select from a table
The warning appears while reading the database.
Hope This Helps
Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK. Is this truly a Server job? From what I recall that rules out using a message handler to demote it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

It's a server job.
This behavior is very annoying because it stops our migration process.
Hope This Helps
Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, you could always lie. :wink:

Alter the source metadata for that field to show a size of 20 and (optionally) substring the field in the SQL.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

I think you misunderstood me .(maybe it's me)
The job is right , the metadata were imported from the database.
In 8.1 the job doesn't produce any warning because everthing is allright.
In 8.7 we got a warning without modift anything.
I can't change all the columns of all the job after the import.
Hope This Helps
Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, not misunderstood at all... just giving you a work-around.

Everything is not "all right" as you could lose data as noted in the warning - 8.1 was broken because it did not warn you about the truncation, they fixed that in the 8.7 release. And I thought we were talking about one column in one job... but "all the columns of all the jobs"? How wide-spread is this issue?

Involve your official support provider to see if there is an alternative way to suppress the warning.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

In the database COL1 is really 20 not 38 , the 38 belong to the previous column of the table .
So 8.1 is correct and 8.7 is wrong.
Hope This Helps
Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

"Previous column of the table" - sorry but what the heck does that mean? :?

If it is "really 20" but your metadata shows 38, fix the metadata. If something else, please clarify.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

I try to clarify
In my db2stage i have this

Code: Select all

Column Name	Derivation	Key	SqlType	lenght
PREC							NO		Char		38
COL1							NO		Char		20
The lenght are correct , the stage writes a warning on COL1 (20) saying that it would be 38 which it's wrong.
Hope This Helps
Regards
rsomiset
Premium Member
Premium Member
Posts: 46
Joined: Fri Sep 21, 2007 7:16 pm

Re: The size specified for column

Post by rsomiset »

Does the view data return correctly?

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

Post by chulett »

Ok... from what I recall there is a 'metadata validation' check step where it goes back to the source table and verifies the metadata you're using. The message implies it is going back and seeing COL1 as CHAR(38) in the source table. If that's not true, meaning the actual column is a CHAR(20) then you need to open a case with your official support provider to find out what's going on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

Hi all
I just find this
JR46185: DB2 API PLUGIN THROWS INVALID WARNING MESSAGES REGARDING DATA TRUNCATION on the Ibm website.

It's fix pack for the 8.5 do you know if a fix exists for the 8.7 version ?

Thank you.
Post Reply