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 » Mainframe, CICS, TXSeries » Problem in MQDLQ in the MA10 support pack

Post new topic  Reply to topic
 Problem in MQDLQ in the MA10 support pack « View previous topic :: View next topic » 
Author Message
tleichen
PostPosted: Thu Jan 27, 2011 6:56 am    Post subject: Problem in MQDLQ in the MA10 support pack Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

The source for module MQDLQ0 is a Cobol program. The documentation in the source states the following:

MODIFICATIONS:
FIXED GETMAIN PROBLEM FOR LARGE VALUES FOR "GO"
FIXED PROBLEM WITH GO 1


However, this does not appear to be the case. Also, I can type "GO 1000" once and not get an error, but doing it a second time yields the following:

IEW4000I FETCH FOR MODULE IGZINSH FROM DDNAME -LNKLST- FAILED BECAUSE INSUFFICIENT STORAGE WAS AVAILABLE.
CSV031I LIBRARY ACCESS FAILED FOR MODULE IGZINSH , RETURN CODE 24, REASON CODE 26080021, DDNAME *LNKLST*
IEW4000I FETCH FOR MODULE IGZCMGEN FROM DDNAME -LNKLST- FAILED BECAUSE INSUFFICIENT STORAGE WAS AVAILABLE.
CSV031I LIBRARY ACCESS FAILED FOR MODULE IGZCMGEN, RETURN CODE 24, REASON CODE 26080021, DDNAME *LNKLST*
CEE3798I ATTEMPTING TO TAKE A DUMP FOR ABEND U4087 TO DATA SET: XXXXXXX.Dddd.Thhmmsst.XXXXXXX


The ISPF session abends with a S0C4. In looking at the code, it appears that it is doing a call to MEMGET every time it does an MQGET. This appears to be the last modification to the source, but it did not fix what it said it did. I have tried rebuilding the module, but the results are the same. Has anyone else fixed this problem?
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Jan 28, 2011 12:04 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

The problem is, that the go command is implemented as a browse from the beginning of the queue in a loop till the message number specified on the go command is reached. That loop calls 1300-get-message which issues a getmain, regardless if this message is just skipped during the browse or not.

I solved it by adding a flag and performing the getmain only once in the loop (for the first message). This reduces the number of getmains so also a large "go" can be handled. Other solution may be possible, e.g. setting length to 0 during the browse but i did not check if that would result in a 0 byte getmain.
However, i did not check for missing freemains.

In addition, if i have a large number of messages in my DLQ, i check the first ones for the reason and then run the dlq handler. Then i check what remains. In most cases 1 run is sufficient as theres only 1 error and all DLQ messages hold the same reason code (my DLQ is empty otherwise).
In test environment i used to have many and old messages in the DLQ because nobody cared and nobody checked. One day I implemented an automatic DLQ notify process, that notifies developement about DLQ messages by email including a dump of the first xx messages, and moves messages to specific queues adding message expiry.
So in test environment i do not have to perform any manual actions on the DLQ ..... but well, i recognize i am off toppic ....


So here is my code.



Code:

in the WSS

..
..
           05 WS-GO-FLAG                 PIC X VALUE SPACE.     
             88 WS-GO                          VALUE 'Y'.       
             88 WS-GO-END                      VALUE 'N'.       
..
..

in the Procedure Division

..
..
0000-MAINLINE SECTION.
..
..
                          IF WS-CMD-PART1 = 'GO'                       
                            IF WS-CMD-PART2 IS NUMERIC                 
                              MOVE MQGMO-BROWSE-FIRST TO WS-OPTIONS   
                              MOVE 0 TO WS-NMR                         
                              PERFORM 1200-OPEN-DEADQ                 
                              PERFORM 1300-GET-MESSAGE                 
                              MOVE MQGMO-BROWSE-NEXT TO WS-OPTIONS     
                              SUBTRACT 1 FROM WS-CMD-PART2             
      * Indicate GO command     
                              SET WS-GO TO TRUE                       
      *               
                                                                       
                              PERFORM 1300-GET-MESSAGE                 
                                         WS-CMD-PART2 TIMES           
      * switch off GO command
                              SET WS-GO-END TO TRUE                   
      *         
                              PERFORM 1400-FORMAT                     
                            END-IF                                                                     
