Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Ops Monitor for MQ 5.6.

Editing messages on a queue


You can use the EDit line command on the LQM view to edit, move, or copy individual messages on a queue.

This section provides sample scenarios for:

  • Using the EDit command to change the length of a message and move that message to a different queue.
  • Using the JOB command to offload the AUDIT queue (replyprefix.AUDIT.qmgr), which provides a record of message changes.

Note

The EDit command is very powerful; ensure that your security for this command is set appropriately.

You must ensure that an AUDIT queue is defined; otherwise, the EDit command will fail.

GUID-47E5A770-A760-442A-9F5A-06872981813D-low.png

For more information, view the Quick Course MainView for MQ - Using the New Message Edit and Job Actions.

To edit a message and move it to another queue

  1. On the COMMAND line, type LQ to display the LQ (local queues) view.
  2. Identify the queue whose messages you want to edit, place your cursor in the Cur Depth field, and press Enter.The LQM view is displayed.

    ddmmyyyy hh:mm:ss -------- MainView WINDOW INTERFACE(Vv.r.mm)------------------
    COMMAND  ===>                                                  SCROLL ===> PAGE
    CURR WIN ===> 1        ALT WIN ===>                                            
    >W1 =LQM===============BCL4=======*========ddmmyyy==hh:mm:ss====MVMQS====D===13
    -  JSC.QUEUE
    CMD Put Date  Put Time                        Message Queuing   Queuing
    ---   (GMT)     (GMT)     Format Type     Pri    Size Appl Type Application
        23JUN2014 15:25:08.98 MQSTR  Datagram   0      99 Z/OS      CSTHQPP
        23JUN2014 15:25:08.98 MQSTR  Datagram   0      99 Z/OS      CSTHQPP
        23JUN2014 15:25:08.98 MQSTR  Datagram   0      99 Z/OS      CSTHQPP
        23JUN2014 15:25:08.98 MQSTR  Datagram   0      99 Z/OS      CSTHQPP
        23JUN2014 15:25:08.98 MQSTR  Datagram   0      99 Z/OS      CSTHQPP
  3. Identify the message that you want to edit and enter ED in the line command field.The Edit Message Controller dialog is displayed. At this point, the message is locked and no one else can read it.

     --------------------------- Edit Message Controller ----------------------------
     | COMMAND ===>                                                SCROLL ===> PAGE |
     |                                                                              |
     |  Queue JSC.QUEUE                                            Qmgr GRT4        |
     |                                                                              |
     |  Message Status: Message Locked                                              |
     |  Message Token:  04CD936E566FE4475A800A0100000000                            |
     |  Message Length: 900     (Overtype to change Length)                         |
     |  Pad Character:  20      (Hex 00-FF)                                         |
     |                                                                              |
     |  Edit Message Header Yes                                                     |
     |  Edit Message Text   Yes                                                     |
     | MOVE and COPY only                                                           |
     |  Destination Queue GRT.SHRQ                                                  |
     |                                                                              |
     | EDIT to edit requested message components                                    |
     | COPY to copy the message to the destination queue                            |
     | MOVE to move the message to the destination queue                            |
     | CANCEL to exit without processing                                            |
     | END to exit without processing                                               |
     | Help to view related help                                                    |
     --------------------------------------------------------------------------------
  4. To edit the message, perform the following steps:
    1. In the Message Length field, type a new value.
    2. If you are making the message longer, specify how to pad the field by entering a value in the Pad Character field.
  5. In the Destination Queue field, enter the name of an existing queue to which the message should be moved.
  6. On the COMMAND line, enter MOVE.The message is displayed in edit mode. At this point, you can edit the message header and message text.
  7. Enter SAVE to save your message header and message text changes, or CANCEL to cancel them.The Edit Message Descriptor dialog is displayed, which gives you an opportunity to change the message descriptor.

    Warning

    Use extreme caution when changing a message descriptor. Even if the data you enter passes the validity check, changes can make a message unusable.

  8. Enter END to save your message descriptor changes and continue, or CANcel to continue without processing the changes.The Edit Message Confirmation dialog is displayed.

     ------------------------- Edit Message Confirmation ----------------------------
     | COMMAND ===>                                                SCROLL ===> PAGE |
     |                                                                              |
     |  Queue GRT.SHRQ                                             Qmgr GRT4        |
     |                                                                              |
     |  Token:  04CD936E566FE4475A800A0100000000                                    |
     |                                                                              |
     |  Message Header: Updated                                                     |
     |  Message Text:   Updated                                                     |
     |                                                                              |
     | SAVE to commit your change                                                   |
     | CANcel to backout your change                                                |
     | END to to redisplay this panel                                               |
     | Help to view related help                                                    |
     --------------------------------------------------------------------------------
  9. Enter SAVE to commit your changes and move the message to the specified queue.When you use the EDit command, MainView for MQ records what actions were taken by writing:

    • A description of the action and the message ID to the BBIJRNL log
    • The before and after image of the message to the AUDIT queue (replyprefix.AUDIT.qmgr)

    BMC recommends that you offload the AUDIT queue to preserve a record of message changes.

