Trim in Modify stage

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

zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

I have tried as posted, its triming only the leading spaces

Post by zulfi123786 »

I have tried as posted, its triming only the leading spaces but the trailing spaces still remain untrimmed. please suggest............
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Re: I have tried as posted, its triming only the leading spa

Post by sanjay »

Try

n3:string[max=20] = string_trim[" ",end,begin](n1)

Thanks
Sanjay
zulfi123786 wrote:I have tried as posted, its triming only the leading spaces but the trailing spaces still remain untrimmed. please suggest............
abbss_guri
Participant
Posts: 2
Joined: Tue Oct 21, 2008 1:51 am

trim in modify

Post by abbss_guri »

I myself tried few things but nothing seems to be working
All the functions mentioned in the post , none of them works for me
space=String_Trim[" "](ABC)
space=String_Trim(ABC)
space=String_Trim[" ",end,begin](ABC)
.
.
.
. list goes on but always i get the same output
Peek_292,0: space: 4 :(
with trim_leading_trailing and strip_white_spaces, the job aborts.
any idea where i am wrong
gaurav garg
ETL developer
sathesh.ss
Participant
Posts: 1
Joined: Wed Aug 01, 2007 10:55 pm
Location: bangalore

Re: I have tried as posted, its triming only the leading spa

Post by sathesh.ss »

Can Somebody still help me , how we would trim the char field in modify stage
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you literally mean char rather than varchar and you're trying to trim trailing spaces, you cannot. Anywhere. Nature of the beast.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Technically you can trim a Char data type but it is padded before being transferred to the output link. The pad character is defined using the environment variable APT_STRING_PADCHAR. A Char field has a constant size on an output link.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply