View previous topic :: View next topic
|
Author |
Message |
rohanatl
New User
Joined: 21 Oct 2005 Posts: 22
|
|
|
|
HI I am new to Mq Series.
Right now I have a requirement in which i need to read the message from the MQ and need to write to a File.
My questioin is Is how to read the queue until end of Queue.
DO i need to give the Call to get the msg in a til end of queue
and to check the end of queue
Thanks
Rohan |
|
Back to top |
|
|
Ashok Mohan
New User
Joined: 09 Sep 2008 Posts: 5 Location: US
|
|
|
|
In the MF system that I am currently we use a MQ tool (Q to file) which drains all msg's and writes it to a file.
MQS2FILE - is the common program that is provided by MQ team to drain msg's and put msg's.
Ashok Mohan. |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
You can try this.
Perform MQGET until MQRC-NO-MSG-AVAILABLE is returned.
Code: |
CALL 'MQGET' USING W03-HCONN,
W03-HOBJ-INPUT-INIT,
MQM-MESSAGE-DESCRIPTOR,
MQM-GET-MESSAGE-OPTIONS,
BUFFER-LENGTH,
TEMP-INIT-MSG,
W03-DATA-LENGTH,
W03-COMPCODE,
W03-REASON.
MOVE W03-REASON TO WW-MQ-REASON
IF W03-REASON IS EQUAL TO MQRC-NO-MSG-AVAILABLE
MOVE 'Y' TO EOQ-REACHED
GO TO F02-EXIT
END-IF.
|
|
|
Back to top |
|
|
|