Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
ORACLE_1
Premium Member
Posts: 35 Joined: Mon Feb 16, 2009 1:19 pm
Post
by ORACLE_1 » Tue Aug 17, 2010 9:45 am
Hey Guys ,
I want to compare the incoming data to a specified value , something like this -
input like '%XYZ%' or input like '%ABC%'
in the stage variable and assign it a value if it matches , if not then assign it another value. I am not sure which function I can use to accomplish this , please help !
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Aug 17, 2010 9:47 am
Index()
-craig
"You can never have too many knives" -- Logan Nine Fingers
arunkumarmm
Participant
Posts: 246 Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:
Post
by arunkumarmm » Tue Aug 17, 2010 9:55 am
Or you can even use Count...
Arun
anbu
Premium Member
Posts: 596 Joined: Sat Feb 18, 2006 2:25 am
Location: india
Post
by anbu » Tue Aug 17, 2010 9:58 am
Or Matches
You are the creator of your destiny - Swami Vivekananda
ORACLE_1
Premium Member
Posts: 35 Joined: Mon Feb 16, 2009 1:19 pm
Post
by ORACLE_1 » Tue Aug 17, 2010 10:20 am
Thank You !!
kumar_s
Charter Member
Posts: 5245 Joined: Thu Jun 16, 2005 11:00 pm
Post
by kumar_s » Tue Aug 17, 2010 11:11 am
anbu wrote: Or Matches
Matches at Version 7?!
Anyway the topic is resolved
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Aug 17, 2010 12:33 pm
"Matches" has been there basically forever, I do believe.
Last edited by
chulett on Tue Aug 17, 2010 4:22 pm, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Posts: 609 Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN
Post
by rameshrr3 » Tue Aug 17, 2010 3:10 pm
input like '%XYZ%' or input like '%ABC%'
you may try
Code: Select all
input Matches "...XYZ...":@VM:"...ABC..."
to match multiple wildcard patterns
Also
Matches is an Expression , not a BASIC Function , and hence havent heard of Matches() ( in v7 or later
)..
But I Wish something similar would exist in DS Parallel Xtender ..
Last edited by
rameshrr3 on Tue Aug 17, 2010 6:13 pm, edited 1 time in total.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Aug 17, 2010 4:23 pm
Ahhh... revisionist history is a wonderful thing.
-craig
"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Posts: 609 Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN
Post
by rameshrr3 » Tue Aug 17, 2010 6:16 pm
revisionist history
Did I forget to mention that the 'revisionist history' feature also gets a few bonus points ..