How To Change the Length Of a Column In ModifyStage

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
ramakanth1983
Participant
Posts: 4
Joined: Fri Sep 05, 2008 1:07 am
Contact:

How To Change the Length Of a Column In ModifyStage

Post by ramakanth1983 »

Hi,

My Input is A Column Length of 16 ..I need to do a look up.The lookup column length is 20.

I have to change the lookup column length from 20 to 16 in the modify stage. then i want to perform the lookup.

Can you please tell me the syntax of how to do that in MODIFY STAGE in the specification.

Thanks in Anticipation
Thanks,
Ramakanth
tomk
Premium Member
Premium Member
Posts: 5
Joined: Mon Sep 04, 2006 10:46 am
Location: Dallas, TX

Re: How To Change the Length Of a Column In ModifyStage

Post by tomk »

Try:

stringField=substring(string,
starting_position, length)

Where stringField is the output column and string is the input column.
mahadev.v
Participant
Posts: 111
Joined: Tue May 06, 2008 5:29 am
Location: Bangalore

Post by mahadev.v »

Changing the length from 20 to 16 might truncate the data in the field. And also logs a warning. Better option would be to change the length of your main link field to 20 from 16.
"given enough eyeballs, all bugs are shallow" - Eric S. Raymond
Post Reply