Author |
Message
|
Sudheer88 |
Posted: Thu Aug 08, 2002 9:42 am Post subject: Getting back MQ messages when System abend occurs |
|
|
Newbie
Joined: 08 Aug 2002 Posts: 8
|
Hi Guys,
I really appreicate if any one can giude me how to proceed in this matter.
If program fails with system abend after processing 5 messages, I am not getting them back even after no code or no MQ commands are executed.
How to get MQ messages back if System abend occurs in between a UOW.
Thanks
S88 :o |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 08, 2002 10:09 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Sudheer,
If I understand your question correctly .. you have processed 5 messages from the input queue. During the processing of 6th message your program abends and you are expecting all 6 messages to be put back on the queue??
You could group your input messages into one logical group and process them in single UOW. Please refer to MQSeries Application Programming Guide manual (chapter 10) for more information on how to process grouped messages. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
bob_buxton |
Posted: Fri Aug 09, 2002 1:32 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
Are you getting the messages in syncpoint?
If you get in syncpoint and then abend MQ will automatically roll back all messages gotten since the last syncpoint.
If you get out of syncpoint you are telling MQ that you don't want the message rolled back in case of failure.
You do not need to use message grouping to use syncpoints.
Bob _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
kolban |
Posted: Fri Aug 09, 2002 5:20 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
I am going to make a wild guess here ... I am thinking your messages are flagged as "non-persistent". These messages, by definition, are not preserved after a queue manager restart. In fact, it is guaranteed that if the queue manager is restarted, the messages will be deleted. If you want messages to be retained through a queue manager (or system) restart, then flag the messages are persistent. This is a flag in the MQMD set on each message put to the queue. Persistent messages are always logged to disk while non-persistent messages can be held in memory and hence evaporate when the queue manager goes down. |
|
Back to top |
|
 |
Sudheer88 |
Posted: Fri Aug 09, 2002 10:16 am Post subject: |
|
|
Newbie
Joined: 08 Aug 2002 Posts: 8
|
Thanks a lot guys for all the replies.
Sorry for not making my question clear to you.
Here is the senerio.
I have 20 Persistance messages in my INPUT queue.
Everytime I need to process only 10 messages.
I have used Syncpoint option in my MQGET call.
MQCONN
MQOPEN
---------------------------------UOW Start-----------
Loop till msg count = 10
MQGET with Syncpoint ....
Bussiness logic
Loop-End
--------------------------------- UOW end-----------
If Syncpoint
MQCMIT
Else
MQBACK
End-if.
MQCLSOE
MQDISC
After processing 5 messages, I got a system abend and program just blowed without excuting a single line of code in UOW.
So it should backout all the 5 messages as it is not executing MQCMIT or MQDISC calls.
But it is not doing that. I am loosing those 5 messages.
Please let me know any Queue parameters I need to set to work with Syncpoint ............ or ....
Thanks |
|
Back to top |
|
 |
tjfunny1 |
Posted: Fri Aug 09, 2002 11:41 am Post subject: From the Admin side |
|
|
 Apprentice
Joined: 17 Jun 2002 Posts: 35 Location: Atlanta
|
Just to clear things up here. The programmer is causing the abend with a divide/zero after the 5th mqget. We wanted to simulate a application crash. This abend could happen because of running out of disk space or even program logic (bad data).
The point is, the manual states if an MQSeries application end abnormally, it will rollback all messages within the UOW. This isn't working.
Another issue is MQSeries server must be seeing the disconnect. The IPPROCS = 0 and OPPROCS = 0. So, somehow MQ ends the session. _________________ TJ
IBM Certified System Administrator Websphere MQ v5.3 |
|
Back to top |
|
 |
kolban |
Posted: Fri Aug 09, 2002 4:50 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
That should do it. If you perform an MQGET with SYNCPOINT and the application ends abnormally without performing an MQDISC or MQCMIT then the messages will be returned to the queue. Any possibility you could post the code of the application or otherwise make it available for us to examine? What platform are you running on? |
|
Back to top |
|
 |
tjfunny1 |
Posted: Fri Aug 09, 2002 4:53 pm Post subject: |
|
|
 Apprentice
Joined: 17 Jun 2002 Posts: 35 Location: Atlanta
|
OS/390 MQ v5.2
I'll post the code on Monday _________________ TJ
IBM Certified System Administrator Websphere MQ v5.3 |
|
Back to top |
|
 |