To offload the AUDIT queue of message changes

You can use the JOB command on the LQ view to create a message management (QMM) or CSQUTIL job that offloads the AUDIT queue at regular intervals.

  1. In the LQ view, enter JOB in the line command field next to the AUDIT queue.The Build Batch Job Menu is displayed.

     ---------------------------- Build Batch Job Menu ------------------------------
     | COMMAND ===>                                                SCROLL ===> PAGE |
     |                                                                              |
     |  Queue Manager Name: GRT4                                                    |
     |  Queue Name:         BBSMVMQS.AUDIT.GRT4                                     |
     |                                                                              |
     |  Enter Choice:    1. Unload to a file (CSQUTIL)                              |
     |                   2. Unload to a file with options (QMM)                     |
     |                   3. Load from a file (CSQUTIL)                              |
     |                   4. Load from a file with options (QMM)                     |
     |                   5. Dead letter queue handler                               |
     |                   6. Move messages                                           |
     |                   7. Display messages or queues                              |
     |                                                                              |
     | Next to add parameters for job                                               |
     | CANcel to not build a job                                                    |
     | Help to view related help                                                    |
     --------------------------------------------------------------------------------
  2. Select option 2, Unload to a file with options (QMM).The QMMU Job Parameter Entry dialog is displayed.

     ------------------------- QMMU Job Parameter Entry -----------------------------
     | COMMAND ===>                                                SCROLL ===> PAGE |
     |                                                                              |
     |  Queue Manager Name: GRT4                                                    |
     |  Queue Name:         BBSMVMQS.AUDIT.GRT4                                     |
     |                                                                              |
     |  Unload Queue to Dataset: BTSBJW.GRT4.UQ.BBSMVMQS.AUDIT.GRT4                 |
     |  Message Limit:           NOLIMIT                                            |
     |  Message Length:                                                             |
     |                                                                              |
     |  Suffix to Read :                                                            |
     |  Suffix to Write:         00                                                 |
     |  Syntax Check Only:       N                                                  |
     |                                                                              |
     | Format Dataset                                                               |
     |  BB Format: BB.XTST9.BBFORMAT                                                |
     |                                                                              |
     | Steplibs (IBM MQ Libs)                                                       |
     |  Steplib 1: CSGI.MQS710.SCSQAUTH                                             |
     |  Steplib 2: CSGI.MQS710.SCSQANLE                                             |
     |                                                                              |
     | BMC Link Library                                                             |
     |  Steplib:   BB.XTST9.BBLINK                                                  |
     |                                                                              |
     | Next to add parameters for job                                               |
     | CANcel to not build a job                                                    |
     | Help to view related help                                                    |
     --------------------------------------------------------------------------------
  3. Update the parameters, as needed, and enter END to create the QMMU job.
  4. Modify the job card, as needed, and use the edit create function to save the JCL in a PDS.

    Note

    Consider making the AUDIT data set a generation data group (GDG) or a date-delimited file.

  5. After the AUDIT queue data is saved, add the DELETE option to the UNLOAD request.
  6. (optional) To make the best use of AUDIT queue data, perform the following steps:

    1. Set up the UNLOAD job to run on a schedule.
    2. Make sure your BBIJRNL log is archived so that you can match changes to the AUDIT messages.

    Note

    To reload the AUDIT queue data, you can use the LOAD option of the JOB command.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*