ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » backout count for msgs increaseed w/o performing mq backout

Post new topic  Reply to topic
 backout count for msgs increaseed w/o performing mq backout « View previous topic :: View next topic » 
Author Message
avigosa
PostPosted: Thu Mar 27, 2003 6:45 pm    Post subject: backout count for msgs increaseed w/o performing mq backout Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 9
Location: Singapore

Hi there,

I have written a program in cobol on os390 which gets the message (syncpoint=yes) from the persistant queue. performs some action and commits or rollback depending on the return code.

if my program is crashed (system abend) before commit or rollback than I am facing following problem,

1) the message picked during the crash is lost ..its not in local queue or backout.???

qmgr syncpoint=yes
maxumsgs=10000

2) some of the msgs on the local queue have there backout count increased to 1. though these messages are not picked by the mqget call as there is no display of these msgs after mqget (i am displaying messages to sysout after get).

thanks....
_________________
contact admin
HCL Perot Systems Pte. Ltd.
Back to top
View user's profile Send private message MSN Messenger
bob_buxton
PostPosted: Fri Mar 28, 2003 1:34 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

1) If your application crashes before the commit/rollback then your message should be rolled back to the queue with an increased backout count unless your application or a debugger handles the abend and converts it into a normal program exit.

2) I am confused, how do you know the backout count on the message is increased if your program can't see the messages?
Backout count is not considered during MQGET processing so a non zero count would not prevent a get suceeding, so perhaps your application is checking for a non zero count before displaying the message contents.

Do you have an expiry time in you messages? Perhaps they are expiring before you can rerun your application after a failure.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
avigosa
PostPosted: Fri Mar 28, 2003 2:40 am    Post subject: Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 9
Location: Singapore

Hi thanks for taking interrest in my problem...

1) Here the message which is missing, is different from the one being refered on step 2. Total in all there were 3 msgs in the queue. during the first get(syncpoint=yes) job crashed and message was not reinstated into the local queue. The remaining two msgs backout count was increased to 1(though these messages were not picked by the mqget).

2) we came to know about the backout count of this message when second time we bought the job up these were the first message processed and moved to backout queue.

backout threshold id set to 1.
_________________
contact admin
HCL Perot Systems Pte. Ltd.
Back to top
View user's profile Send private message MSN Messenger
bduncan
PostPosted: Fri Mar 28, 2003 12:45 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

If I'm not mistaken, the message you say is "lost" won't be rolled back until the OPPROCs on the queue in question returns to zero (assuming your application was the only process with the queue open for GETs in the first place). So if for some reason the queue manager thinks your application is still connected, it won't perform the automatic rollback. Sometimes it takes a little while for the queue manager to realize that your application has died...
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
avigosa
PostPosted: Sun Mar 30, 2003 8:32 pm    Post subject: Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 9
Location: Singapore

In my scenario my application is with out RRS. In this case what i heard from IBM sing. that messages will not be reinstated into the local queue by the queue manager.

my os is : OS390, w/o RRS, MQget with syncpoint.
_________________
contact admin
HCL Perot Systems Pte. Ltd.
Back to top
View user's profile Send private message MSN Messenger
avigosa
PostPosted: Mon Mar 31, 2003 1:13 am    Post subject: Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 9
Location: Singapore

Hi bob,

I am pasting the code which I am using .

operating systerm is os/390. Its a TSO batch application in cobol with out RRS.


I am doing a mqget with syncpoint in the following piece of code. when the control goes to the 410-PROCESS-PARA. where I identify the type of message and based on the type I call another program to process and prepare the output(reply msg.) here I face a system abend. which is before mq commit and backout and the message goes missing after that..


