Author |
Message
|
suneel |
Posted: Mon Dec 12, 2011 6:20 am Post subject: dis q(*) where( ?) |
|
|
Voyager
Joined: 06 Nov 2009 Posts: 89
|
Hi All,
I have a doubt i want to use CT CT | EX | LK | NL | CTG | EXG opeartors. But i am not finding way to use it. Please give example if u r aware.
Example which i know
dis q(*) where(CLUSTER EQ SAMCLUS) |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 12, 2011 6:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Code: |
dis ql(*) where(cluster lk 'SAM*') |
Or maybe it's not a *, maybe it's a &. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 6:24 am Post subject: Re: dis q(*) where( ?) |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
suneel wrote: |
I have a doubt i want to use CT CT | EX | LK | NL | CTG | EXG opeartors. But i am not finding way to use it |
This doesn't give those operators as supported. What's your doubt? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
suneel |
Posted: Mon Dec 12, 2011 6:26 am Post subject: |
|
|
Voyager
Joined: 06 Nov 2009 Posts: 89
|
@vitor.. How to use those operators in MQ while using conditions like where |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
suneel wrote: |
@vitor.. How to use those operators in MQ while using conditions like where |
Which part of "not given as supported" was unclear to you?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
suneel |
Posted: Mon Dec 12, 2011 6:30 am Post subject: |
|
|
Voyager
Joined: 06 Nov 2009 Posts: 89
|
i didn't get you.. you mean these are not supported? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 12, 2011 6:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
suneel wrote: |
@vitor.. How to use those operators in MQ while using conditions like where |
vitor's point is that of the list you provided, the only ones that actually are usable are the 'LK' and the 'NL' operators, there is no CT or EX or et cetera.
So you can find if something is LIKE or NOTLIKE, but you can't find if it CONTAINS or EXCLUDES or etc.
And the doc he posted confirms that it's * and not &. |
|
Back to top |
|
 |
suneel |
Posted: Mon Dec 12, 2011 6:37 am Post subject: |
|
|
Voyager
Joined: 06 Nov 2009 Posts: 89
|
Thank you ..
I was able to explore usage of WHERE operators like EQ,LK,NL,GT etc but I am stuck CT /EX. Went through MQ manuals. It says
Quote: |
For example, if the value DEF is specified with the operator CT, all items where one of
the attribute values is DEF are listed. If ABC* is specified, all items
where one of the attribute values begins with ABC are listed |
.
Can you give some examples of where using CT operator ?
Thanks in advance .. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 12, 2011 6:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
suneel wrote: |
Thank you ..
I was able to explore usage of WHERE operators like EQ,LK,NL,GT etc but I am stuck CT /EX. Went through MQ manuals. It says
Quote: |
For example, if the value DEF is specified with the operator CT, all items where one of
the attribute values is DEF are listed. If ABC* is specified, all items
where one of the attribute values begins with ABC are listed |
.
Can you give some examples of where using CT operator ?
Thanks in advance .. |
Okay.
So you can't use CT, EX, CTG and EXG with
.
You can use it with dis clusqmgr.
CT is 'contains'. it will match the exact and full string you provide against one of the items in the list that you ask it to match against. All of the CT, EX, CTG, EXG operators only work with list parameters.
So you can ask if the CLUSNL contains an item -
Code: |
dis clusqmgr(*) where(clusnl ct 'dave') |
.
But you can't ask if the CLUSTER contains an item, because it's a single value. You can ask if it EQ or LK an item. |
|
Back to top |
|
 |
|