Working with WebSphere® MQ

You can access WebSphere® MQ queues on the z/OS® system where File Manager is running.

From the Primary Option Menu panel, select option 9 WebSphere® MQ. File Manager displays the WebSphere MQ Functions panel:
  Process   Options   Help
 ──────────────────────────────────────────────────────────────────────────────
 File Manager                Websphere MQ Functions

 1  List          List Managers and queues.
 2  View          View a WMQ queue.
 3  Edit          Edit a WMQ queue.

⋮
To access WebSphere® MQ queues, from the WebSphere MQ Functions panel select option 1 List to display the Websphere MQ Managers panel.
  Process   Options   Help
 ──────────────────────────────────────────────────────────────────────────────
  File Manager               Websphere MQ Managers             Row 0001 of 0004

   SSID   ↓ Name     Active   Code     Reason
   <---+--> <---+--> <---+--> <---+--> <---+----10---+----2--->
   CSQ1     CSQ1MSTR Active          0 MQRC_NONE
   CSQ2     CSQ2MSTR Active          0 MQRC_NONE
   CSQ3     CSQ3MSTR Active          0 MQRC_NONE
   CSQ4     CSQ4MSTR Active          2 MQRC_Q_MGR_NOT_AVAILABLE
 ****  End of data  ****

⋮

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.

If the required WebSphere® MQ libraries are not available to File Manager, the queue managers are shown but the connection status shows "*NOLIB*".
  Process   Options   Help
 ──────────────────────────────────────────────────────────────────────────────
  File Manager               Websphere MQ Managers             Row 0001 of 0004

   SSID   ↓ Name     Active   Code     Reason
   <---+--> <---+--> <---+--> <---+--> <---+----10---+----2--->
   *NOLIB*

⋮
  • 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.
      Process   Options   Help
     ──────────────────────────────────────────────────────────────────────────────
      File Manager                Websphere MQ Queue List CSQ2     Row 0001 of 0109
    
       Queue                           ↓ Descr                                     ⟶
       <---+----10---+----2----+----3--> <---+----10---+----2----+----3----+----4->
       CICS01.INITQ                      CKTI initiation queue
       COOL                              Coolest queue ever
       CSQ1.XMIT.QUEUE                   Transmission queue for CSQ1
       CSQ2.DEAD.QUEUE                   CSQ2 dead-letter queue
       CSQ2.DEFXMIT.QUEUE                CSQ2 default transmission queue
       CSQ3.XMIT.QUEUE                   Transmission queue for CSQ3
       CSQ4IVPG.TRIGGER                  WebSphere MQ IVP INITIATION QUEUE
       CSQ4IVP1.TRIGGER                  WebSphere MQ IVP INITIATION QUEUE
       D3.CSQ2.ANYQ
       FMN.TEST.NOGET                    RFM0037 GET NOT ENABLED
    
    ⋮
    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:
    1. 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.
    2. 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:

    1. To include message header information (the message descriptor), select (with the an "/") the Include descriptors option.
    2. 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 Table 1. These can be determined by inspecting the copybook.

      Table 1. Criteria for identifying message header types
      Layout name

      PL/I template:
      add this ID criteria

      COBOL template:
      add this ID criteria

      MQCIH #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=1
      MQMD2 #2=='MD ' & #3=2 #3=='MD ' & #4=2
      MQRFH1 #2=='RFH ' & #3=1 #3=='RFH ' & #4=1
      MQRFH2 #2=='RFH ' & #3=2 #3=='RFH ' & #4=2
      MQRMH #2=='RMH ' #3=='RMH '
      MQTM #2=='TM ' #3=='TM '
      MQTMC2 #2=='TMC ' #3=='TMC '
      MQWIH #2=='WIH ' #3=='WIH '
      MQXQH #2=='XQH ' #3=='XQH '
    3. Press Enter to view the contents of the queue as shown in Figure 1.
      Figure 1. Viewing the contents of a queue
        Process   Options   Help
       ──────────────────────────────────────────────────────────────────────────────
       View             CSQ2:D3.CSQ2.ANYQ               +                Top of 12
              Col 1                                     Record AT TOP     Format CHAR
              ----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
       ****** ****  Top of data  ****
       000001 08062107301100001 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000002 08062107322900001 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000003 08062107342300001 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000004 08062107342300002 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000005 08062107342300003 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000006 08062107342300004 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000007 08062107342300005 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000008 08062107342300006 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000009 08062107342400007 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000010 08062107342400008 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000011 08062107342400009 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       000012 08062107342400010 THIS IS A MESSAGE TEXT          *0000051..*0000061..*0
       ****** ****  End of data  ****
      
      
       Command ===>                                                       Scroll PAGE
        F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
        F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

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.

Note: Editing a queue retrieves messages in browse mode into virtual storage for the edit session. In an edit session, you can perform deletes, updates and inserts. When editing a remote queue or an alias to a remote queue, message data can only be inserted.

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