i know we can make use of the where filter to help get more specific result during running runmqsc. i have no problem with those operators like LT、GT、EQ、NE、LE and GE. However, as with LK、NL, it always failed. Please see the detail as below:
dis chl(SERVER.C01)
27 : dis chl(SERVER.C01)
AMQ8414: 显示通道细节。
CHANNEL(SERVER.C01) CHLTYPE(SVRCONN)
ALTDATE(2012-08-27) ALTTIME(16.05.40)
COMPHDR(NONE) COMPMSG(NONE)
DESCR( ) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(4194304)
MCAUSER( ) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)
dis chl(*) where(type lk SVRC*)
28 : dis chl(*) where(chltype lk SVRC*)
AMQ8569: 过滤器规范中的错误
dis chl(*) where(chltype lk SVRC*
AMQ8427: MQSC 命令的有效语法为:
DISPLAY display_cmd
WHERE( filter_keyword operator filter_value )
operator := [ LT | GT | EQ | NE | LE | GE | CT | EX | LK | NL | CTG | EXG ]
In addition, how about CT and EX? Please help me out
WebSphere MQ
7.0.1.9
Thanks
It is not clear whether you are having this problem with other object types but as for channels, filtering based on channel type is not allowed. This is probably because selection by type has always been supported anyway. Just specify
TYPEorCHLTYPEin the display command:The Infocenter page for
DISPLAY CHANNELstates:I’m not sure how you might use
TYPEorCHLTYPEother than to select channels and I’ve requested a clarification made to the page to explain that. In the meantime, be aware that selection onTYPEorCHLTYPEis not supported using theWHEREclause. Were there cases other than channels where you had trouble withLKandNK?UPDATE
Responding to the comment, two things to be aware of. First, as per the Infocenter, “You cannot use a generic filter-value for parameters with numeric values or with one of a set of values.” This means, for example, that it is invalid to specify
DIS CHL(*) WHERE(MCATYPE LK P*)becauseMCATYPEis specified by one of a set of values. It can be onlyPROCESSorTHREAD. Nor would it be valid to specifyDIS CHL(*) WHERE(LONGTMR LK 1*)becauseLONGTMRtakes a numeric value.The second item of interest is the syntax of the quoting in the
WHEREclause. Like allMQSCparameters, theWHEREclause folds unquoted values to UPPER CASE. Since WebSphere MQ evaluates these in case-sensitive fashion, something likeDIS Q(*) WHERE(DESCR LK W*)works because many of the queues have a description beginning withWebSphereand the upper caseWmatches. However,DIS Q(*) WHERE(DESCR LK We*)fails because the lower caseeis folded to upper case which then does not match the value in the description field. What does work here isDIS Q(*) WHERE(DESCR LK 'We*')where the string specifier is single-quoted.So the issues you are seeing may be due to use of the
LKoperator against a string value that is part of an enumeration, or possibly due to case sensitivity failing to match unquoted filter values.The
CTandCTGand their complements are the operators to use when the filter keyword is a list. For example, in theNAMELISTobject the attributeNAMEScontains a list of values. Something likeWHERE(NAMES LK SYS*)would be ambiguous becauseLKoperates on unary values. SoCTandCTGare provided as operators that work on sets. A couple of examples to demonstrate this syntax would then be:The first displays any
NAMELISTobjects where one of the entries in theNAMESattribute matches exactly. The second allows a similar match based on a generic string prefix. Be sure to quote if the expected value is in anything other than all UPPER CASE or if the value contains an embedded space.