what transformations do I have to do?

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
vikramkola
Premium Member
Premium Member
Posts: 15
Joined: Sun Feb 22, 2009 3:31 pm

what transformations do I have to do?

Post by vikramkola »

The source field consists of 80 characters , and I need to place this whole information in target field which consists of 40 characters in size .......
what transformation or what stages do I need to use?

thank you.
vikram
dganeshm
Premium Member
Premium Member
Posts: 91
Joined: Tue Aug 11, 2009 3:26 pm

Re: wat transfermations i have to do?

Post by dganeshm »

vikramkola wrote:can any one explain me....
the sourse field consistis of 80 charecters ,and i should place this whole information in target field which consists of 40 charecter in size .......
what trans formation or what stages i had to use ?
thanku.
If your source consists of data more than 40 valid characters its most likely to be truncated.. all you can do is remove the leading and trailing spaces using a tranformer..or change the target table definition to hold 80 characters ( this would be the intelligent approach)
Regards,
Ganesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's no transformation that will allow you to put 'this whole information', meaning all 80 characters into a 40 character field. Are you allowed to truncate it? Or do you need to reject if it doesn't fit?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vikramkola
Premium Member
Premium Member
Posts: 15
Joined: Sun Feb 22, 2009 3:31 pm

Post by vikramkola »

yes u can truncate the spaces or any other operation if u want to do you can but the whole information should be placed in the taget
vikram
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I'm trying to determine if you are having language difficulties or are just completely inexperienced. You can't fit a larger text string into a smaller text string without some sort of data loss or truncation, it is a physical impossibility.

Even if you used an external stage and some sort of external data compression tool, the result would NOT be text. Trimming the text to remove all the extra spaces would also NOT guarantee that the larger string would fit into the smaller string, nor would you be able to "rebuild" the original string.

DataStage isn't "magic" - go back to the people asking you to do this and ask them how they think this can possibly occur.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

I am not sure whether the checksum function can help... data will be encoded in that case.
Kandy
_________________
Try and Try again…You will succeed atlast!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, a checksum is not really any kind of 'encoding'. They're used as a method of ensuring that data hasn't been lost in transmission.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply