Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Read the queue till end of Queue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Wed Jul 09, 2008 2:07 pm    Post subject: Read the queue till end of Queue
Reply with quote

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
View user's profile Send private message

Ashok Mohan

New User


Joined: 09 Sep 2008
Posts: 5
Location: US

PostPosted: Wed Sep 10, 2008 9:42 am    Post subject:
Reply with quote

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
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Wed Sep 10, 2008 2:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 2 Tue May 09, 2017 6:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us