How to use Substring_by_delimiter in DataStage?

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
SujeethP
Participant
Posts: 13
Joined: Mon Apr 20, 2009 1:37 am
Location: Bangalore

How to use Substring_by_delimiter in DataStage?

Post by SujeethP »

Hi friends,

I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")

Please help me out
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Re: How to use Substring_by_delimiter in DataStage?

Post by priyadarshikunal »

SujeethP wrote:Hi friends,

I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")

Please help me out
Welcome Aboard,

I think you need to use Field function. Search the forum for details.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
v2rao
Participant
Posts: 5
Joined: Mon Apr 20, 2009 12:17 am
Location: India

Re: How to use Substring_by_delimiter in DataStage?

Post by v2rao »

Hi,

you can use index(), or Field() function. Search the functions by string in px development guide.
thanks!

Rao
sharantheboss
Participant
Posts: 14
Joined: Mon Mar 23, 2009 12:57 am
Location: INDIA

Re: How to use Substring_by_delimiter in DataStage?

Post by sharantheboss »

Hi,

Use the below function Field(col1,delimeter,instance)

In your case Field(col,',',1) will fetch record before comma deleimter
Field(col,',',2) will fetch after comma deleimter
....................... etc

Regards
BOSS :roll:




SujeethP wrote:Hi friends,

I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")

Please help me out
DS Info
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

While Index() may find it, you'll need to use Field() as noted to actually extract it. Easiest way, that is, not the only way of course.
-craig

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