Author |
Message
|
devineni25 |
Posted: Sun Nov 06, 2005 8:50 am Post subject: Program is getting loop |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
I am getting the data from Queue with using MQGET. Once I got the message, I write to a Adabas file. If I got a invalid data,(invalid data means the data is incorrect). I write to another Adabas file which is used as error file.
I write the MQGET until end-of-message until I get error code 2033(which means no message found).
Example -
PERFORM UNTIL W-SB-MQ-COMPLETION-CODE EQUAL MQCC-FAILED
COMPUTE MQGMO-OPTIONS = MQGMO-FAIL-IF-QUIESCING +
+ MQGMO-CONVERT + MQGMO-WAIT
CALL 'MQGET' USING
W-SB-HCONN,
W-SB-Q-HANDLE,
MQMD,
MQGMO,
W-SB-BUFFER-LEN-GET,
W-SB-BUFFER-GET,
W-SB-DATA-LEN,
W-SB-MQ-COMPLETION-CODE,
W-SB-MQ-REASON-CODE
Write to Adabas file.
If some error has some, like 1 <> 1. Then Call another program and write error over there.
After that get another message.
End-Perform
My problem is that, If After writing in to error and next getting another message but it is not getting any message. Continously looping.
While looping, I found this statments in the MAINVIEW
Resource Type : MQSeries
Resource Name : TASKSWCH
Other wise, Resource Type : MQSeries, Resource Name : Getwait.
I am not able to trace exactly problem is my program or with the channels.
Please just |
|
Back to top |
|
 |
oz1ccg |
Posted: Sun Nov 06, 2005 10:31 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Did you remember to clear the message and correlation id ??
If I remember it correct:
MOVE MQCI-NONE TO MQMD-CORRID
MOVE MQMI-NONE TO MQMD-MSGID
And what is wait interval set to ??
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 |
|
 |
devineni25 |
Posted: Sun Nov 06, 2005 10:44 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
I had set this to
MOVE MQCI-NONE TO MQMD-CORRID
MOVE MQMI-NONE TO MQMD-MSGID
and wait interval set to 2 seconds.
Some times, I am succesffully able to receive message at that time
RESOURCE NAME used is GETWAIT and the RESOURCE_TYPE is MQSeries.
Some times, when the program is looping,
RESOURCE NAME used is TASKSWCH and the RESOURCE_TYPE is MQSeries.
In the peek business hours, we receive many messages at a times. Trigger type is set to MQ_FIRST.
I read 4 messages successfully on the fifth message, if there is a problem, it is writing to Adabas base error file. After writing to ADABAS error file, going to MQGET and reading the messages again but it is looping on that time onwards.
Is there any change that there is a time limit on the task? |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sun Nov 06, 2005 11:36 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
What errors do you check for...just a 2033? If so you may want to rethink that.
If an MQGet fails, it will leave the message on the queue and if you keep on trying to get the failing message guess what?...you loop.
Personally I would throw a abend out for any reason codes that I wasn't expecting. |
|
Back to top |
|
 |
devineni25 |
Posted: Sun Nov 06, 2005 11:46 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
If it is 2033 means, I am closing the queue. It is not a error. If the error is other than 2033, I am logging that data into Adabas error file.
I am sure, it is not a MQGET fail, when ever it is writing to a Adabas file and after that trying to get another message only, it is looping.
RESOURCE NAME used is TASKSWCH and the RESOURCE_TYPE is MQSeries.
It is not picking the next message at all. I am thing that. Is there any which I can see how messages it is reading while it is looping.
I am using TSO MAINVIEW.
Is there any way to look into the below trace
*************************************************
You can force MQ to generate another trigger, by changing the TRIGGER-attributes in MQ-EXPLORE or using MQSC.
When you know MQ have generated a trigger msg, take a look on the log of the CKTI-CICS. There might be an failure here.... which result in some message here...
An example could be that the transaction was undefined or that the userid who is running the trigger-monitor(CKTI) have insufficient access to the transaction
examples of the log to come:
Example of the status display:
CKQCM2 Display Connection panel
Read connection information. Then press F12 to cancel.
CICS Applid = TESTCICS Connection Status = Connected QMgr name= CSQ1
Trace Num = 001 Tracing = On API Exit = On
Initiation Queue Name = ATGLQUEUE
--------------------------------- STATISTICS ---------------------------------
Number of in-flight tasks = 1 Total API calls = 7626
Number of running CKTI = 1
APIs and flows analysis Syncpoint Recovery
---------------------------------------- ------------------- ---------------
Run OK 7575 MQINQ 0 Tasks 51 Indoubt 0
Futile 0 MQSET 0 Backout 0 UnResol 0
MQOPEN 201 ------ Flows ------ Commit 1780 Commit 0
MQCLOSE 200 Calls 9629 S-Phase 1780 Backout 0
MQGET 1885 SyncComp 9407 2-Phase 0
GETWAIT 1885 SuspReqd 0 ------------- Task Use -------------
MQPUT 5340 Msg Wait 222 Initial 8 Started 8 Busy 0
MQPUT1 0 Switched 9628 |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sun Nov 06, 2005 12:11 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
If the error is other than 2033, I am logging that data into Adabas error file.
|
Yes....but the message will still be on the queue. This is MQ working as designed. If your program doesn't remove it from the queue or your program doesn't do something about it (like get a larger area for the get) then you will loop around on the same message.
Quote: |
I am sure, it is not a MQGET fail, when ever it is writing to a Adabas file and after that trying to get another message only, it is looping.
|
If the MQGet isn't failing, then what causes the error file to be written?
Have you read the manual about syncpointing too? |
|
Back to top |
|
 |
