|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Junk characters From the queue |
« View previous topic :: View next topic » |
Author |
Message
|
mastanr |
Posted: Fri Jul 22, 2005 12:57 pm Post subject: Junk characters From the queue |
|
|
Novice
Joined: 21 Jul 2005 Posts: 10
|
Hello:
I wrote Java MQ client program, all it does is put a message and the Cics program on mainframes picks the message and replies to reply queue. MQ is on host. Our problem here is, cics program is getting the data from the queue which is prefixed with 72 junk characters to my message. For example if I PUT "Hello", cics is reading something like "..@..^.....Hello".
Am I using wrong format? Below is my Message code.
-------------------------
MQMessage outMsg = new MQMessage();
outMsg.format = MQC.MQFMT_STRING ;
outMsg.messageFlags = MQC.MQMT_REQUEST ;
outMsg.replyToQueueName = replyToQueue;
outMsg.replyToQueueManagerName = replyToQueueManager ;
String msgString = "DSIMK66017360040S";
outMsg.writeString(msgString);
------------------------
Any help is appreciated. Thanks. |
|
Back to top |
|
 |
hopsala |
Posted: Sat Jul 23, 2005 1:32 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Ah, this is a toughy, and a strange one at that... MQ does not tend to mess with the data, and surely does not *add* characters to it.
From the fact these are always 72 characters and not some changing number, I gather these are either added to your string or that you're reading the wrong string, i.e:
1. For some reason the ppl on the MF side begin to read the data 72 chars too early, possibly using the wrong structure to interpret MQMD. They simply read the wrong memory address.
2. If on either side you have some wrapper code over the native API, possibly it adds this mysterious extra string. Or maybe it is what causes reason 1 I just specified.
3. A data conversion exit on the MF side, either one someone in our site has written or automatic (since you're using MQFMT_STRING an automatic conv is done if you choose to convert).
To aid you on the way to victory, try the following:
1. Do not assume these are "junk" chars - Is it always the same 72 characters? If so, what are they? take these chars, put them in an editor and try to see in different charsets what they mean.
2. Try sending to yourself - send to a local queue and read it from there. Try reading with java code and if possible, take the code from the MF, put it on the pc and read.
3. Upon sending, look at the msg at the XMITQ (stop the chl so it will not run off), then at the LQ on the MF side (stop the appl so it doesn't read it) and see if all is ok.
4. If someone else sends them data, does this happen? (do you have other progs sending the MF appl msgs?)
I think all this will give you a good idea on which side the problem lies. I would wager upon some non-native code adding the str.
Good luck!
(hopsala is not a name, it's a soliloquy) |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sat Jul 23, 2005 8:17 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|