Chapter 4 Find
Find.
This section will describe how to use the Find feature. The Find function allows the user to search the messages of the queue for a particular text string.
Purpose
Use the Find command to search (grep) a queue for a text string.
Syntax
{mqbt or mqbt.sh} Find -a Path_and_FileName_for_CommProfileDB -p Profile_Name -q Queue_Name -t Text_String [-s Start_Position] [-c Message_Count] [-X] [-I]
Function Name:
Find
Required Parameters:
-a The full path and filename for a CommProfileDB.properties file.
-p The name of a profile contained in the CommProfileDB.properties file.
-q The name of the queue (Note: Queue names are case sensitive.)
-t Text string to be searched for.
Optional Parameters:
-s Start position when getting messages from the queue. The default is 1.
-c Number of messages to be read from the queue. The default is all messages.
-I Perform case insensitive search.
-X Find messages that do NOT match the text string.
Example 1
Search a queue of a queue manager for a text string.
Windows
mqbt Find -a c:\CommProfileDB.properties -p MQA1 -t "test"
Unix
./mqbt.sh Find -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -t "test"
Example 2
Search a queue of a queue manager starting at message number 50 for messages without a text string.
Windows
mqbt Find -a c:\CommProfileDB.properties -p MQA1 -s 50 -t "test" -X
Unix
./mqbt.sh Find -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -s 50 -t "test" -X
|