Possible truncation of variable length ustring

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
gowrishankar_h
Participant
Posts: 42
Joined: Wed Dec 26, 2012 1:13 pm

Possible truncation of variable length ustring

Post by gowrishankar_h »

Hi,

I want to convert varchar(11) column to char(11).So i used modify stage to convert the datatype.I simply changed the datatype in output metadata and set the specification as NOWARN but still iam getting waring in output as below.


On input data set 1: When binding input interface field "WCC_GS_CTS_PARTY_ID" to field "WCC_GS_CTS_PARTY_ID": Implicit conversion from source type "ustring[variable_max=11]" to result type "string[11]": Possible truncation of variable length ustring when converting to string using codepage UTF-8.

How to avoid this warning?.
crystal_pup
Participant
Posts: 62
Joined: Thu Feb 08, 2007 6:01 am
Location: Pune

Post by crystal_pup »

One way is to not to define the length of the target datatype.
gowrishankar_h
Participant
Posts: 42
Joined: Wed Dec 26, 2012 1:13 pm

Post by gowrishankar_h »

Target datatype means both the join input or join stage output?


Note:when i use Transformer instead of modify stage iam not getting this warning...but i hope using modify stage in this scenirio is good pracitce.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you mention the cast (change of data type) in the Modify stage specification?

Code: Select all

newcol:ustring[11]=inputcol
(Use ustring if Unicode, UTF-8, etc., are in play; use string otherwise.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gowrishankar_h
Participant
Posts: 42
Joined: Wed Dec 26, 2012 1:13 pm

Post by gowrishankar_h »

Yes but still i am getting the warning..i replaced the modify stage with transformer stage now it work fine :? ...
Post Reply