Hi,
we're getting this error:
when we tryed to get messages in group from a queue, some times we get our program stuck, even if we use "All messages available" and "logical order".
This is a segment of our code:
 
------------------------------------------------------------------------------------
CompCode = OpenCode;
md.Version = MQMD_VERSION_2;
gmo.Version = MQGMO_VERSION_2;
gmo.Options = MQGMO_WAIT           /* Espera para nuevos mensajes       */
                    + MQGMO_CONVERT
                    + MQGMO_LOGICAL_ORDER
                    + MQGMO_ALL_MSGS_AVAILABLE;
 
gmo.WaitInterval = -1;      /* Tiempo de espera para nuevos mensajes */
gmo.MatchOptions = MQGMO_NONE;
while (CompCode != MQCC_FAILED) {
     buflen = sizeof(buffer) - 1; /* buffer size available for GET   */
     memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId));
     memcpy(md.CorrelId, MQCI_NONE, sizeof(md.CorrelId));
     memcpy(md.GroupId, MQMI_NONE, sizeof(md.GroupId));
     md.Encoding       = MQENC_NATIVE;
     md.CodedCharSetId = MQCCSI_Q_MGR;
     MQGET(Hcon,                /* connection handle                 */
               Hobj,                /* object handle                     */
               &md,                 /* message descriptor                */
               &gmo,                /* get message options               */
               buflen,              /* buffer length                     */
               buffer,              /* message buffer                    */
               &messlen,            /* message length                    */
               &CompCode,           /* completion code                   */
               &Reason);            /* reason code                       */
 
     if (CompCode != MQCC_FAILED) {
         /*Some process*/
         if( gmo.GroupStatus == MQGS_NOT_IN_GROUP || gmo.GroupStatus ==   MQGS_LAST_MSG_IN_GROUP ) {
             /*Some process*/   
         }
     }
}
------------------------------------------------------------------------------------
 
Thanks and regards, 

Luis Garro Muñoz
Soluciones y Servicios
GBM de Costa Rica
e-mail: [EMAIL PROTECTED]
Tel:     2843999 ext 6216
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