devineni25 |
Posted: Sun Nov 06, 2005 10:12 pm Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
When it is trying to loop, I am finding some news things
RESOURCE NAME used is TASKSWCH and the RESOURCE_TYPE is MQSeries and
RESOURCE NAME used is DFHLOG and the RESOURCE_TYPE is LGWRITE.
I am not sure, is this a problem? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Nov 07, 2005 12:21 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
i dont think so. the problem is your program and trigger first. As others have written before it looks like you do not leave an empty queue, thats why you get triggered again and loop on the sampe message.
make sure that you remove the messages that are in error from the queue.
you may - for testing purposes - switch to trrigger every and put a bad message to the queue and check what is happening (your program will be triggered only once). now you can check if your program is still looping and whether that bad message is removed from the queue or not. _________________ Regards, Butcher |
|
Back to top |
|
 |
devineni25 |
Posted: Mon Nov 07, 2005 1:00 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
When it is looping I found some interesting things -
What does this mean -
RESOURCE NAME used is TASKSWCH and the RESOURCE_TYPE is MQSeries. At what situation this will come. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Nov 07, 2005 2:23 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
from the concepts and planning guide:
Quote: |
When the CICS adapter puts a task on a CICS wait because of a need to perform
task switching the RESOURCE NAME used is TASKSWCH and the
RESOURCE_TYPE is MQSeries. |
what you are looking at is the "normal" behaviour of your environment. you should concentrate on your program and the kind it does its processing. _________________ Regards, Butcher |
|
Back to top |
|
 |
zpat |
Posted: Mon Nov 07, 2005 2:52 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Try coding NO_SYNCPOINT on the MQGMO - just to be sure.... |
|
Back to top |
|
 |
devineni25 |
Posted: Mon Nov 07, 2005 3:21 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
I am trying with EXEC CICS SYNCHPOINT END-EXEC not to back out the transaction. |
|
Back to top |
|
 |
devineni25 |
Posted: Mon Nov 07, 2005 3:39 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
Some times, we get a thousands of transactions with in 5 minutes and we are using same adapter for 3 different queues.
3 different CICS transactions pointing to a same program.
example -
CICS transactions Program.
XX Pointing to ABCDEF
YY Pointing to ABCDEF
ZZ pointing to ABCDEF
If any message comes to the queue 1, which triggers XX which in truns call ABCEDF. the same as for YY and ZZ. We read the queue until end of file.
All the three queues connected thru a single MQ channel. Will it effect any thing?
As I read, Channel will support only 10 calls at a time. Any idea on this? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Nov 07, 2005 3:47 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
is the looping issue solved because you switched over to more common questions? if so, please let us know about the reason.
Quote: |
All the three queues connected thru a single MQ channel. Will it effect any thing? |
that depends on the load and what responsetimes you are trying to archive. it is quite "normal" to use one channel for multiple queues.
but - yes - they will affect each other, depending on volume, channel settings, ......... but under normal circumstances you will not recognize this influence.
Quote: |
As I read, Channel will support only 10 calls at a time. Any idea on this? |
where didi you read that? _________________ Regards, Butcher |
|
Back to top |
|
 |
oz1ccg |
Posted: Mon Nov 07, 2005 6:50 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Quote: |
Some times, we get a thousands of transactions with in 5 minutes and we are using same adapter for 3 different queues.
3 different CICS transactions pointing to a same program.
example -
CICS transactions Program.
XX Pointing to ABCDEF
YY Pointing to ABCDEF
ZZ pointing to ABCDEF
If any message comes to the queue 1, which triggers XX which in truns call ABCEDF. the same as for YY and ZZ. We read the queue until end of file. |
This is a no problem in that. I've got the same serving a lot of queues...
And the application you're calling is not issuing a EXEC CICS SYNCPOINT ROLLBACK ??
I would concentrate on this:
Quote: |
I read 4 messages successfully on the fifth message, if there is a problem, it is writing to Adabas base error file. After writing to ADABAS error file, going to MQGET and reading the messages again but it is looping on that time onwards. |
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 |
|
 |
|