..
..
..
       1300-GET-MESSAGE.     
..
..
              ADD MQGMO-ACCEPT-TRUNCATED-MSG TO MQGMO-OPTIONS.     
              ADD MQGMO-FAIL-IF-QUIESCING TO MQGMO-OPTIONS.       
                                                                   
              IF NOT WS-GO                                         
      * no GETMAIN as records are only skipped                       
                MOVE WS-SIZE TO WS-BUFFLEN                         
                                                                   
                CALL WS-GETMAIN USING WS-SIZE                     
                                      WS-ABOVE                     
                                      WS-BUFFER-PTR               
                SET ADDRESS OF LS-BUFFER TO WS-BUFFER-PTR         
              END-IF.                                             
                                                                   
              ADD 1 TO WS-NMR.                                     
              PERFORM 2200-MQGET.                                 

..
..

_________________
Regards, Butcher
Back to top
View user's profile Send private message
tleichen
PostPosted: Wed Feb 02, 2011 2:17 pm    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

Thanks. That method solves the problem of superfluous getmains!

Another oddity that I see now is that if the messages in the DLQ are different sizes, the display buffer does not get cleared and/or the buffer size gets corrupted with multiple GO commands. For example, I have 3 messages and their lengths are 20, 40, and 30. If I type:
GO 1
GO 2
GO 3

then the buffer displays the 30 characters of the third record followed by the last 10 of the second record.

But, if I type
GO 1
<enter>
<enter>

The display works properly. Logically, this should be identical.

I've perused the source trying to find what was missed, but it's eluding me.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 02, 2011 8:16 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

tleichen wrote:
Thanks. That method solves the problem of superfluous getmains!

Another oddity that I see now is that if the messages in the DLQ are different sizes, the display buffer does not get cleared and/or the buffer size gets corrupted with multiple GO commands. For example, I have 3 messages and their lengths are 20, 40, and 30. If I type:
GO 1
GO 2
GO 3

then the buffer displays the 30 characters of the third record followed by the last 10 of the second record.

But, if I type
GO 1
<enter>
<enter>

The display works properly. Logically, this should be identical.

I've perused the source trying to find what was missed, but it's eluding me.


Looks to me like the problem could have 2 origins:
a) the buffer is not initialized between 2 get calls
b) As the size of the buffer is not changed, when the message size is less than the buffer size, the full buffer size is still being passed for display. You need to make sure that you are reading/showing only the max of buffersize / messagesize...


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Mr Butcher
PostPosted: Mon Feb 07, 2011 4:15 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

why do you care for the message content? this is not a queue browser. its a dlq handler. for me, the most important information is the one that is hold in the DLH, e.g. the reason code why the messages is on the DLQ and the related object names. Then i know what the problem is and can go and solve it or run the DLQ handler.

If you want to browse, use suggest to use a different tool.

Although i agree with you that it is not coded very well ..... but... well.. supplied as it is .. to verify your cobol skills
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Feb 07, 2011 5:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So the buffer is reused but not cleared between gets.

Not so hard to MOVE SPACES is it?
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Mon Feb 07, 2011 6:02 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

well, it depends


Code:


              IF NOT WS-GO                                 
                MOVE WS-SIZE TO WS-BUFFLEN                 
                                                           
                CALL WS-GETMAIN USING WS-SIZE               
                                      WS-ABOVE             
                                      WS-BUFFER-PTR         
                SET ADDRESS OF LS-BUFFER TO WS-BUFFER-PTR   
              ELSE                                         
                MOVE SPACES TO LS-BUFFER                   
              END-IF.                                       [       


not that performant as it does the move spaces for every message that is skipped. but its quick and dirty (and so fits into this program).

other solution for cobol learners - split the n time loop fopr the go into
n-1, then move spaces, then call the final mqget. but i was not in the mood for that.

however, please recognise that the maximum message length the program will handle is 32k


Code:
               ADD LENGTH OF MQDLH TO 32767 GIVING WS-SIZE   
               MOVE 32767 TO WS-MSG-SIZE         


thats why it reads using accept truncated message.

so, again, if for browsing, use something different
_________________
Regards, Butcher
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 » Mainframe, CICS, TXSeries » Problem in MQDLQ in the MA10 support pack
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.