With the QUSRJOBI and QMHRCVM APIs and MONBCH2, you know exactly what the message is and how to reply.
By Bruce Vining
In a previous article, "Keep Those Batch Jobs Running (Or How to Enjoy Your Off Time)," we saw how to detect when a batch job was waiting for a message to be replied to and how to inform a user of that situation. In that introductory article, we simply sent a generic message indicating that job X was waiting for a response to a message. In this article, we'll enhance the MONBCH program and inform the operator of which exact message the job is waiting on. Note that this enhancement to MONBCH will use a V6R1 feature that is not available on previous releases.
The new program, MONBCH2, is shown below with the functional changes highlighted.
Now, we'll take the concept to the next level by using prototyped subprocedures.
By Mike Faust
In a previous article, we explored how nested data structures can help to emulate the way object-oriented programming languages access information. This time, I'd like to take the concept a step further by illustrating how to extend the object-oriented concept within ILE RPG by creating prototyped subprocedures that return nested data structures to the calling program.