Page 1 of 1

what transformations do I have to do?

Posted: Tue Jan 12, 2010 11:09 am
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.

Re: wat transfermations i have to do?

Posted: Tue Jan 12, 2010 11:17 am
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)

Posted: Tue Jan 12, 2010 11:36 am
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?

Posted: Tue Jan 12, 2010 11:40 am
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

Posted: Tue Jan 12, 2010 11:52 am
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.

Posted: Tue Jan 12, 2010 1:30 pm
by kandyshandy
I am not sure whether the checksum function can help... data will be encoded in that case.

Posted: Tue Jan 12, 2010 3:37 pm
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.