Author |
Message
|
jbinnig |
Posted: Mon Mar 12, 2007 6:53 pm Post subject: C# API MQSeries |
|
|
Newbie
Joined: 12 Mar 2007 Posts: 4
|
doing a get against a Z/OS MQ Series.
Messages are put there by mainframe.
Windows C# gets.
I am getting error on ReadString.
UNSPECIFIED_INTERNAL_ERROR
Encoding is 546.
Character Ste is 437.
Format is MQSTR.
My Get options are:
Gmo.Options = MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_WAIT;
Gmo.MatchOptions = MQC.MQMO_MATCH_MSG_ID;
Gmo.WaitInterval = 15000; |
|
Back to top |
|
 |
jbinnig |
Posted: Mon Mar 12, 2007 6:54 pm Post subject: |
|
|
Newbie
Joined: 12 Mar 2007 Posts: 4
|
I tried get with Convert option and without Convert Option.
Same result. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Mon Mar 12, 2007 7:02 pm Post subject: Re: C# API MQSeries |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
jbinnig wrote: |
doing a get against a Z/OS MQ Series.
Messages are put there by mainframe.
Windows C# gets.
I am getting error on ReadString.
UNSPECIFIED_INTERNAL_ERROR
Encoding is 546.
Character Ste is 437.
Format is MQSTR.
My Get options are:
Gmo.Options = MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_WAIT;
Gmo.MatchOptions = MQC.MQMO_MATCH_MSG_ID;
Gmo.WaitInterval = 15000; |
I hope you have Client Attach Facility on z/OS or you are not going to get very far.
Are you connecting to to the z/OS queue manager or is the z/OS queue manger tranmiting the messages to a Windoze Qmgr? |
|
Back to top |
|
 |
jbinnig |
Posted: Mon Mar 12, 2007 7:16 pm Post subject: |
|
|
Newbie
Joined: 12 Mar 2007 Posts: 4
|
Queue is on mainframe.
I am able to put my own messages on the queue and get them and read them.
I am able to check the various properties on the queue and the message.
Just the msg.ReadString() method dies.
Here is the line that raises the MQException:
Logger.Log(MqsMsg.ReadString(MqsMsg.MessageLength));
Logger is part of our framework. String is the parameter. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 12, 2007 8:49 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
jbinnig wrote: |
Queue is on mainframe.
I am able to put my own messages on the queue and get them and read them.
I am able to check the various properties on the queue and the message.
Just the msg.ReadString() method dies.
Here is the line that raises the MQException:
Logger.Log(MqsMsg.ReadString(MqsMsg.MessageLength));
Logger is part of our framework. String is the parameter. |
Well, have you considered all the possibilities including a null value? _________________ MQ & Broker admin |
|
Back to top |
|
 |
jbinnig |
Posted: Tue Mar 13, 2007 4:46 am Post subject: |
|
|
Newbie
Joined: 12 Mar 2007 Posts: 4
|
The length of the message is 1285.
DataLength = 1285.
MessageLength= 1285.
TotalMessageLength = 1285.
Tring different encoding, I get back garbled characters.
byte[] msgbytes = new byte[MqsMsg.MessageLength];
MqsMsg.ReadFully(ref msgbytes);
MsgContents = enc.GetString(msgbytes); |
|
Back to top |
|
 |
|