Working with WebSphere® MQ
You can access WebSphere® MQ queues on the z/OS® system where File Manager is running.
The WebSphere® MQ Managers panel shows a list of WebSphere® MQ queue managers and, for each one, whether File Manager is able to connect to the queue manager.
If File Manager cannot connect to a queue manager, the connection completion code and the MQ mnemonic for the reason code are displayed in the list.
- To display the attributes of a queue manager from the list of queue
managers displayed on the WebSphere® MQ
Managers panel, enter the I prefix command. File Manager
displays the Websphere MQ Manager Information panel.
For each attribute, you can obtain a description by placing the cursor on the field and pressing the Help function key (typically F1).
To change any attributes, enter the ALTER primary command (to enable each attribute for editing), type the new values and press the Exit function key (F3) to perform the changes (File Manager issues an ALTER QMGR command).
- To select a queue manager from the list of queue managers displayed on the WebSphere® MQ Managers panel, enter the S prefix command. File Manager displays the WebSphere® MQ Queue List panel showing a list of the queues for that queue
manager. By default, the queues are sorted by queue name.
The WebSphere® MQ Queue List panel shows the attributes for each queue in the displayed list. You can scroll right or left through the attributes for a queue as indicated by the arrows (⟶ and ◄).Note: For a description of these attributes, see
Administering MQ by using MQSC commands
in the IBM® MQ documentation.From the WebSphere® MQ Queue List panel, you can invoke various actions by typing one of these prefix commands against a listed queue:
- A
- To add a queue.
File Manager displays the Websphere MQ Queue Information panel with all blank fields allowing you to enter details for the new queue. When you press the Exit function key (F3), File Manager issues a DEFINE QLOCAL command with the attributes set as entered on the panel.
- D
- To delete the queue.
- E
- To edit the queue.
File Manager displays the Websphere MQ Queue Editor Entry from which you navigate to edit the queue.
Notes:- When editing a remote queue or an alias to a remote queue, message data is written to the associated transmission queue according to the remote queue definition.
- When editing a queue, File Manager first checks if the user has CONTROL access to the qmgr.CONTEXT.queue resource in the MQADMIN class. This check is performed when the File Manager session is started, consequently, the user must have authority to perform this check. When a message is updated, the MQ message context is preserved if the user has CONTROL access to the qmgr.CONTEXT.queue resource in the MQADMIN class. If not, the message context is replaced with a default message context in accordance with MQ normal operation.
- I
- To view information about the queue.
File Manager displays the Websphere MQ Queue Information panel. On this panel, you can change the attributes of the queue by entering the ALTER primary command (File Manager issues an ALTER QLOCAL command).
If you change the name of a queue, File Manager issues a DEFINE QUEUE command (rather than an ALTER command). This is a simple way of duplicating the attributes of a queue under a new name.
- R
- To discard (reset) all current messages on the queue (File Manager issues an EMPTY QLOCAL command).
- V
- Provided there are messages on the selected queue, File Manager
displays the WebSphere MQ Queue Editor Entry panel showing the names of the WebSphere® MQ queue and WebSphere® MQ manager already entered.
From this point, you can now start a View session (provided GET is enabled for the queue) to display the contents of the selected queue:
- To include message header information (the message descriptor), select (with the an "/") the Include descriptors option.
- To format the message (or header) contents, similar to a traditional File Manager view, specify a copybook or template in the Copybook or
Template entry fields.
To display both the message descriptor information and the message data in a formatted sense, use the segmented data option on the template.
Sample copybooks and templates are provided in the sample library (SFMNSAM1). The member FMNPMQMD is a PL/I copybook extracted from the Websphere MQ supplied copybook which describes common message header descriptions. This sample may be extended to include your application data layout definition by adding the appropriate PL/I statements, or a %INCLUDE statement.
Likewise, the member FMNCMQMD is a COBOL copybook which describes common message header descriptions.
The member FMNTPMQD is the template version of the PL/I copybook and the member FMNTCMQD is the template version of the COBOL copybook.
Both templates include the identification criteria used to identify each message header type as shown in Criteria for identifying message header types. These can be determined by inspecting the copybook.
Table 1. Criteria for identifying message header types Layout name PL/I template:
add this ID criteriaCOBOL template:
add this ID criteriaMQCIH #2== 'CIH '
#3== 'CIH '
MQDH #2== 'DH '
#3== 'DH '
MQDLH #2== 'DLH '
#3== 'DLH '
MQIIH #2== 'IIH '
#3== 'IIH '
MQMDE #2== 'MDE '
#3== 'MDE '
MQMD1 #2== 'MD '
& #3=1#3== 'MD '
& #4=1MQMD2 #2== 'MD '
& #3=2#3== 'MD '
& #4=2MQRFH1 #2== 'RFH '
& #3=1#3== 'RFH '
& #4=1MQRFH2 #2== 'RFH '
& #3=2#3== 'RFH '
& #4=2MQRMH #2== 'RMH '
#3== 'RMH '
MQTM #2== 'TM '
#3== 'TM '
MQTMC2 #2== 'TMC '
#3== 'TMC '
MQWIH #2== 'WIH '
#3== 'WIH '
MQXQH #2== 'XQH '
#3== 'XQH '
- Press Enter to view the contents of the queue as shown in Viewing the contents of a queue.
To view WebSphere® MQ queues, from the Websphere MQ Functions panel select option 2 View to display the Websphere MQ Queue Editor Entry panel.
To edit WebSphere® MQ queues, from the Websphere MQ Functions panel select option 3 Edit to display the Websphere MQ Queue Editor Entry panel.
For messages that are updated in the edit session, at save time (including the save and exit performed as a result of pressing the F3 function key) the original message is destructively read from the queue and the updated message PUT to the queue. Messages are read in physical order. This means that updated messages appear in a different physical order than when the queue was first read by the editor. Because the messages are loaded into virtual storage, for queues with a high depth, not all of the messages may be able to be loaded into storage. If this does not provide all of the messages that you are expecting, use a template to select the particular messages that you are interested in.
Related topics