Rommel,
open the queue with MQOO_BROWSE and issue an MQGET with MQGMO_BROWSE, the
investigate the message descriptor or payload. Depending on the result, do a
destructive MQGET with the msgId returned from the browse (and be prepared
to handle the fact that the message might have been removed by another
application while you were checking for binary/ascii).
How would you test for binary/ASCII though?
The better approach would be for the sending application to
a) set MQFMT_NONE for binary messages and
b) MQFMT_STRING for text messages
and do the convert in any case (there will be no conversion for MQFMT_NONE,
so you're safe).
Or, since it looks like two completely different message formats to me, have
them put to two different queues, if you can.
HTH,
Stefan


From: Rommel Uy <[EMAIL PROTECTED]>
Reply-To: MQSeries List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Wed, 23 Jul 2003 16:05:16 -0700

Hello all,

Is there a way to determine if the message in a queue is ascii or binary
before you do an MQGET on it ? The reason is that if the message is ascii
then we would like to specify the MQGMO_CONVERT when we do the MQGET.

Thanks
Rommel

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to