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 » What happen when we dont issue MQCLOSE and MQDISC

Post new topic  Reply to topic
 What happen when we dont issue MQCLOSE and MQDISC « View previous topic :: View next topic » 
Author Message
ravikumar_sri2001
PostPosted: Mon Jul 12, 2021 5:04 am    Post subject: What happen when we dont issue MQCLOSE and MQDISC Reply with quote

Newbie

Joined: 12 Jul 2021
Posts: 3

Experts,

I have a Mainframe batch job that executes a COBOL program which reads records from a input file one by one and for each record, based on the information available in the record, it calls a various sub-programs(level-1) and this level-1 sub-programs calls "mq interface program"(level-2) which performs mq operations such MQCON, MQOPEN, MQPUT,MQCOMMIT, MQCLOSE and MQDISC.

For each input record, MQCON,MQOPEN, MQPUT,MQCOMMIT, MQCLOSE and MQDISC operations performed in the same order.

I know that MQOPEN,MQPUT,MQCLOSE, can be combined to MQPUT1...but as "mq interface program" is invoked from several programs, making this change is riskly and needs lot of testing effort.

I am trying to change the logic in "mq interface program" to perform MQCON,MQOPEN only once as the job puts messages to the same queue

Since MQ operations are performed 2 levels down the main program, I have no information in the "mq interface program" to identify the last record from the input file to issue MQCLOSE and MQDISC.

I am trying to understand what if I dont issue MQCLOSE and MQDISC. Can you please help me on this ?

Thanks,
Ravikumar
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jul 12, 2021 5:30 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

What is the underlying problem you see here? Is the application missing service level agreement? Yes, MQPUT1 does combine MQOPEN, MQPUT and MQCLOSE calls; but mainframes have lots of processor power.

How many transactions per minute, hour, day? Millions? Thousands?
_________________
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
View user's profile Send private message
ravikumar_sri2001
PostPosted: Mon Jul 12, 2021 7:24 am    Post subject: Reply with quote

Newbie

Joined: 12 Jul 2021
Posts: 3

bruce2359,
I am trying to improve the performance of a batch job as it takes about 50 minutes of CPU time. Right after putting each message, commit is issued. So I dont see any issue in the data integrity.

If we dont perform MQCLOSE, MQDISC, I assuming Queue, MQ manager connection will be be closed automatically after completion of the job. But, I could not confirm this in the IBM MQ manuals. That is why I posted this message in this forum.

Thanks,
Ravikumar
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jul 12, 2021 8:50 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

ravikumar_sri2001 wrote:
If we dont perform MQCLOSE, MQDISC, I assuming Queue, MQ manager connection will be be closed automatically after completion of the job. But, I could not confirm this in the IBM MQ manuals.

For purposes of discussion, let's say that this is true that the qmgr will close and disconnect. How will this be different from your app doing the same things?

Best practice is for apps to issue the necessary calls, and not expect the qmgr to clean up after you.
_________________
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
View user's profile Send private message
ravikumar_sri2001
PostPosted: Mon Jul 12, 2021 8:35 pm    Post subject: Reply with quote

Newbie

Joined: 12 Jul 2021
Posts: 3

bruce2359,

As I mentioned in my first post, all the MQ operations are coded in the "MQ interface program" and this program is invoked 2 levels down the Main program and I have no information in the "mq interface program" to identify the last record from the input file to issue MQCLOSE and MQDISC.

Thanks,
Ravikumar
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 12, 2021 11:27 pm    Post subject: Reply with quote

Grand High Poobah

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

ravikumar_sri2001 wrote:
bruce2359,

As I mentioned in my first post, all the MQ operations are coded in the "MQ interface program" and this program is invoked 2 levels down the Main program and I have no information in the "mq interface program" to identify the last record from the input file to issue MQCLOSE and MQDISC.

Thanks,
Ravikumar


Of course you don't. What Bruce is trying to tell you oh so gently is that you need your main program to make the call to the MQ Interface program that will result in the MQCLOSE and MQDISC being called... because your main program will know... Also you may need to up the default uncommitted count and make sure you have enough log space for it...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Tue Jul 13, 2021 7:19 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

ravikumar_sri2001 wrote:
I am trying to improve the performance of a batch job as it takes about 50 minutes of CPU time.
How long in minutes/hours of clock-time does the entire batch job take? How many transactions comprise the workload? Millions? Are you currently missing SLAs?

What else comprises the 50 minutes of CPU time? Is a data base involved in these transactions, for example? Other resources? Why are you focused on MQ as a performance issue?

What performance/throughput improvement do you require?
_________________
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
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 » What happen when we dont issue MQCLOSE and MQDISC
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.