× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rory

IBM has published technique for handling all messages generated during a certain process. The idea is to send a dummy message and get its message key, then do whatever you do, then send another dummy and get ITS key. Then do the RCVMSG RMV(*YES) or QMHRCVPM and use the keys between the starting one and the ending one. They might not all be there, so be sure to allow for that error.

This method gets everything in between the 2 dummy messages, from whatever source.

One might want to keep certain messages, so appropriate conditional statements can be included.

I don't have the link to the KB article right now, but I bet you could search for QMHRCVPM in the software knowledge base and get close.

HTH
Vern

Rory Hewitt wrote:
No, it's not a formal name :)

I guess I prefer to write code which up-front checks (and caters) for as
many errors as I can think of. Of course this means that the code is full of
little IF-clauses checking for this error and that. So I'd be in your latter
group.

I've never liked the MONITOR op-code, because it allows developers to rely
on the system to catch things which they should have checked for in the
first place. In Scott Klement's article which Kurt linekd to, Scott uses his
CleanUp() procedure to clean up job log errors that might happen if he
attempts to divide by zero. Me, I would have checked for zero before the
divide. Likewise with the other errors.

I *am* anal about job log messages <grin>

Of course, there's no reason why you couldn't write a procedure similar to
Scott's CleanUp() procedure, which cleans up every job log message:

monitor;
//stuff goes here
on-error;
CleanUpJobLog();
// error processing goes here
endmon;

but you'd probably want to use the QMHLJOBL or QGYOLJBL API rather than
QMHRCVPM, since you might want to remove low-level messages which were sent
to IBM sub-programs too.

On Mon, Feb 22, 2010 at 4:32 PM, Jose Antonio Salazar Montenegro <
0jsalazarm@xxxxxxxxxxxxx> wrote:

Why yes, they are. That's why I'm changing them.

I'm sure it's not the formal name, what I meant was doing what could
trigger an error and monitor for it rather than programmatically prevent
all possible error conditions and only act until you think all bases are
covered.

Some languages, like Python, make it easy to use this approach. When
Monitors were introduced, RPG did too, with the minor inconvenient of
spamming the job log.

--
Saludos
Antonio Salazar


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.