IBM MQ Q Utility - MQGem

Transcription

IBM MQ Q UtilityUser GuideVersion 9.2.01st December 2020Paul ClarkeMQGem Software Limitedsupport@mqgem.com

IBM MQ Q UtilityTake Note!Before using this User's Guide and the product it supports, be sure to read the general informationunder "Notices”Fifith Edition, December 2020This edition applies to Version 9.2.0 of the IBM MQ Q Utility and to all subsequent releases andmodifications until otherwise indicated in new editions.(c) Copyright MQGem Software Limited 2018, 2020. All rights reserved.ii

IBM MQ Q UtilityNoticesThe following paragraph does not apply in any country where such provisions are inconsistent withlocal law.MQGEM SOFTWARE LIMITED PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTYOF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.Some states do not allow disclaimer of express or implied warranties in certain transactions, thereforethis statement may not apply to you.The information contained in this document has not be submitted to any formal test and is distributedAS IS. The use of the information or the implementation of any of these techniques is a customerresponsibility and depends on the customer's ability to evaluate and integrate them into thecustomer's operational environment. While each item has been reviewed by MQGem Software foraccuracy in a specific situation, there is no guarantee that the same or similar results will be obtainedelsewhere. Customers attempting to adapt these techniques to their own environments do so at theirown risk.The following terms are trademarks of the International Business Machines Corporation in the UnitedStates and/or other countries:IBM MQIBMz/OSThe following terms are trademarks of the Microsoft Corporation in the United States and/or othercountries:Windows 95,98,MeWindows NT, 2000,XPiii

IBM MQ Q UtilityTable of ContentsNotices. iiiTable of Contents. ivHistory. viChapter 1. IBM MQ Q Utility. 11.1.Overview. 11.2.Changes from previous version. 11.3.Installation. 21.3.1.Unix Compatibility. 2Chapter 2. Licensing. 32.1.Userid and Machine Information. 42.2.Licence File Location. 42.3.Multiple licences. 42.4.Licence Renewal. 42.5.Changing your licence file. 4Chapter 3. Introduction. 53.1.Uses. 5Chapter 4. Examples. 64.1.Example 1. Write to a queue. 64.2.Example 2. Write to two queues. 64.3.Example 3. Write to a queue on a remote queue manager.64.4.Example 4. Read from a queue. 64.5.Example 5. Show Message Descriptor. 74.6.Example 7. Copy messages between queues.74.7.Example 6. Move messages between queues.74.8.Example 8. Subscribe to a topic. 74.9.Example 9. Make a durable subscription.74.10.Example 10. Publish on a topic. 7Chapter 5. Parameters. 85.1.How parameter flags work. 85.1.1.Top level flags. 85.1.2.Second level flags. 85.1.3.Second level flags with values.85.2.Parameters Flags. 95.3.Getting help from the command. 18Chapter 6. Connecting to the Queue Manager.196.1.Connecting as a client. 196.2.Passing in a Userid & Password on the connection.196.3.Explicitly provide all channel connection details.206.4.Transactions. 216.4.1.Transaction completion. 216.4.2.Transactions across Queue Managers.21Chapter 7. Using a queue. 227.1.Queue Name Format. 22Chapter 8. Publish/Subscribe. 238.1.Referencing your topic. 238.2.Publishing. 24iv

IBM MQ Q Utility8.3.Subscribing. 258.3.1.Creating a non-durable managed subscription.258.3.2.Creating a durable subscription. 258.3.3.Resuming, and deleting a previously created durable subscription.258.3.4.Using a non-managed subscription.258.3.5.Other subscription options. 26Chapter 9. Dealing with Messages. 279.1.Q message operation syntax. 279.1.1.Put Multiple messages. 279.1.2.Random sized messages. 279.1.3.Omit # instruction. 279.1.4.Random content. 289.1.5.Timing of messages. 289.1.6.Commit Interval. 289.2.Formatting Messages for display.309.2.1.Display Message Formats. 309.2.2.Entity Substitution. 319.3.Context Options. 319.4.Data Conversion. 339.5.Selection by SQL92 Selector. 349.6.Using Message Properties. 359.6.1.Displaying message properties. 359.6.2.Setting message properties. 369.7.Message Truncation. 379.7.1.Accept Truncation. 379.7.2.Fail on Truncation. 379.8.Check-summing messages. 379.9.Indexing messages. 389.10.Output from the Q program. 39Chapter 10. Triggering. 4010.1.Set up a trigger monitor. 4010.2.Describe the triggered application.4010.3.Trigger the Q program. 41Chapter 11. Time Reporting. 4211.1.Measuring puts. 4211.2.Measuring gets. 42Chapter 12. Environment variables.43Chapter 13. MQ Options. 4413.1.Connection Options. 4413.2.Open Options. 4513.3.Get Message Options. 4613.4.Put Message Options. 4713.5.Su

IBM MQ Q Utility Chapter 1. IBM MQ Q Utility 1.1. Overview The IBM MQ Q Utility (Q for short) is a veritable pocket knife of features, allowing many of the common tasks when interacting with messages on queues or topics, to be done from this single tool. Q is a simple pipe line program which takes messages from one source and outputs to a .