ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Error 2110 when receiving message from Mainframe/CICS bridge

Post new topic  Reply to topic
 Error 2110 when receiving message from Mainframe/CICS bridge « View previous topic :: View next topic » 
Author Message
wfudeac92
PostPosted: Mon May 08, 2006 10:37 am    Post subject: Error 2110 when receiving message from Mainframe/CICS bridge Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Mon May 08, 2006 10:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Mon May 08, 2006 10:48 am    Post subject: Reply with quote

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
View user's profile Send private message
wfudeac92
PostPosted: Mon May 08, 2006 10:49 am    Post subject: Reply with quote

Novice

Joined: 24 Apr 2006
Posts: 21

I do not know. I will ask my mainframe developer.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon May 08, 2006 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
bob_buxton
PostPosted: Mon May 08, 2006 1:32 pm    Post subject: Re: Error 2110 when receiving message from Mainframe/CICS br Reply with quote

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
View user's profile Send private message
wfudeac92
PostPosted: Mon May 08, 2006 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Mon May 08, 2006 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Error 2110 when receiving message from Mainframe/CICS bridge
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.