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



Yes - that was ingenious.

The code below just miss (as it is probably part of the very top program in
the entire job) the DLTOVR:

       DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(20)
       OVRPRTF    FILE(QPPGMDMP) TOFILE(QSYS/QADSPOBJ)
       DMPCLPGM
       MONMSG     MSGID(CPF0000) EXEC(DO)
       RCVMSG     MSGTYPE(*LAST) MSGDTA(&MSGDTA)
       SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
                    library is' *BCAT %SST(&MSGDTA 11 10))
       ENDDO
       DLTOVR QPGMDMP

In this way you can later do a 'real' dump.

Henrik
http://hkrebs.dk


> From: David.X.Kahn@gsk.com
> Subject: Re: Getting the library name from a CL program
> To: midrange-l@midrange.com
> Date: Thu, 15 Nov 2001 17:10:58 +0000
> Reply-To: midrange-l@midrange.com
>
> Joe wrote:
>
> > However, I have never figured out a way to do the same thing from a CL.
> > Anybody have any sneaky ways of doing this, or do I just use my tried
> > and true method of wrapping the CL program in an RPG wrapper that
> > determines the library?
>
> We had this discussion back in 1999 and Brendan Bispham came up with a
> method that was so sneaky I think it's nothing short of brilliant. You
dump
> the active program having first issued an override that causes the dump
> command to fail. The library is in the resulting error message. :-)))
>
>         DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(20)
>         OVRPRTF    FILE(QPPGMDMP) TOFILE(QSYS/QADSPOBJ)
>         DMPCLPGM
>         MONMSG     MSGID(CPF0000) EXEC(DO)
>         RCVMSG     MSGTYPE(*LAST) MSGDTA(&MSGDTA)
>         SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
>                      library is' *BCAT %SST(&MSGDTA 11 10))
>         ENDDO
>
> Dave...
>
> "String is a very good thing.  Rope is thicker, but string is quicker!" -
> Spike Milligan
>





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.