Code:


    **********************************************************
      *    400-MQ-GET-MSGS  -PERFORMED FROM 100-MAIN-MODULE.   *
      *        RETRIEVES  MESSAGES FROM LOCAL QUEUE.           *
      **********************************************************
       400-MQ-GET-MSGS.
           MOVE MQM-MESSAGE-DESCRIPTOR-I
                        TO MQM-MESSAGE-DESCRIPTOR.
           MOVE MQM-GET-MESSAGE-OPTIONS-I
                        TO MQM-GET-MESSAGE-OPTIONS.
           INITIALIZE  MQ-QLHOBJ
                       MQ-ACTUAL-GET-LENGTH
                       MQ-COMPCODE
                       MQ-REASON.

           MOVE MQ-INPUT-QUEUE-HOBJ TO MQ-QLHOBJ.
           COMPUTE MQGMO-OPTIONS OF MQM-GET-MESSAGE-OPTIONS =
                               MQGMO-WAIT +
                               MQGMO-FAIL-IF-QUIESCING +
                               MQGMO-CONVERT +
                               MQGMO-SYNCPOINT.
           MOVE MQWI-UNLIMITED  TO MQGMO-WAITINTERVAL OF
                               MQM-GET-MESSAGE-OPTIONS.

           MOVE 'CSQBGET'     TO      WS-MQ-PROGRAM.
           CALL WS-MQ-PROGRAM USING  MQ-HCONN
                                 MQ-QLHOBJ
                                 MQMD OF MQM-MESSAGE-DESCRIPTOR
                                 MQGMO OF MQM-GET-MESSAGE-OPTIONS
                                 WS-MAX-MESSAGE-LENGTH
                                 WS-REQUEST-MESSAGE
                                 MQ-ACTUAL-GET-LENGTH
                                 MQ-COMPCODE
                                 MQ-REASON.

           EVALUATE MQ-REASON
           WHEN 0
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'REQUEST MSG READ AT : ', TEST-DATE
               MOVE MQ-ACTUAL-GET-LENGTH   TO WS-REQUEST-DATA-LENGTH
               MOVE FUNCTION UPPER-CASE(WS-REQUEST-MESSAGE) TO
                             WS-REQUEST-MESSAGE-U-CASE
               MOVE WS-REQUEST-MESSAGE-U-CASE TO WS-REQUEST-MESSAGE
               DISPLAY 'REQUEST-MESSAGE: ', WS-REQUEST-MESSAGE
               DISPLAY 'BACKOUT COUNT FOR MSG: '
               DISPLAY MQMD-BACKOUTCOUNT OF MQMD
                                    OF MQM-MESSAGE-DESCRIPTOR
               DISPLAY 'REQUEST MSG LENGTH: ',WS-REQUEST-DATA-LENGTH
               IF MQMD-BACKOUTCOUNT OF MQMD
                  OF MQM-MESSAGE-DESCRIPTOR >= MQ-BACKOUT-THRESHOLD
                  SET ERROR-IN-DATA TO TRUE
               END-IF
               IF WS-REQUEST-MESSAGE(1:8) = "TIME-OUT"
                   SET NO-MORE-MSGS TO TRUE
                   DISPLAY 'TIME-OUT MESSAGE RECEIVED'
                   DISPLAY 'APPLICATION JOB SHUTTING DOWN'
               ELSE
                   MOVE MQM-MESSAGE-DESCRIPTOR TO
                        MQM-MESSAGE-DESCRIPTOR-BACKOUT
                   MOVE MQMD-MSGID OF MQMD
                                     OF MQM-MESSAGE-DESCRIPTOR
                                       TO WS-MQ-MSGID
                   MOVE MQMD-CORRELID OF MQMD
                                     OF MQM-MESSAGE-DESCRIPTOR
                                       TO WS-MQ-CORRLID
                   MOVE MQMD-REPLYTOQ
                                OF MQMD OF MQM-MESSAGE-DESCRIPTOR
                                       TO WS-REPLY-QNAME

                   MOVE MQMD-REPLYTOQMGR
                                OF MQMD OF MQM-MESSAGE-DESCRIPTOR
                                       TO WS-REPLY-QMNAME
                   EVALUATE WS-REPLY-QMNAME(1:6)
                   WHEN 'RPSNT1'
                      MOVE 'AQ01' TO WS-QUEUE-TP-CD
                      MOVE 'OQ'   TO WS-QUEUE-DIRECTION
                   WHEN 'RPSNT2'
                      MOVE 'AQ02' TO WS-QUEUE-TP-CD
                      MOVE 'OQ'   TO WS-QUEUE-DIRECTION
                   WHEN 'RPSNT3'
                      MOVE 'AQ03' TO WS-QUEUE-TP-CD
                      MOVE 'OQ'   TO WS-QUEUE-DIRECTION
                   WHEN 'RPSNT4'
                      MOVE 'AQ04' TO WS-QUEUE-TP-CD
                      MOVE 'OQ'   TO WS-QUEUE-DIRECTION
                   WHEN OTHER
                      MOVE 'XXXX' TO WS-QUEUE-TP-CD
                   END-EVALUATE
                   DISPLAY 'REPLY TO QUEUE: ', WS-REPLY-QNAME
               END-IF
           WHEN OTHER
               MOVE 'RCRPAPP'         TO LK-ERR-PROGRAM OF
                                         LK-ERROR-DETAILS
               MOVE '400-MQ-GET-MSGS' TO LK-ERR-LOC OF
                                         LK-ERROR-DETAILS
               MOVE MQ-BASE-QUEUE     TO LK-Q-NAME
               MOVE MQ-QM-NAME        TO LK-QM-NAME
               MOVE 'CSQBGET'         TO LK-MQ-CALL OF
                                         LK-MQ-ERROR-DETAILS
               MOVE MQ-COMPCODE       TO LK-MQ-CC OF
                                         LK-MQ-ERROR-DETAILS
               MOVE MQ-REASON         TO LK-MQ-RC OF
                                         LK-MQ-ERROR-DETAILS
               MOVE '8888'            TO LK-RESPONSE-CODE
               SET LK-MQ-ERROR        TO TRUE
               PERFORM 990-MQ-BACKOUT THRU 990-EXIT
               PERFORM 999-ABNORMAL-EXIT
           END-EVALUATE.
           BIND RUN-UNIT ON ANY-ERROR-STATUS
            MOVE '9999'        TO LK-RESPONSE-CODE
            MOVE 'BIND RUN UNIT FAILED,ERROR-STATUS IS : ' TO WS-MSG1
            MOVE ERROR-STATUS TO WS-MSG2
            MOVE WS-MSG TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
            MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                  LK-ERROR-DETAILS
            MOVE '400-MQ-GET-MSGS' TO LK-ERR-LOC OF
                                   LK-ERROR-DETAILS
            PERFORM 990-MQ-BACKOUT THRU 990-EXIT
            PERFORM 999-ABNORMAL-EXIT.
           IF NOT NO-MORE-MSGS
             PERFORM 410-PROCESS-PARA THRU 410-EXIT
              UNTIL WS-RETRY-FLAG = 'NO'
           END-IF.
           MOVE 'YES' TO WS-RETRY-FLAG.
           MOVE 1 TO WS-RETRY-COUNT.
       400-EXIT.
           EXIT.



