How to Splite String 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
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

How to Splite String in PX

Post by swades »

Hello All,
can somebody tell me that How to splite string in PX job?
as i know that substring function in server job,but what about PX?
Ex. input - ABCDEF
output - ABCD and EF

Thanks.
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 »

You can use In.String[1,4] for ABCD and In.String[5,2] for EF.
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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Which btw, is also the same as server.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

DSguru2B wrote:Which btw, is also the same as server.
what btw?
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

I_Server_Whale wrote:You can use In.String[1,4] for ABCD and In.String[5,2] for EF.
where i found this function?
reply me thanks.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

its not a function. just put square brackets" [x,y]" where x is the start point and y is the length.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

DSguru2B wrote:its not a function. just put square brackets" [x,y]" where x is the start point and y is the length.
Actually I tried both way,using Left and Right String Function and also by your methods ,so both working fine.

Thanks.Issue solve.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

swades wrote:
DSguru2B wrote:Which btw, is also the same as server.
what btw?
btw means "by the way"
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Thanks Ken :wink: .
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply