Search

Friday, November 16, 2012

Delete Messages from Queue through JCL

Messages can be deleted from batch job

The below sample job deletes all the messages from a MQ. CSQUTIL is a utility program which enables to delete message from queue. Only the developer running this should have authority to access queue.

//EMPTY EXEC PGM=CSQUTIL,PARM='AB01'                    <---- Queue Manager
//STEPLIB DD DISP=SHR,DSN=MQM.SCSQANLE
//        DD DISP=SHR,DSN=MQM.SCSQAUTH
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EMPTY QUEUE(MQTEST_Q)
/

No comments:

Post a Comment