type miss match

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
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

type miss match

Post by thumati.praveen »

hi all,

while i am loading into the taret DB2 table it is giving the following warnings
"dbW_IIPNT0_Tgt: When checking operator: When binding input interface field "PNADR3" to field "PNADR3": Implicit conversion from source type "string[50]" to result type "string[20]": Source string will be truncated."
in DB2 stage.it having char(20) length and comming data having char(50) length.

thanks,
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Since in this case, DS will inadvertently write the first 20 chars out of the incoming 50 chars, so it will make sense to take a substring (first 20) of the incoming string and at least get rid of the warnings, if that serves the purpose. But if all the 50 chars are required then the scope of solution must move out of DS.

Hope this helps.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not inadvertently - it's all DataStage could do given your design, which is asking DataStage potentially to stuff a 50 character string into a 20 character field. Of course it's going to generate a warning - you can lose information by trying to do this! The alternative would be to abort the job.

You need to handle the situation explicitly with a substring function, either in a Modify stage or a Transformer stage. Beware that character string positions are counted from 0 in a Modify stage and from 1 in a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply