Author |
Message
|
mqlover |
Posted: Mon Dec 30, 2013 12:48 am Post subject: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Thanks for the reply.
The application team would not like to change their AS400 application.They have this generic format as to do a MQCONN,MQPUT1,MQDISC for each message.
Any other solution?
Thanks in advance |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Dec 30, 2013 1:31 am Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqlover wrote: |
Thanks for the reply.
The application team would not like to change their AS400 application.They have this generic format as to do a MQCONN,MQPUT1,MQDISC for each message.
Any other solution?
Thanks in advance |
Bang your head against a brick wall?
Their excuse is rather
At least if anyone complains about the performance you can point the finger at the lazy AS400 developers.
Happy new year. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqlover |
Posted: Mon Dec 30, 2013 1:47 am Post subject: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Thanks.
I shall try to check with the AS400 developers to change the code if possible.
Thanks for the replies |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 30, 2013 6:17 am Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
mqlover wrote: |
No the application does not do MQCMIT after each MQPUT. |
Does the app do an MQCMIT ever?
mqlover wrote: |
Yeah it was working successfully since october, even now it works, but only sometimes a delay of 10secs is observed. We have been observing since few days.
...
There were no changes in the application since the time the testing started. |
Were there any changes to anything? What version of WMQ? Has that changed?
How is the putting application launched? Is there a client channel table involved? Are any mq environment variables set? MQSERVER=, MQCHLLIB=? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqlover |
Posted: Thu Jan 02, 2014 1:43 am Post subject: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Hi,
We are not using any channel tables and also there havent been any changes in the program.
Kindly could anyone help me guide the AS400 developers on how to go about the logic of the application.
Can we have the below logic :
MQCONN+MQOPEN+MQPUT+MQCLOSE
And never disconnect from the queuemanager?
Wouldn the resources be locked as the connection to the qmgr would be waiting for the msg to arrive?
So, the app should also have a logic to check if the connection is broken or not, wouldnt this cause the delay?
Thanks in advance |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 02, 2014 2:37 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
MQCONN+MQOPEN+MQPUT+MQCLOSE
|
This in itself is a bad idea. however if...
Code: |
MQCONN
Loop Start
MQOPEN+MQPUT+MQCLOSE
Loop end (never)
|
may well give you what you want. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
JosephGramig |
Posted: Thu Jan 02, 2014 6:59 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Always specify MQOO_FAIL_IF_QUIESCING.
If you want an immediate release of the PUT msg, specify MQPMO_NO_SYNCPOINT.
After every single MQ call, check the Completion Code (CC) and Reason Code (RC). If either is not zero, then you probably want to record/report that some where/how and then "do the needful". |
|
Back to top |
|
 |
mqlover |
Posted: Tue Jan 07, 2014 12:39 am Post subject: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Thank you so much for the replies.
Our AS400 Developers have done it, and now we donot find any delay
Similarly, we have a get program, so do we have to implement the similar kind of logic for the get program? Would it be feasible to implement this way
MQCONN
Loop start
MQOPEN
MQGET
MQCLOSE
<no MQDISC>
Thanks in advance. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 07, 2014 1:10 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
It would be more efficient to do this
MQCONN
MQOPEN
Loop start
MQGET
loop end
<no MQCLOSE>
<no MQDISC>
If you are happy about waiting for ever on the MQGET (set the timeout to 0) but don't forget to use the correct FAIL_IF_QUIESCING option. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqlover |
Posted: Tue Jan 14, 2014 7:08 pm Post subject: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Thanks for the suggestions. We have impletemented the same way and the messages are transfeered without any delay.
To add on to this, I need some clarifications on the concept:
1. If say there are 5 applications connected to qmgr, if applications are down by itself without a MQDISC call, then does the connection with the qmgr still remain or active?
2. What is the time interval for the connection to qmgr(MCONN) be active? Is it a good programming style if we do not issue a MQDISC at all in the application
Kindly help me on the same.
Thanks in advance |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jan 14, 2014 8:31 pm Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
mqlover wrote: |
Is it a good programming style if we do not issue a MQDISC at all in the application? |
It is bad programming style to end an MQ application without MQDISConnect.
It is also bad programming style to end an application without closing files you opened. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqlover |
Posted: Tue Jan 14, 2014 8:41 pm Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
bruce2359 wrote: |
mqlover wrote: |
Is it a good programming style if we do not issue a MQDISC at all in the application? |
It is bad programming style to end an MQ application without MQDISConnect.
It is also bad programming style to end an application without closing files you opened. |
Thank you so much.
Could you also me help me clarify the point 1 mentioned?
And also could you let me know how long would be the connection active? |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jan 15, 2014 6:22 am Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jan 15, 2014 7:23 am Post subject: Re: delay in putting msgs to the queue from AS400 program |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
DISCINT only applies to SVRCONN channels on z/OS.
I don't see MQ Client mentioned in this thread. I think the apps are local to the QM anyway - no channel involved. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|