MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MQ-GET

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
Koppuramesh
Beginner


Joined: 31 Dec 2002
Posts: 9
Topics: 5

PostPosted: Wed Sep 24, 2003 8:59 am    Post subject: MQ-GET Reply with quote

Hi,

There are some records(messages) sitting in local MQ.
I need to extract those records from a "local" MQ into a copy book and execute a start to a CICS program passing data to programs.

What MQ functions i need to perform to do a GET? and What all the exceptions that i need to handle? can some one throw light on this.

Thanks.
Back to top
View user's profile Send private message  
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Wed Sep 24, 2003 10:28 am    Post subject: Reply with quote

This is not a easy one to explain, but there are excellent reference manuals on the reference page.
Code:

1. Connect to the Q
CALL 'MQCONN' USING WS-QMGR-NAME
                    WS-QHCONN   
                    WS-QCOMPCODE
                    WS-QREASON 
 2. Open the Q
CALL 'MQOPEN'      USING WS-QHCONN   
                         MQOD       
                         WS-Q-OPT   
                         WS-QHOBJ   
                         WS-QCOMPCODE
                         WS-QREASON 

3. Get from the Q (this is where we loop to get all the messages)
CALL 'MQGET' USING WS-QHCONN           
                   WS-QHOBJ           
                   MQMD               
                   MQGMO               
                   WS-QUEUE-DATA-LENGTH
                   WS-QUEUE-DATA-AREA 

4. Close the Q
CALL 'MQCLOSE'        USING WS-QHCONN   
                            WS-QHOBJ   
                            WS-Q-OPT   
                            WS-QCOMPCODE
                            WS-QREASON 

5. Disconnect from the Q
CALL 'MQDISC' USING WS-QHCONN   
                    WS-QCOMPCODE
                    WS-QREASON 

IBM has provided good 'Stub' programs in the SAMPLIB, even their manuals have sample code (Cobol) how to perform different tasks. Hope it helps
Back to top
View user's profile Send private message  
Koppuramesh
Beginner


Joined: 31 Dec 2002
Posts: 9
Topics: 5

PostPosted: Thu Sep 25, 2003 5:41 pm    Post subject: Reply with quote

Thank you Suresh.
Back to top
View user's profile Send private message  
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group