Posted: Thu Dec 19, 2002 3:30 pm Post subject: Null Values in the Queue
Newbie
Joined: 19 Dec 2002 Posts: 1 Location: Comstock Park MI 49321
I am trying to get message from Input queue. The first field's length X(40) and contains value 'MSG INPUT' and the remaining positions filled with null values. The second field has x(6) a value 'FORMAT'. When I try to read this Queue, it only returns 'MSG INPUT' in the buffer. Its not reading the entire queue. Any suggestion how to read null values from the field1?
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
Well it depends on how you check the content of the buffer. If you simply print it out, then on most languages the null character means "end of string", so when you print you see the message up to the first null character. I would recommend you to check the entire content of the buffer (for example by debugging, or by printing each character individually), and I bet that the entire buffer was retrieved.
If it is not the case then you should check the buffer length passed when you call MQGET.
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