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,
type miss match
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 210
- Joined: Wed Feb 16, 2005 7:17 am
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.
Hope this helps.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.