oz1ccg |
Posted: Sun Aug 11, 2002 2:13 pm Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Well, if that's the case, make shure that your program is abending otherwise MQSeries, DB2 etc. will get committed.
This is not a genious setup, but anyhow you should take a look on CEExOPT (Language environment) parameters, there are a couple there are specifying how LE and RTM should terminate an bad program. That program should be abended.
If the program "just" terminates with a high return code, RTM say: It's 10-4 rubber duck, just complete it all, and commit the work. I've been there myself, 2-3 years ago, and today it works without any problems.
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
tjfunny1 |
Posted: Sun Aug 11, 2002 2:41 pm Post subject: |
|
|
 Apprentice
Joined: 17 Jun 2002 Posts: 35 Location: Atlanta
|
It abends with SB37 _________________ TJ
IBM Certified System Administrator Websphere MQ v5.3 |
|
Back to top |
|
 |
oz1ccg |
Posted: Mon Aug 12, 2002 12:25 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Yes, but how is your CEEDOPT set ?
How is TRAP= set ?
How is ABTERMENC= set ?
These two options can influence in way RTM handles abnormal task termination.
I know that the following have been a default previous, but as IBM says, it's changed:
ABTERMENC=((RETCODE),OVR)
Quote: |
Specifies that the enclave terminates with a normal return code and reason code. |
Now is the IBM-Supplied Default: ABTERMENC=((ABEND),OVR)
Quote: |
Specifies that Language Environment issues an abend to end the enclave regardless of the setting of the CEEAUE_ABND flag by the assembler user exit. |
And you haven't establish a ESPIE or and ESTAE error handling routine, which may get in control and do something foolish.
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
bob_buxton |
Posted: Mon Aug 12, 2002 12:56 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
tjfunny1 wrote: |
It abends with SB37 |
A B37 abend is a disk space problem and not a divide by zero, possibly not enough space for your dump.
As has already been suggested check the LE options to ensure that LE hasn't recovered from the divide abend. Also make sure there isn't a silly bug like setting one set of GMO options but specifying a different GMO on the MQGET call.
Bob _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
tjfunny1 |
Posted: Mon Aug 12, 2002 3:49 am Post subject: Abend = S0CB |
|
|
 Apprentice
Joined: 17 Jun 2002 Posts: 35 Location: Atlanta
|
I had the wrong abend code, it was a S0CB. The other was from another developer that had the same issue (but they forced the error trying to write a large block to a small file).
I'll have to check on the rest. _________________ TJ
IBM Certified System Administrator Websphere MQ v5.3 |
|
Back to top |
|
 |
tjfunny1 |
Posted: Mon Aug 12, 2002 10:05 am Post subject: code |
|
|
 Apprentice
