IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

MQ driver program


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jun 29, 2010 5:42 pm
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jul 01, 2010 4:40 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top