Trim() with options L, T and B.

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

thamark
Premium Member
Premium Member
Posts: 43
Joined: Thu Jan 29, 2004 12:12 am
Location: US

Re: Character datatype

Post by thamark »

I_Server_Whale wrote:thamark,

I have my input and output columns defined as Varchar(100). So that's not what is causing it. I even tried

Code: Select all

	Trim(Trim(InCol), 'x','B')

But it still returns:

Code: Select all

AAAAAAAxxxxxBBBBBBBBBBxxxxxxxx
Whale.
Then you can verify to see, if you have some un-printable character at end of the string.
Hmm i will fill this when ever i get one
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

As a test, try giving a hard-coded value to the Trim() function.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Re: Character datatype

Post by I_Server_Whale »

thamark wrote:
Then you can verify to see, if you have some un-printable character at end of the string.
You are right. Gosh! I feel embarrassed. I should have checked. There is in fact an unprintable character at the end of the string. I removed it and it works fine. :oops:

Ray,

Don't bother digging further. :(

DSguru2B,

Tried hard-coded. It worked.



Sorry for the false alarm, Folks.

Have a good one,
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

<unprintable response>

</unprintable response>
:wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

:)
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

DSguru2B wrote:Unfortunately that does not work. Thats really odd. But the following works to remove tabs.

Code: Select all

Trim(DSLink17.Num1,'	','L')
Trim(DSLink17.Num1,'	','T')
Thanks for the confirmation. I thought i was the only one having this problem.
Post Reply