"like" in Stage Variables

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

Post Reply
ORACLE_1
Premium Member
Premium Member
Posts: 35
Joined: Mon Feb 16, 2009 1:19 pm

"like" in Stage Variables

Post by ORACLE_1 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

Or you can even use Count...
Arun
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Or Matches
You are the creator of your destiny - Swami Vivekananda
ORACLE_1
Premium Member
Premium Member
Posts: 35
Joined: Mon Feb 16, 2009 1:19 pm

Post by ORACLE_1 »

Thank You !!
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

"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
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ahhh... revisionist history is a wonderful thing. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

revisionist history
Did I forget to mention that the 'revisionist history' feature also gets a few bonus points ..
Post Reply