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
 

 

MQ driver program

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

New User


Joined: 28 Jun 2010
Posts: 2
Location: kolkata

PostPosted: Tue Jun 29, 2010 3:33 pm    Post subject: MQ driver program
Reply with quote

I will be using a COBOL-MQSeries driver program. Is it necessary to populate the reply string in the driver program before invoking the function call? Is it okay to do the same in the called program?
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Jun 29, 2010 5:42 pm    Post subject:
Reply with quote

Quote:
Is it necessary to populate the reply string in the driver program before invoking the function call? Is it okay to do the same in the called program?


You haven't given enough information about what you're trying to achieve.

IF you're sending a reply, you would need to populate the reply message before issuing MQPUT/MQPUT1 - if you're not sending a reply, you have no need to do anything with a reply string.

What is the called program? What is its purpose? Is the driver sending the reply or is the called program?

Garry.
Back to top
View user's profile Send private message
shradhaz

New User


Joined: 28 Jun 2010
Posts: 2
Location: kolkata

PostPosted: Thu Jul 01, 2010 4:12 pm    Post subject: Reply to: MQ driver program
Reply with quote

The driver program is an existing program in which the commarea has been redefined by different copybooks. Each copybook is for a separate function call and contains a set of request and reply strings.
I have added a new function call and a new copybook. The norm followed in this program is that after MQGET, the reply string is populated with values from the request string.
MOVE MQMD-MSGID TO REQUEST-MQ-MSGID
MOVE MQMD-CORRELID TO REQUEST-MQ-CORRELID
MOVE MQMD-REPLYTOQ TO REQUEST-MQ-REPLYTOQ
MOVE MQMD-REPLYTOQMGR
TO REQUEST-MQ-REPLYTOQMGR
MOVE REQUEST-MQ-COMMAND
TO REPLY-MQ-COMMAND
MOVE REQUEST-MEMBER-ID
TO REPLY-MEMBER-ID
MOVE REQUEST-USER-ID
TO REPLY-USER-ID
.
.
.
What is the significance of the above MOVE statements? Is this necessary since I am populating the reply string in my caled program?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jul 01, 2010 4:40 pm    Post subject:
Reply with quote

Your terminology is incorrect.

The fields MQMD-*
Code:
 MQMD-MSGID TO REQUEST-MQ-MSGID
MOVE MQMD-CORRELID TO REQUEST-MQ-CORRELID
MOVE MQMD-REPLYTOQ TO REQUEST-MQ-REPLYTOQ
MOVE MQMD-REPLYTOQMGR
TO REQUEST-MQ-REPLYTOQMGR
relate to the MEssage Descriptor and are not part of the reply string, they are contained in the Message Descriptor. These fields are needed so that the reply message can be sent to, and identified by, the application that issued the request.


Code:
MOVE REQUEST-MQ-COMMAND
TO REPLY-MQ-COMMAND
MOVE REQUEST-MEMBER-ID
TO REPLY-MEMBER-ID
MOVE REQUEST-USER-ID
TO REPLY-USER-ID
look like they relate to the reply message and why they are being moved is entirely application dependent.

How and where you assign these fields is up to your application.

Garry.
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 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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