Page 2 of 2
Posted: Tue Nov 28, 2006 11:38 pm
by balajisr
ajith wrote:
I tried that too,
It is trimming only the trailing spaces not the leading ones.
I seriously don't know what to do now, I have to do Trimming on 3 source feeds. I hate modify stage, it allows me to do nothing. Dont tell me the only way forward is adding 3 transformer stages.
I tried to trim both leading and trailing spaces in a single specification of modify stage before but it did not work.
Posted: Wed Nov 29, 2006 12:03 am
by ray.wurlod
Have you tried two functions?
Code: Select all
string_trim[" ",begin](string_trim[" ",end](MyString))
Posted: Wed Nov 29, 2006 12:23 am
by balajisr
ray.wurlod wrote:Have you tried two functions?
Code: Select all
string_trim[" ",begin](string_trim[" ",end](MyString))
Thanks Ray.
I tried the above code and got the following error:
main_program: Error parsing modify adapter: Error in binding: Error in source field selector: Expected integer, got: "" ""
Expected destination field selector, got: ")"; input:
Col2=string_trim[" ",begin](string_trim[" ",end](Col1))
;
Posted: Wed Nov 29, 2006 1:16 am
by ajith
ray.wurlod wrote:Have you tried two functions?
Code: Select all
string_trim[" ",begin](string_trim[" ",end](MyString))
...
It does not allow me to combine two commands.
I get the same error as Balaji gets
Posted: Wed Nov 29, 2006 1:24 am
by ArndW
The modify stage doesn't allow combining commands
![Sad :(](./images/smilies/icon_sad.gif)
Posted: Wed Nov 29, 2006 2:04 pm
by ray.wurlod
Sometimes it does - I've successfully combined string_trim and substring for example.
Posted: Wed Nov 29, 2006 2:24 pm
by Nageshsunkoji
Hi All,
Final Conclusion from this disscussions is , it is not possible to trim leading and trailing spaces by using Modify stage. It is possible only through Transformer stage. So, can I ask DS gurus, can we ask this functionality in the next release of datastage to IBM. If the above conclusion is right. I am asking to all, If anybody got the answer of TrimLeading and Trailing by using modify stage, please let us know, other wise, we will raise this with IBM.