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.
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
- On the COMMAND line, type LQ to display the LQ (local queues) view.
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 CSTHQPPIdentify 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 |
--------------------------------------------------------------------------------- To edit the message, perform the following steps:
- In the Message Length field, type a new value.
- If you are making the message longer, specify how to pad the field by entering a value in the Pad Character field.
- In the Destination Queue field, enter the name of an existing queue to which the message should be moved.
- 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.
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.
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 |
--------------------------------------------------------------------------------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.
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 |
--------------------------------------------------------------------------------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 |
--------------------------------------------------------------------------------- Update the parameters, as needed, and enter END to create the QMMU job.
Modify the job card, as needed, and use the edit create function to save the JCL in a PDS.
- After the AUDIT queue data is saved, add the DELETE option to the UNLOAD request.
(optional) To make the best use of AUDIT queue data, perform the following steps:
- Set up the UNLOAD job to run on a schedule.
- Make sure your BBIJRNL log is archived so that you can match changes to the AUDIT messages.