Substitute for server function SubString in PX

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
creatingfusion
Participant
Posts: 46
Joined: Tue Jul 20, 2010 1:26 pm
Location: USA
Contact:

Substitute for server function SubString in PX

Post by creatingfusion »

Hi,
My requirement is like there is a string say "abcpqrxyz"
i want it to convert it into "abc-pqr-xyz"

In server i could cut the strings and concatenate with "-" in between.

But i need to do this in parallel job.

Please suggest.
Thanks
Abhijit
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Code: Select all

svStr="abcpqrxyz"
svNewStr=svStr[1,3] : "-" : svStr[4,3]  "-" : svStr[7,3]
You are the creator of your destiny - Swami Vivekananda
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The square brackets "[]" are the substring operators in both products, for whatever reason I never use the function.
-craig

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