|
"Brendan Bispham" <midrangel@black-and-blue.com> wrote:
>Tried DMPCLPGM... it failed, but something interesting turned up..
>here is the source:
>
> DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(20)
>OVRPRTF FILE(QPPGMDSP) TOFILE(BADLIB/BADFIL)
>DMPCLPGM
>MONMSG MSGID(CPF0000) EXEC(DO)
>RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA)
>SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
> library is' *BCAT %SST(&MSGDTA 11 10))
>ENDDO
>
>Make it a little more robust (the msgid is CPF0570) and it seems it'll do
>the job.
Brendan,
A truly brilliant piece of lateral thinking!
There's a couple of tiny things. OVRPRTF should be to QPPGMDMP, not
QPPGMDSP and the RCVMSG should have MSGTYPE(*LAST) to ensure it picks up
the CPF0570. There's also a vanishingly small possibility that someone will
actually create a BADLIB/BADFIL that works. You could just as well use an
existing file that's guaranteed to be on the system and fail such as
QSYS/QADSPOBJ.
Dave Kahn, ABB Steward Ltd.
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.