Asked By Ram Gollakota on 29-Jul-05 03:13 PM
I setup a MQ bridge to communicate from MSMQ to IBM MQ. When I send the test messages using MSMQSEND(Samples came with Windows Host Integration Server 3.0), the messages arrive from MSMQ to IBM MQ server sitting on Windows box via the bridge. 
The message is garbage when it's reached AS400. It looks to be the message is not transported with MQSTR format and getting messed up due to Uncode/EBCDIC ???

Is there a way you can specify the message format to be MQSTR on MSMQ side. Right the whole thing works, and it's just configuration. The only code is the sample from host integration server.

Any help is appreciated...


You have to find out what encoding "MQSTR" is - Asked By Peter Bromberg on 29-Jul-05 03:31 PM

If its either Unicode or EBCDIC, there are encodings for each and you can use the encoding classes to translate each message's encoding before sending.

P S - Example-- - Asked By Peter Bromberg on 29-Jul-05 03:44 PM

static string Convert( string inputString)
				Encoding cod=Encoding.GetEncoding(500);
				string asciiString = inputString;
				// Create two different encodings.
				Encoding ascii = Encoding.ASCII; 			
				byte[] ASCIIBytes = ascii.GetBytes(inputString);
				// Perform the conversion from one encoding to the other.			 
				byte[] EBCDIC = Encoding.Convert(ascii, cod, ASCIIBytes);    				 
				return  ascii.GetString(EBCDIC);

MSMQ - MQ Bridge - Asked By Ram Gollakota on 29-Jul-05 05:07 PM

I would expect MSMQ BRIDGE would do the conversion if required. The messages go fine from my AS400 MQ Server to Windows MSMQ server via the bridge without any issues. From AS400, I am using MQSTR as format, so it will be transmitted as string. MQ server sitting on my Windows box and MQ server on AS400 can talk to each other without any issues.

The issue is when MSMQ (sample program) puts the message, the message is getting corrupted. When the message reaches the Windows MQ server, there is no format associated with it and MQ is trying to interpret and do some translations and hence getting corrupted.

When I send a test message from my windows MQ server to AS400 MQ server, no issues as it's transmitted as MQSTR.
msmq - mq bridge - Asked By Paul Lay on 06-Jan-06 11:48 AM
64 bit client