× 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.



On 27-Sep-2016 18:01 -0500, Jerry Draper wrote:
In our backup routine we do a:

SAVLIB *ALLUSR

SAVDLO

SAV (ifs)

That looks like what I recall to be a GO SAVE Option-23. Is that source code available like for GO SAVE Option-21? Might be easiest and most informative to customize that, if available; NB that the code that is available for save entire system would have all of those save operations also, but would include the additional system parts of the save activity. Hopefully somebody can direct you to those sources; I can not recall and I likely do not the required authority to RTVCLSRC even if I did.


We want to monitor the SAVLIB for CPF3777 (not all libs saved) and
ignore it

However we want to monitor for any other message and do a SNDPGMMSG
if that happens.

How can we do this?

Like this?

PGM
SAVLIB *ALLUSR
MONMSG CPF3777
MONMSG CPF0000 EXEC(SNDPGMMSG blah blah)

SAVDLO
MONMSG CPF0000 EXEC(SNDPGMMSG blah blah)
SAV (ifs)
MONMSG CPF0000 EXEC(SNDPGMMSG blah blah)
ENDPGM

That works, but an EXEC(CALLSUBR SND_DIAG) might be cleaner esp. if the same message will be sent; or the even just the same SNDPGMMSG is used but with just a different MsgID [and MsgDta]. Then before the ENDPGM, optionally add a SNDPGMMSG conditioned by an indicator that was set whenever a prior Diagnostic was sent by that subroutine, that sends an Escape message to inform that at least one request failed [other than, or possibly including the ignored condition for which the same setting-on of that same indicator could occur in the MONMSG CPF3777]


or this:

PGM
MONMSG CPF0000 EXEC(SNDPGMMSG blah blah)

Anything other than a GOTO for EXEC in that context [i.e. in a Global Monitor; those before the first executable [and necessarily after the declarative section], is disallowed per the msg CPD0899 "EXEC parameter in MONMSG must be GOTO command."


SAVLIB *ALLUSR
MONMSG CPF3777

SAVDLO
SAV (ifs)
ENDPGM

That coding would be similar to the CALLSUBR suggested earlier, but implemented via a GOTO Label rather than a subroutine label. For what I infer is expressed as desired effect, I would *not recommend* this approach; instead to use the prior example, for both of the following reasons:
• lack of /variable/ label targets of GOTO; given I infer that after the /error/ and sending a diagnostic message, the code should continue with the next statement of the save activity, a SELECT\ENDSELECT to set a to determine to what label the GOTO should return based on a phase-of-processing is not pretty [though I had coded them many times in the past before subroutines arrived, or sometimes I coded such a consistent list of work\statements as interpreted requests processed in a loop]
• exception looping is a potential issue; easy enough to avoid, but effectively ends up adding another MONMSG CPF0000 to most everything else within the handler -- the mainline processing is cleaner, but the rest, not so much. I like to use a CALLSUBR to do the repetitive stuff if possible.



Jerry

--

If the above three characters between the double-quotes " --" was intended to be the signature delimiter that enables the following text to be auto-trimmed by email&NNTP clients like mine [and trimmed from the archived message], then the proper way to have done so would be to have the line written _instead_, as having only these three characters between the double-quotes: "-- "

--
Jerry Draper, Trilobyte Software Systems, since 1976
IBMi, Network, and Connectivity Specialists, LAN/WAN/VPN
Representing WinTronix, Synapse, HiT, and others .....
(415) 457-3431; [1]www.trilosoft.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.