Modify Stage warning : varchar(255) to varchar(50)

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
Suhel_2112
Premium Member
Premium Member
Posts: 10
Joined: Sun Jul 15, 2012 11:34 pm
Location: Bangalore

Modify Stage warning : varchar(255) to varchar(50)

Post by Suhel_2112 »

Hi All,

I am trying to do a string to string type conversion, but i still get a warning, as explained below, what am i doing worng ?

Incoming column:
FILE_REFERENCE varchar(255) -Nullable

Outgoing column:
FILE_REFERENCE_ID varchar(50) -Nullable


Specification:
FILE_REFERENCE_ID:string[max=50]=substring[0,50](FILE_REFERENCE)

Warning:
When checking operator: When binding output schema variable "outRec": When binding output interface field "FILE_REFERENCE" to field "FILE_REFERENCE_ID": Conversion from source type "string[max=255]" to result type "string[max=50]": Taking substring of variable-length source string.
Thanks & Regards
Suhel Khan

Env Info:
DataStage Version : 8.5
DSEngine Platform : Windows Server 2008 R2
DWH Platform : Oracle 10g
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure you are doing anything wrong, per se... although it's not really a 'conversion' and all you are getting is a warning you that could demote if you want to stick with the stage. Found a Vincent McBurney blog entry on the Modify stage where he notes that it is all about converting from one data type to another. I think in your case all it sees is 255 going into 50, so logs the warning. Using those substring operators in a Transformer should avoid the message.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Indeed. Use a message handler to demote this message to informational.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Suhel_2112
Premium Member
Premium Member
Posts: 10
Joined: Sun Jul 15, 2012 11:34 pm
Location: Bangalore

Post by Suhel_2112 »

Hi chulett , I tried your suggestion .I removed modify stage and used FILE_REFERENCE[1,50] in tranformer and that solved the problem
Thanks & Regards
Suhel Khan

Env Info:
DataStage Version : 8.5
DSEngine Platform : Windows Server 2008 R2
DWH Platform : Oracle 10g
Post Reply