Backount count not increasing in COBOL



Support for MQSeries and Websphere Message Oriented Middleware communication systems for z/OS

Backount count not increasing in COBOL

Postby pranav283 » Mon Jul 02, 2018 2:34 pm

Hi,

We are trying to implement 'CICS Asynchronous Message Consumption' that works on the MQ Pub/Sub model.
A part of the backout mechanism involves the consumer program reading the messages but not being able to consume the message (because of any technical/program/database failure or may be even because of unexpected data). So when such a situation arrives, the consume module treats this message as a 'poison message' and performs a SYNCPOINT ROLLBACK and thus incrementing the MQMD-BACKOUTCOUNT from 0 to 1.
Now when this message is again read by the consumer module written in COBOL, it checks if MQMD-BACKOUTCOUNT > 0 but this validation fails, thus avoiding the poison processing and results in endless loops.
What surprises me is that though the SYSVIEW is capturing the backount count of the message in the queue (goes till 255), but the program fails to do so and the same is always = 0 in the program.
FYI, every time that poison message is consumed, the task remains same as we have displayed it in the logs.

Please suggest me what should I do. Is it acceptable for the COBOL program to change/initialize the mqmq-backoutcount field as it is something that should be update from WMQ.

************************************************************
 C301-CHECK-ROLLBACK-MSG SECTION.                          
************************************************************
     IF MQMD-BACKOUTCOUNT > 0                           
* INCLUDE THE LOGIC HERE TO PUSH THE MESSAGE (THAT HAS BEEN
* ROLLED BACK ONCE) TO THE BO QUEUE SAMPLE.CONTROL.QUEUE.BO
        PERFORM C032-PROCESS-POISON-MESSAGE                
     ELSE                                                  
        IF MQMD-BACKOUTCOUNT = 0                            
           DISPLAY 'Rollback the message'                  
           EXEC CICS SYNCPOINT                              
           ROLLBACK                                        
           END-EXEC                                        
           DISPLAY 'AFTER EXEC CICS ROLLBACK'              
        END-IF                                              
     END-IF                                                
     .                                                      
 
pranav283
 
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Backount count not increasing in COBOL

Postby pranav283 » Fri Nov 30, 2018 11:51 am

Problem is resolved by correcting the code sequence.
Sorry for the late reply though.
pranav283
 
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Backount count not increasing in COBOL

Postby Terry Heinze » Fri Nov 30, 2018 10:08 pm

Better late than never!
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times


Return to WebSphere MQ

 


  • Related topics
    Replies
    Views
    Last post