Author |
Message
|
wfudeac92 |
Posted: Mon May 08, 2006 10:37 am Post subject: Error 2110 when receiving message from Mainframe/CICS bridge |
|
|
Novice
Joined: 24 Apr 2006 Posts: 21
|
I am sending a message to a CICS bridge from a C# program. The CICS program receives the message correctly and then sends a response back to me. When I do a MQGET from my .NET assembly, I get a 2110 error. Here is a snippet of the function that is doing the get. Does anyone have any ideas on what I am doing wrong?
private string getMessage(string replyQueueManager, string replyQueueName)
{
MQQueueManager mqQManagerReply = null;
MQQueue mqQueueReply = null;
try
{
// Getting the Response
mqQManagerReply = new MQQueueManager(replyQueueManager, ConnectOptions);
mqQueueReply = mqQManagerReply.AccessQueue(replyQueueName,MQC.MQOO_INPUT_SHARED|MQC.MQOO_BROWSE);
MQGetMessageOptions mqGMO = new MQGetMessageOptions();
mqGMO.Version = MQC.MQGMO_VERSION_3;
mqGMO.MatchOptions = MQC.MQMO_MATCH_MSG_ID; //needs to revisit as Message ID is for MQMD only
mqGMO.Options = MQC.MQGMO_WAIT | MQC.MQGMO_NO_SYNCPOINT | MQC.MQGMO_CONVERT;
mqGMO.WaitInterval = Convert.ToInt32(waitInterval); // needs to get from Configuration
MQMessage mqMessageReply = new MQMessage();
mqMessageReply.MessageId = messageIDPut;
mqMessageReply.CharacterSet = int.Parse(charSet); string replyMessage = null;
while (true)
{
mqQueueReply.Get(mqMessageReply, mqGMO);
replyMessage += mqMessageReply.ReadString(mqMessageReply.DataLength);
string endIndicator = EbcdicToAscii(mqMessageReply.CorrelationId);
endIndicator = endIndicator.Substring(1,4);
if(endIndicator != "MORE" || (mqMessageReply.CompletionCode!= 0 & mqMessageReply.CompletionCode!= 1 & mqMessageReply.ReasonCode != 2080))
{
break;
}
}
if (mqQueueReply !=null && mqQueueReply.IsOpen)
mqQueueReply.Close();
if (mqQManagerReply !=null && mqQManagerReply.IsConnected)
mqQManagerReply.Disconnect();
return replyMessage; |
|
Back to top |
|
 |
wschutz |
Posted: Mon May 08, 2006 10:45 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Do you know if the CICS program is setting the mqmd.Format to "MQSTR"? _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 08, 2006 10:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
Do you know if the CICS program is setting the mqmd.Format to "MQSTR"? |
I hope it's setting it to "MQSTR<space>". Or really to MQFMT_STRING. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wfudeac92 |
Posted: Mon May 08, 2006 10:49 am Post subject: |
|
|
Novice
Joined: 24 Apr 2006 Posts: 21
|
I do not know. I will ask my mainframe developer. |
|
Back to top |
|
 |
wschutz |
Posted: Mon May 08, 2006 10:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
jefflowrey wrote: |
wschutz wrote: |
Do you know if the CICS program is setting the mqmd.Format to "MQSTR"? |
I hope it's setting it to "MQSTR<space>". Or really to MQFMT_STRING. |
or even..."MQSTR<space><space><space>"  _________________ -wayne |
|
Back to top |
|
 |
bob_buxton |
Posted: Mon May 08, 2006 1:32 pm Post subject: Re: Error 2110 when receiving message from Mainframe/CICS br |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
wfudeac92 wrote: |
I am sending a message to a CICS bridge from a C# program. The CICS program receives the message correctly and then sends a response back to me. When I do a MQGET from my .NET assembly, I get a 2110 error. |
Are you using the MQ-CICS bridge supplying an MQCIH on input (and expecting one on return)?
If so you need to specify the Convert=yes attribute on the channel definition for the channel from the mainframe to your box.
The reason is that the format conversion routines for the CIH only exist on the mainframe and a windows queue manager does not recognise the format. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
wfudeac92 |
Posted: Mon May 08, 2006 3:43 pm Post subject: |
|
|
Novice
Joined: 24 Apr 2006 Posts: 21
|
I am supplying an MQCIH on input and expecting one back. Our environment is a little different. We are not allowed to make client connections with the mainframe. We are forced to send the message through a UNIX server and then to the mainframe. When the CICS program returns the response is passed from the mainframe back through the UNIX box to our Windows server. |
|
Back to top |
|
 |
Nigelg |
Posted: Mon May 08, 2006 11:49 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
You cannot do an MQGET with CONVERT on a msg with Format MQCICS, you will get the 2110 (MQRC_FORMAT_ERROR) returned to the MQGET.
The MQCICS format is not recognised (for conversion) on distributed platforms, only on host systems. This is documented in the APR, Appendix D, Data Conversion. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
|