Trim in Modify stage
Moderators: chulett, rschirm, roy
Trim in Modify stage
HI ,
Can any one tell me abt the syntax to use in Modify stage for Trim function.
Thanks in Advance
Can any one tell me abt the syntax to use in Modify stage for Trim function.
Thanks in Advance
kartheek
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
That wil be string_trim()
You have posted in the wrong forum.
You have posted in the wrong forum.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Not sure if this is in Parallel Job Developer's Guide. This is the syntax :
This function can be used to trim occurrences of a character from the beginning or end of a string.
Ex:
But you cannot trim both leading and trailing spaces using this function.
Code: Select all
string_trim[character,direction,justify](string)
Ex:
Code: Select all
string_trim[" "](string) --> Will trim all trailing spaces
string_trim[" ",begin](string) --> Will trim all leading spaces
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Good catch. However it IS in the Orchestrate Operators guide. Page 13-19 in the version 7.5 manual. Curiously, string_trim does not appear in the version 7.0 Orchestrate Operators guide.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Seems the Trim functions doesnt work in the modify Stage. i tried the option in Orchestrate manual and also tried the one given here , but it is not triming the spaces.
I used string_trim() and also tried with strip_whitespace () and trim_leading_trailing command. it doesnt work
Please let me know if there is anything different.
Manish
I used string_trim() and also tried with strip_whitespace () and trim_leading_trailing command. it doesnt work
Please let me know if there is anything different.
Manish
Thanks
Manish
Manish
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I wonder if it's because of the unbounded string specification of the data type. Try
Code: Select all
n3:string[max=20] = string_trim[" ",end,begin](n1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
I copied a bunch of Modify Stage code from the DataStage and Orchestrate guides into this wiki. Sh, don't tell IBM. The string_trim is in there. Was thinking it would be a good place to add sample code but never got around to it. Feel free to modify it.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There's as complete a list of Modify stage functions as I've been able to construct here
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.