varchar60 to varchar40

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
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

varchar60 to varchar40

Post by ds_is_fun »

My job aborts even Im trimming varchar60 to 1,40 when writing to target type varchar40.
Do I use something like varchar0 convert function for this too as best practice?
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

It Seems there are some other problem..
did you try (input_link.column[1,40])
and what i will suggest is...do not do any transformation..just try to send it ..it should automatically take care.
ambasta
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'd probably use Left(InLink.TheString,40) - since I think it's better "self documentation" - but only after consulting the business to obtain a business rule to govern the situation that Len(InLink.TheString) > 40.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

I have certain moves from varchar(60) to varchar(40) and some char(30) to char(40) and I have applied left(colname,40) and left(colname,30). It still fails with the message below on SQl server 2005 in DS-
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Try with RCP off.
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

RCP is off.
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

I changed the column lengths to be equal on source and target side.
I still get the same error -
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

Its a bug with unicode patch. I had to delete unicode description from extended and send the job over to tech support.
Post Reply