Trim function clarification

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

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Trim function clarification

Post by vamsi.4a6 »

In user variable activity following derivation is defined

Field(Trim(EReplace(Get_Extract_DTTM_Param.$CommandOutput,@FM,""),("":'"':""), "A") ,"|",2).

Can anybody explain what trim will do in above case.basically i did not understand below part

Trim(columnname,("":'"':""),"A")
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

It would appear remove all occurrences of a double quotes. It also has a lot of extra "stuff" in the function call that is not needed. Use Notepad or code tags to see:

Code: Select all

Trim(columnname,("":'"':""),"A")
... and should be equivalent to:

Code: Select all

Trim(columnname, '"', "A")
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah yes, was going to chime in a little earlier that it seemed a bit... nonsensical.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply