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
zendo59
Participant
Posts: 6 Joined: Tue Feb 05, 2008 11:32 pm
Post
by zendo59 » Tue Mar 04, 2008 4:28 pm
In a Transformer stage
I have a field defined as Varchar (50) which contains values like
CBAIB\jon
CBAIB\fred
PBS\jon
XXXX\xxx
I need to strip off the \ and all characters preceding it so the output will look like
jon
fred
jon
xxx
Can someone point me in the right direction?
Thanks in advance.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Mar 04, 2008 4:40 pm
Is Field() available in PX? If so:
-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 » Tue Mar 04, 2008 5:32 pm
Yes, Field() is available in parallel Transformer expressions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Mar 04, 2008 5:34 pm
Yes, Field() is available in parallel Transformer expressions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zendo59
Participant
Posts: 6 Joined: Tue Feb 05, 2008 11:32 pm
Post
by zendo59 » Tue Mar 04, 2008 5:47 pm
Thanks guys. FIELD worked like a charm!
kduke
Charter Member
Posts: 5227 Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:
Post
by kduke » Tue Mar 04, 2008 10:36 pm
I think you want:
Field(YourColumn,"\",2,9999)
Mamu Kim
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Mar 05, 2008 8:18 am
Only if there are multiple delimiters in the string and you want all of the 'fields' after the first one. The assumption here was there were only two fields in the string, i.e. one delimiter.
-craig
"You can never have too many knives" -- Logan Nine Fingers