MQseries + Natural Batch

I’m trying to use MQSeries at a Natural batch routine, but I’m facing a very bizarre issue.
To do the put at the MQ queue I have to use some non-Natural routines thru call command but since this routines are not natural native routines my job is doing an ridiculous amount of IOs, just to exemplify to put 7000 messages my job is doing 2,000,000 IOs while the same online process does 1,000 IOs, as far as we’ve researched this happens because the online process load this routines into memory and doesn’t does this amount of IOs, do you have any clue about how could i use the MQ queue into a natural batch program without destroying the mainframe performance with all this IOs ?

Thank you very much

Are the I/O’s on the MQ processes or the loading of the modules?

If the problem is that the load modules are being re-loaded on every call and thus requiring re-initialization of the MQ environment, then you need to evaluate the OS modules being called to ensure they have an appropriate REUS and RENT settings (check with the vendor (IBM) documentation to see what your choices are for the MQ modules being called). Check for examples of how to call the modules from COBOL routines, for example - these should be similar in configuration to calling from Natural.

We use MQ at our shop and don’t face this problem.

Besides re-entrant/re-use settings as Doug suggested ensuring that these assemble parms were correct with the vendor, also make sure the MQ interface modules MQGET and MQPUT and others that you call from Natural are linked into the nucleus with the CSTATIC parm, and that you include CSQBSTUB in the linkedit step from the MQ library.

My CSTATIC looks like this:


Everything from the fourth one on not counting the last two are MQ interfaces.

Not sure if this could be affecting you, but also ensure your LE settings are correct as well.