Joined: 17 Jun 2002 Posts: 35 Location: Atlanta
|
below is the cobol source. There is a divide/zero to cause abend S0CB, line: 20810-20830
NOTE: 8 ) converts to emoticon.
Quote: |
000300* ------------------------------------------------------------- *
000400 IDENTIFICATION DIVISION.
000500* ------------------------------------------------------------- *
000600 PROGRAM-ID. MQGETWRT.
000700*REMARKS
000800*****************************************************************
001800* MODULE NAME : MQGETWRT *
001900* *
002000* Environment : MVS Batch; COBOL II *
002100* *
002200* Description : Sample program to get a number of messages *
002300* FROM A QUEUE AND WRITE INTO A DATASET *
002400* *
002500* Notes : The maximum message length is 65536. Messages *
002600* greater than this will not cause an error but *
002700* will be truncated. *
002800* The syncpoint option is ignored when browsing. *
002900* *
009700*****************************************************************
009800* ------------------------------------------------------------- *
009900 ENVIRONMENT DIVISION.
009910 CONFIGURATION SECTION.
009920 SOURCE-COMPUTER. IBM-370.
009930 OBJECT-COMPUTER. IBM-370.
009940
009950 INPUT-OUTPUT SECTION.
009960 FILE-CONTROL.
009970
010000 SELECT OUTPUT-FILE
010100 ASSIGN TO MQDATAO.
010110
010120* ------------------------------------------------------------- *
010200 DATA DIVISION.
010300* ------------------------------------------------------------- *
010400 FILE SECTION.
010500* ------------------------------------------------------------- *
010530 FD OUTPUT-FILE
010540 LABEL RECORDS ARE STANDARD
010550 RECORD CONTAINS 13296 CHARACTERS
010560 DATA RECORD IS MQDATAO-REC.
010570
010571 01 MQDATAO-REC PIC X(13296).
010580
010590* ------------------------------------------------------------- *
010600 WORKING-STORAGE SECTION.
010700* ------------------------------------------------------------- *
010800*
010810* COPY-BOOKS
010820 COPY WA999950.
010830 COPY WD999950.
010840 COPY WWG99650.
010850 COPY WW999850.
010860*
010870 01 WS-MQDATAO-REC PIC X(13296).
010880*
010900* W00 - General work fields
011000*
011100 01 W00-RETURN-CODE PIC S9(4) BINARY VALUE ZERO.
011200 01 W00-LOOP PIC S9(9) BINARY VALUE 0.
011300 01 W00-NUMGETS PIC S9(9) BINARY VALUE 0.
011400 01 W00-ERROR-MESSAGE PIC X(4 VALUE SPACES.
011500 01 W00-MSGBUFFER.
011600 02 W00-MSGBUFFER-ARRAY PIC X(1) OCCURS 65536 TIMES.
011700 01 W00-MSGLENGTH PIC S9(9) BINARY VALUE 65536.
011800 01 W00-DATALENGTH PIC S9(9) BINARY VALUE 0.
011900*
012000* Parameter variables
012100*
012200 01 W00-QMGR PIC X(4 .
012300 01 W00-QNAME PIC X(4 .
012400 01 W00-NUMMSGS-NUM PIC 9(4) VALUE 0.
012500 01 W00-NUMMSGS PIC S9(9) BINARY VALUE 1.
012600 01 W00-BROWSE-GET PIC X(1) VALUE 'D'.
012700 88 BROWSE-GET VALUE 'B'.
012800 88 DESTRUCTIVE-GET VALUE 'D'.
012900 01 W00-SYNCPOINT PIC X(1) VALUE ' '.
013000 88 SYNCPOINT VALUE 'S'.
013100 88 NO-SYNCPOINT VALUE 'N'.
013101
013102 01 W01-PARMS.
013110 05 W01-QMGR PIC X(4 VALUE 'CSQ1'.
013120 05 W01-QNAME PIC X(4 VALUE 'GADV.TEST.C.ACTUPD.Q'.
013130 05 W01-NUMMSGS-NUM PIC 9(4) VALUE 0.
013140 05 W01-NUMMSGS PIC S9(9) BINARY VALUE 1.
013151 05 W01-BROWSE-GET PIC X(1) VALUE 'D'.
013160 88 BROWSE-GET1 VALUE 'B'.
013170 88 DESTRUCTIV1-GET VALUE 'D'.
013180 05 W01-SYNCPOINT PIC X(1) VALUE 'S'.
013190 88 SYNCPOINT1 VALUE 'S'.
013191 88 NO-SYNCPOINT1 VALUE 'N'.
013200*
013300* W03 - API fields
013400*
013500 01 W03-HCONN PIC S9(9) BINARY VALUE 0.
013600 01 W03-HOBJ PIC S9(9) BINARY VALUE 0.
013700 01 W03-OPENOPTIONS PIC S9(9) BINARY.
013800 01 W03-COMPCODE PIC S9(9) BINARY.
013900 01 W03-REASON PIC S9(9) BINARY.
001000 01 WTT-TEST PIC 9(3) VALUE 0.
013910 01 WTT1-TEST PIC 9(3) VALUE 0.
014000*
014100* API control blocks
014200*
014300 01 MQM-OBJECT-DESCRIPTOR.
014400 COPY CMQODV.
014500 01 MQM-MESSAGE-DESCRIPTOR.
014600 COPY CMQMDV.
014700 01 MQM-GET-MESSAGE-OPTIONS.
014800 COPY CMQGMOV.
014900*
015000* MQV contains constants (for filling in the control blocks)
015100* and return codes (for testing the result of a call)
015200*
015300 01 MQM-CONSTANTS.
015400 COPY CMQV SUPPRESS.
015500*
015600*
015700* ------------------------------------------------------------- *
015800 LINKAGE SECTION.
015900* ------------------------------------------------------------- *
016000 01 PARMDATA.
016100 05 PARM-LEN PIC S9(03) BINARY.
016200 05 PARM-STRING PIC X(100).
016300*
016400 EJECT
016500* ------------------------------------------------------------- *
016600 PROCEDURE DIVISION USING PARMDATA.
016700* ------------------------------------------------------------- *
016800* ------------------------------------------------------------- *
016900 A-MAIN SECTION.
017000* ------------------------------------------------------------- *
017100*
017200* If no parameters passed to program then display
017300* error message and exit
017400 MOVE LENGTH OF W01-PARMS TO PARM-LEN
017410
017500 IF PARM-LEN = 0 THEN
017600 PERFORM USAGE-ERROR
017700 MOVE 8 TO W00-RETURN-CODE
017800 GO TO A-MAIN-END
017900 END-IF.
018000*
018100* Move parameters into corresponding variables
018200*
018210 OPEN OUTPUT OUTPUT-FILE.
018220
018300 UNSTRING PARM-STRING DELIMITED BY ALL ','
018400 INTO W00-QMGR
018500 W00-QNAME
018600 W00-NUMMSGS-NUM
018700 W00-BROWSE-GET
018800 W00-SYNCPOINT.
018900 MOVE W00-NUMMSGS-NUM TO W00-NUMMSGS.
018910
018911 MOVE W01-QMGR TO W00-QMGR
018912 MOVE W01-QNAME TO W00-QNAME
018913 MOVE W01-NUMMSGS-NUM TO W00-NUMMSGS-NUM
018920 MOVE W01-BROWSE-GET TO W00-BROWSE-GET
018930 MOVE W01-SYNCPOINT TO W00-SYNCPOINT.
019000*
019100* Display parameters to be used in the program
019200*
019300 DISPLAY '==========================================='.
019400 DISPLAY 'PARAMETERS PASSED :'.
019500 DISPLAY ' QMGR - ', W00-QMGR.
019600 DISPLAY ' QNAME - ', W00-QNAME.
019700 DISPLAY ' NUMMSGS - ', W00-NUMMSGS.
019800 DISPLAY ' GET - ', W00-BROWSE-GET.
019900 DISPLAY ' SYNCPOINT - ', W00-SYNCPOINT.
020000 DISPLAY '==========================================='.
020100*
020200*
020300*
020400* Connect to the queue manager
020500*
020600 CALL 'MQCONN' USING W00-QMGR
020700 W03-HCONN
020800 W03-COMPCODE
020900 W03-REASON.
021000*
021100* If connection failed then display error message and exit
021200*
021300 IF (W03-COMPCODE NOT = MQCC-OK) THEN
021400 MOVE 'MQCONN' TO W00-ERROR-MESSAGE
021500 PERFORM DISPLAY-ERROR-MESSAGE
021600 MOVE W03-REASON TO W00-RETURN-CODE
021700 GO TO A-MAIN-END
021800 END-IF.
021900 DISPLAY 'MQCONN SUCCESSFUL'.
022000*
022100*
022200* Open the queue for input shared and browse
022300*
022400 COMPUTE W03-OPENOPTIONS = MQOO-INPUT-SHARED +
022500 MQOO-BROWSE.
022600 MOVE W00-QNAME TO MQOD-OBJECTNAME.
022700*
022800 CALL 'MQOPEN' USING W03-HCONN
022900 MQOD
023000 W03-OPENOPTIONS
023100 W03-HOBJ
023200 W03-COMPCODE
023300 W03-REASON.
023400*
023500* If open failed display error message and exit
023600*
023700 IF (W03-COMPCODE NOT = MQCC-OK) THEN
023800 MOVE 'MQOPEN' TO W00-ERROR-MESSAGE
023900 PERFORM DISPLAY-ERROR-MESSAGE
024000 MOVE W03-REASON TO W00-RETURN-CODE
024100 GO TO A-MAIN-DISCONNECT
024200 END-IF.
024300* DISPLAY 'MQOPEN SUCCESSFUL'.
024400*
024500*
024600* Setup MQGMO-OPTIONS depending on parameters passed
024700* into program
024800*
025020** testing 08/07
025024 COMPUTE MQGMO-OPTIONS = MQGMO-NO-WAIT +
025025 MQGMO-ACCEPT-TRUNCATED-MSG +
025030 MQGMO-SYNCPOINT +
025031 MQGMO-CONVERT +
025033 MQGMO-FAIL-IF-QUIESCING.
025060
025600*
025700 IF BROWSE-GET THEN
025800 ADD MQGMO-BROWSE-FIRST TO MQGMO-OPTIONS
025900 END-IF.
026300*
026310 MOVE 3 TO W00-NUMMSGS.
026320
026400 PERFORM WITH TEST BEFORE VARYING W00-LOOP FROM 0 BY 1
026500 UNTIL (W00-LOOP >= W00-NUMMSGS)
026600*
026700 MOVE MQMI-NONE TO MQMD-MSGID
026800 MOVE MQCI-NONE TO MQMD-CORRELID
026900*
027000 CALL 'MQGET' USING W03-HCONN
027100 W03-HOBJ
027200 MQMD
027300 MQGMO
027400 W00-MSGLENGTH
027500 W00-MSGBUFFER
027600 W00-DATALENGTH
027700 W03-COMPCODE
027800 W03-REASON
027900*
028000* If get failed then display error message and
028100* break out of the loop.
028200* Otherwise display the message received
028300*
028310* divide by zero to cause abend
028320 IF W00-LOOP = 4
028330 COMPUTE WTT1-TEST = W00-NUMMSGS/WTT-TEST
028350*
028400 IF (W03-COMPCODE NOT = MQCC-OK) AND
028500 (W03-REASON NOT = MQRC-TRUNCATED-MSG-ACCEPTED) THEN
028600 MOVE 'MQGET' TO W00-ERROR-MESSAGE
028700 PERFORM DISPLAY-ERROR-MESSAGE
028800 MOVE W00-NUMMSGS TO W00-LOOP
028900 MOVE W03-REASON TO W00-RETURN-CODE
029000 ELSE
029100 IF W03-REASON = MQRC-TRUNCATED-MSG-ACCEPTED THEN
029410 continue
029500 ELSE
029510 MOVE W00-MSGBUFFER TO WS-MQDATAO-REC
029520 WRITE MQDATAO-REC FROM WS-MQDATAO-REC
029530
029710 continue
029800 END-IF
029900 ADD 1 TO W00-NUMGETS
030000 END-IF
030100*
030200* If browsing the queue then change the
030300* MQGMO browse options
030400*
030500 IF (W00-LOOP = 0) AND BROWSE-GET THEN
030600 SUBTRACT MQGMO-BROWSE-FIRST FROM MQGMO-OPTIONS
030700 ADD MQGMO-BROWSE-NEXT TO MQGMO-OPTIONS
030800 END-IF
030900*
031000 END-PERFORM.
031100*
031200* Display the number of messages successfully got
031300* from the queue.
031400*
031500* DISPLAY W00-NUMGETS, ' MESSAGES GOT FROM QUEUE'.
031600*
031700*
031800* If program started with syncpoint and destructive get
031900* selected then execute syncpoint
032000*
032110 IF SYNCPOINT THEN
032200 CALL 'MQCMIT' USING W03-HCONN
032300 W03-COMPCODE
032400 W03-REASON
032500 IF (W03-COMPCODE NOT = MQCC-OK) THEN
032600 MOVE 'MQCMIT' TO W00-ERROR-MESSAGE
032700 PERFORM DISPLAY-ERROR-MESSAGE
032800 MOVE W03-REASON TO W00-RETURN-CODE
032900 ELSE
033000* DISPLAY 'MQCMIT SUCCESSFUL'
033001 continue
033002 END-IF
033003 ELSE
033004 CALL 'MQBACK' USING W03-HCONN
033005 W03-COMPCODE
033006 W03-REASON
033007 IF (W03-COMPCODE NOT = MQCC-OK) THEN
033008 MOVE 'MQBACK' TO W00-ERROR-MESSAGE
033009 PERFORM DISPLAY-ERROR-MESSAGE
033010 MOVE W03-REASON TO W00-RETURN-CODE
033020* continue
033030 ELSE
033040* DISPLAY 'MQCMIT SUCCESSFUL'
033050 continue
033060 END-IF
033200 END-IF.
033300*
033400*
033500* Close the queue
033600*
033700 CALL 'MQCLOSE' USING W03-HCONN
033800 W03-HOBJ
033900 MQCO-NONE
034000 W03-COMPCODE
034100 W03-REASON.
034200 IF (W03-COMPCODE NOT = MQCC-OK) THEN
034300 MOVE 'MQCLOSE' TO W00-ERROR-MESSAGE
034400 PERFORM DISPLAY-ERROR-MESSAGE
034500 MOVE W03-REASON TO W00-RETURN-CODE
034600 ELSE
034700 DISPLAY 'MQCLOSE SUCCESSFUL'
034710 continue
034800 END-IF.
035100*
035200 A-MAIN-DISCONNECT.
035300*
035400* Disconnect from the queue manager
035500*
035510 CLOSE OUTPUT-FILE.
035600 CALL 'MQDISC' USING W03-HCONN
035700 W03-COMPCODE
035800 W03-REASON.
035900 IF (W03-COMPCODE NOT = MQCC-OK) THEN
036000 MOVE 'MQDISC' TO W00-ERROR-MESSAGE
036100 PERFORM DISPLAY-ERROR-MESSAGE
036200 MOVE W03-REASON TO W00-RETURN-CODE
036300 ELSE
036400 DISPLAY 'MQDISC SUCCESSFUL'
036410 continue
036500 END-IF.
036700 A-MAIN-END.
036800*
036900*
037000 MOVE W00-RETURN-CODE TO RETURN-CODE
037100 STOP RUN.
037200*
037300* ------------------------------------------------------------- *
037400 USAGE-ERROR SECTION.
037500* ------------------------------------------------------------- *
037600*
037700 DISPLAY '=================================================='
037800 DISPLAY 'PARAMETERS FOR PROGRAM :'.
037900 DISPLAY ' QMGR - QUEUE MANGER'.
038000 DISPLAY ' QNAME - QUEUE NAME'.
038100 DISPLAY ' NUMMSGS - NUMBER OF MESSAGES'.
038200 DISPLAY ' GET - (B)ROWSE / (D)ESTRUCTIVE GET'.
038300 DISPLAY ' SYNCPOINT - (N)O / (S)YNCPOINT'.
038400 DISPLAY '=================================================='.
038500*
038600 USAGE-ERROR-END.
038700*
038800* RETURN TO PERFORMING FUNCTION
038900*
039000 EXIT.
039100*
039200* ------------------------------------------------------------- *
039300 DISPLAY-ERROR-MESSAGE SECTION.
039400* ------------------------------------------------------------- *
039500*
039600 DISPLAY '************************************************'.
039700 DISPLAY '* ', W00-ERROR-MESSAGE.
039800 DISPLAY '* COMPLETION CODE : ', W03-COMPCODE.
039900 DISPLAY '* REASON CODE : ', W03-REASON.
040000 DISPLAY '************************************************'.
040100*
040200 DISPLAY-ERROR-MESSAGE-END.
040400* RETURN TO PERFORMING FUNCTION
040500*
040600 EXIT.
040700*
040710 ABEND ROUTINE
040720* -------------
040730*S999-000-SYSTEM-ABORT SECTION.
040731* ABEND ROUTINE
040732* -------------
040733*S999-000-SYSTEM-ABORT SECTION.
040734*
040735* COPY S9996.
040740*
040800* ------------------------------------------------------------- *
040900* END OF PROGRAM
041000* ------------------------------------------------------------- * |
|
|
Back to top |
|
 |
sgopal |
Posted: Thu Aug 15, 2002 12:24 pm Post subject: |
|
|
Acolyte
Joined: 30 Jul 2002 Posts: 63
|
Found two problems in your posted code,
1.
Quote: |
IF BROWSE-GET THEN
ADD MQGMO-BROWSE-FIRST TO MQGMO-OPTIONS
END-IF. |
If BROWSE-GET condition is satisfied then you are setting MQGMO-BROWSE-FIRST to MQGMO-OPTIONS.
MQGET on the queue, program will abend with reason code 2046 (MQRC_OPTIONS_ERROR). You cannot set
browse message option with MQGMO-SYNCPOINT option. You can set either one of the options.
2.
Quote: |
MOVE 3 TO W00-NUMMSGS. |
According to the code, divide by zero statement is performed
IF W00-LOOP = 4.
But W00-LOOP never be 4 according to your perform statement. Perform statement ends if W00-LOOP gets value 3.
Quote: |
PERFORM WITH TEST BEFORE VARYING W00-LOOP FROM 0 BY 1
UNTIL (W00-LOOP >= W00-NUMMSGS) |
I am not finding END-IF or period for the if statement.
Quote: |
IF W00-LOOP = 4
COMPUTE WTT1-TEST = W00-NUMMSGS/WTT-TEST |
|
|
Back to top |
|
 |
|