Process para

Code:

    ***********************************************************
      *  410-PROCESS-PARA  - PERFORMED FROM 400-MQ-GET-MSGS     *
      *        EVALUATES THE MESSAGE TYPE AND THEN CALL         *
      *        CORRESPONDING IDMS ROUTINE TO PROCESS THE MESSAGE*
      ***********************************************************
       410-PROCESS-PARA.
           IF ERROR-IN-DATA
            DISPLAY 'PERFORMING BACKOUT PROCESS'
            MOVE 'NO' TO WS-BACKOUT-FLAG
            MOVE MQ-BACKOUT-QUEUE TO WS-REPLY-QNAME
            DISPLAY 'BACKOUT QUEUE : ', WS-REPLY-QNAME
            PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
            PERFORM 414-MQ-PUT-MSGS-BACKOUT THRU 414-EXIT
            PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
            MOVE 'NO' TO WS-RETRY-FLAG
            FINISH
           ELSE
            MOVE WS-REQUEST-MESSAGE(1:8) TO WS-MESSAGE-NAME
            DISPLAY 'MESSAGE TYPE :', WS-MESSAGE-NAME
            EVALUATE WS-MESSAGE-NAME
            WHEN 'RPSAP01 '
               MOVE 'RCRPFMD'       TO WS-IDMS-PROGRAM
               DISPLAY 'CALLING: ', WS-IDMS-PROGRAM
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'CALLING IDMS PGM AT : ', TEST-DATE
               CALL WS-IDMS-PROGRAM USING WS-MESSAGE-DETAILS
                                          SUBSCHEMA-CTRL
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'AFTER CALLING IDMS PGM : ', TEST-DATE
               DISPLAY 'RETURNING FROM : ', WS-IDMS-PROGRAM
               DISPLAY 'REPLY MESSAGE : ', WS-REPLY-MESSAGE
               DISPLAY 'REPLY DATA LENGTH : ',WS-REPLY-DATA-LENGTH
               DISPLAY 'ERROR-STATUS RETURNED FROM IDMS ROUTINE',
                  ERROR-STATUS
               IF WS-REPLY-MESSAGE(21:2) = '90'
                IF ERROR-STATUS(3:2) = '29' OR '69'
                  BIND RUN-UNIT
                  DISPLAY ' RETURN CODE = 90'
                  ADD 1 TO WS-RETRY-COUNT
                  DISPLAY 'IDMS ROLLBACK, RETRY-COUNT',WS-RETRY-COUNT
                ELSE
                  MOVE '9999'        TO LK-RESPONSE-CODE
                  MOVE 'RETURN CODE IS 90, ABNORMAL EXIT' TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
                  MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                        LK-ERROR-DETAILS
                  MOVE '410-PROCESS-PARA' TO LK-ERR-LOC OF
                                        LK-ERROR-DETAILS
                  PERFORM 990-MQ-BACKOUT THRU 990-EXIT
                  PERFORM 999-ABNORMAL-EXIT
                END-IF
               ELSE
                IF WS-REPLY-MESSAGE(21:2) NOT = '00'
                 ROLLBACK
                 DISPLAY 'NON ZERO RC FROM IDMS ROUTINE'
                 BIND RUN-UNIT
                END-IF
               END-IF
               IF (WS-REPLY-MESSAGE(21:2) NOT = '90') OR
                    WS-RETRY-COUNT > 2
                DISPLAY 'PROCESSING RESPONSE'
                FINISH
                SET INQUIRY TO TRUE
                PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
                PERFORM 413-MQ-PUT-MSGS THRU 413-EXIT
                PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
                MOVE 'NO' TO WS-RETRY-FLAG
               END-IF
            WHEN 'RPSAP02 '
               MOVE 'RCRPBCF '       TO WS-IDMS-PROGRAM
               PERFORM 420-UPDATE-2-PHASE-COMMIT
            WHEN 'RPSAP03 '
               MOVE 'RCRPFHD'       TO WS-IDMS-PROGRAM
               DISPLAY 'CALLING: ', WS-IDMS-PROGRAM
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'CALLING IDMS PGM AT : ', TEST-DATE
               CALL WS-IDMS-PROGRAM USING WS-MESSAGE-DETAILS
                                          SUBSCHEMA-CTRL
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'AFTER CALLING IDMS PGM : ', TEST-DATE
               DISPLAY 'RETURNING FROM : ', WS-IDMS-PROGRAM
               DISPLAY 'REPLY MESSAGE : ', WS-REPLY-MESSAGE
               DISPLAY 'REPLY DATA LENGTH : ',WS-REPLY-DATA-LENGTH
               DISPLAY 'ERROR-STATUS RETURNED FROM IDMS ROUTINE',
                  ERROR-STATUS
               IF WS-REPLY-MESSAGE(21:2) = '90'
                IF ERROR-STATUS(3:2) = '29' OR '69'
                  BIND RUN-UNIT
                  DISPLAY ' RETURN CODE = 90'
                  ADD 1 TO WS-RETRY-COUNT
                  DISPLAY 'IDMS ROLLBACK, RETRY-COUNT',WS-RETRY-COUNT
                ELSE
                  MOVE '9999'        TO LK-RESPONSE-CODE
                  MOVE 'RETURN CODE IS 90, ABNORMAL EXIT' TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
                  MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                        LK-ERROR-DETAILS
                  MOVE '410-PROCESS-PARA' TO LK-ERR-LOC OF
                                        LK-ERROR-DETAILS
                  PERFORM 990-MQ-BACKOUT THRU 990-EXIT
                  PERFORM 999-ABNORMAL-EXIT
                END-IF
               ELSE
                IF WS-REPLY-MESSAGE(21:2) NOT = '00'
                 ROLLBACK
                 DISPLAY 'NON ZERO RC FROM IDMS ROUTINE'
                 BIND RUN-UNIT
                END-IF
               END-IF
               IF (WS-REPLY-MESSAGE(21:2) NOT = '90') OR
                    WS-RETRY-COUNT > 2
                DISPLAY 'PROCESSING RESPONSE'
                FINISH
                SET INQUIRY TO TRUE
                PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
                PERFORM 413-MQ-PUT-MSGS THRU 413-EXIT
                PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
                MOVE 'NO' TO WS-RETRY-FLAG
               END-IF
            WHEN 'RPSAP04 '
               MOVE 'RCRPMHD '       TO WS-IDMS-PROGRAM
               PERFORM 420-UPDATE-2-PHASE-COMMIT
            WHEN 'RPSAP05 '
               MOVE 'RCRPCHA '       TO WS-IDMS-PROGRAM
               PERFORM 420-UPDATE-2-PHASE-COMMIT
            WHEN 'RPSAP06 '
               MOVE 'RCRPCIE '       TO WS-IDMS-PROGRAM
               PERFORM 420-UPDATE-2-PHASE-COMMIT
            WHEN 'RPSAP07 '
               MOVE 'RCRPVMB'       TO WS-IDMS-PROGRAM
               DISPLAY 'CALLING RCRPVMB'
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'CALLING IDMS PGM AT : ', TEST-DATE
               CALL WS-IDMS-PROGRAM USING WS-MESSAGE-DETAILS
                                          SUBSCHEMA-CTRL
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'AFTER CALLING IDMS PGM : ', TEST-DATE
               DISPLAY 'RETURNING FROM : ', WS-IDMS-PROGRAM
               DISPLAY 'REPLY MESSAGE : ', WS-REPLY-MESSAGE
               DISPLAY 'REPLY DATA LENGTH : ',WS-REPLY-DATA-LENGTH
               DISPLAY 'ERROR-STATUS RETURNED FROM IDMS ROUTINE',
                  ERROR-STATUS
               IF WS-REPLY-MESSAGE(21:2) = '90'
                IF ERROR-STATUS(3:2) = '29' OR '69'
                  BIND RUN-UNIT
                  DISPLAY ' RETURN CODE = 90'
                  ADD 1 TO WS-RETRY-COUNT
                  DISPLAY 'IDMS ROLLBACK, RETRY-COUNT',WS-RETRY-COUNT
                ELSE
                  MOVE '9999'        TO LK-RESPONSE-CODE
                  MOVE 'RETURN CODE IS 90, ABNORMAL EXIT' TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
                  MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                        LK-ERROR-DETAILS
                  MOVE '410-PROCESS-PARA' TO LK-ERR-LOC OF
                                        LK-ERROR-DETAILS
                  PERFORM 990-MQ-BACKOUT THRU 990-EXIT
                  PERFORM 999-ABNORMAL-EXIT
                END-IF
               ELSE
                IF WS-REPLY-MESSAGE(21:2) NOT = '00'
                 ROLLBACK
                 DISPLAY 'IDMS ROUTINE RETURNED 99'
                 BIND RUN-UNIT
                END-IF
               END-IF
               IF (WS-REPLY-MESSAGE(21:2) NOT= '90') OR
                    WS-RETRY-COUNT > 2
                DISPLAY 'PROCESSING RESPONSE'
                FINISH
                SET INQUIRY TO TRUE
                PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
                PERFORM 413-MQ-PUT-MSGS THRU 413-EXIT
                PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
                MOVE 'NO' TO WS-RETRY-FLAG
               END-IF
            WHEN 'RPSAP08 '
               MOVE 'RCRPLBS'       TO WS-IDMS-PROGRAM
               DISPLAY 'CALLING RCRPLBS'
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'CALLING IDMS PGM AT : ', TEST-DATE
               CALL WS-IDMS-PROGRAM USING WS-MESSAGE-DETAILS
                                          SUBSCHEMA-CTRL
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'AFTER CALLING IDMS PGM : ', TEST-DATE
               DISPLAY 'RETURNING FROM : ', WS-IDMS-PROGRAM
               DISPLAY 'REPLY MESSAGE : ', WS-REPLY-MESSAGE
               DISPLAY 'REPLY DATA LENGTH : ',WS-REPLY-DATA-LENGTH
               DISPLAY 'ERROR-STATUS RETURNED FROM IDMS ROUTINE',
                  ERROR-STATUS
               IF WS-REPLY-MESSAGE(21:2) = '90'
                IF ERROR-STATUS(3:2) = '29' OR '69'
                  BIND RUN-UNIT
                  DISPLAY ' RETURN CODE = 90'
                  ADD 1 TO WS-RETRY-COUNT
                  DISPLAY 'IDMS ROLLBACK, RETRY-COUNT',WS-RETRY-COUNT
                ELSE
                  MOVE '9999'        TO LK-RESPONSE-CODE
                  MOVE 'RETURN CODE IS 90, ABNORMAL EXIT' TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
                  MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                        LK-ERROR-DETAILS
                  MOVE '410-PROCESS-PARA' TO LK-ERR-LOC OF
                                        LK-ERROR-DETAILS
                  PERFORM 990-MQ-BACKOUT THRU 990-EXIT
                  PERFORM 999-ABNORMAL-EXIT
                END-IF
               ELSE
                IF WS-REPLY-MESSAGE(21:2) NOT = '00'
                 ROLLBACK
                 DISPLAY 'IDMS ROUTINE RETURNED 99'
                 BIND RUN-UNIT
                END-IF
               END-IF
               IF (WS-REPLY-MESSAGE(21:2) NOT = '90') OR
                    WS-RETRY-COUNT > 2
                DISPLAY 'PROCESSING RESPONSE'
                FINISH
                SET INQUIRY TO TRUE
                PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
                PERFORM 413-MQ-PUT-MSGS THRU 413-EXIT
                PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
                MOVE 'NO' TO WS-RETRY-FLAG
               END-IF
            WHEN 'RPSAP09 '
               MOVE 'RCRPHWA'       TO WS-IDMS-PROGRAM
               DISPLAY 'CALLING RCRPHWA'
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'CALLING IDMS PGM AT : ', TEST-DATE
               CALL WS-IDMS-PROGRAM USING WS-MESSAGE-DETAILS
                                          SUBSCHEMA-CTRL
               MOVE FUNCTION CURRENT-DATE TO TEST-DATE
               DISPLAY 'AFTER CALLING IDMS PGM : ', TEST-DATE
               DISPLAY 'RETURNING FROM : ', WS-IDMS-PROGRAM
               DISPLAY 'REPLY MESSAGE : ', WS-REPLY-MESSAGE
               DISPLAY 'REPLY DATA LENGTH : ',WS-REPLY-DATA-LENGTH
               DISPLAY 'ERROR-STATUS RETURNED FROM IDMS ROUTINE',
                  ERROR-STATUS
               IF WS-REPLY-MESSAGE(21:2) = '90'
                IF ERROR-STATUS(3:2) = '29' OR '69'
                  BIND RUN-UNIT
                  DISPLAY ' RETURN CODE = 90'
                  ADD 1 TO WS-RETRY-COUNT
                  DISPLAY 'IDMS ROLLBACK, RETRY-COUNT',WS-RETRY-COUNT
                ELSE
                  MOVE '9999'        TO LK-RESPONSE-CODE
                  MOVE 'RETURN CODE IS 90, ABNORMAL EXIT' TO
                  LK-ERROR-MESSAGE OF LK-USER-ERROR-DETAILS
                  MOVE 'RCRPAPP'        TO LK-ERR-PROGRAM OF
                                        LK-ERROR-DETAILS
                  MOVE '410-PROCESS-PARA' TO LK-ERR-LOC OF
                                        LK-ERROR-DETAILS
                  PERFORM 990-MQ-BACKOUT THRU 990-EXIT
                  PERFORM 999-ABNORMAL-EXIT
                END-IF
               ELSE
                IF WS-REPLY-MESSAGE(21:2) NOT = '00'
                 ROLLBACK
                 DISPLAY 'IDMS ROUTINE RETURNED 99'
                 BIND RUN-UNIT
                END-IF
               END-IF
               IF (WS-REPLY-MESSAGE(21:2) NOT = '90') OR
                    WS-RETRY-COUNT > 2
                DISPLAY 'PROCESSING RESPONSE'
                FINISH
                SET INQUIRY TO TRUE
                PERFORM 411-OPEN-RESPONSE-QUEUE-PARA THRU 411-EXIT
                PERFORM 413-MQ-PUT-MSGS THRU 413-EXIT
                PERFORM 500-MQ-COMMIT-PARA  THRU 500-EXIT
                MOVE 'NO' TO WS-RETRY-FLAG
               END-IF
            WHEN OTHER
              DISPLAY 'ERROR MESSAGE RECEIVED: ', WS-MESSAGE-NAME
              MOVE 'NO' TO WS-RETRY-FLAG
              FINISH
            END-EVALUATE
           END-IF.
       410-EXIT.
           EXIT.



_________________
contact admin
HCL Perot Systems Pte. Ltd.
Back to top
View user's profile Send private message MSN Messenger
bob_buxton
PostPosted: Mon Mar 31, 2003 5:21 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

I am still confused!
I don't see anything obviously wrong in your code, messages should be rolled back after an abend.

Quote:
1) Here the message which is missing, is different from the one being refered on step 2. Total in all there were 3 msgs in the queue. during the first get(syncpoint=yes) job crashed and message was not reinstated into the local queue. The remaining two msgs backout count was increased to 1(though these messages were not picked by the mqget).

2) we came to know about the backout count of this message when second time we bought the job up these were the first message processed and moved to backout queue.


You say the abend ocurred when processing the first message.
In that case you wouldn't have issued the MQGET for the other messages and so they would not have needed to be backed out and the backout count should still be zero. Only the first message should have been reinstated with a count of one.

In your program I don't see the Error-in-data flag being turned off after a successful read and I don't see any Display in the reason code not zero path to help diagnose any get failures.

Perhaps you could post the actual output from the two runs of your program.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » backout count for msgs increaseed w/o performing mq backout
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.