|
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 ======================================================= The opinions expressed in this communication are my own and do not necessarily reflect those of my employer.
As an Amazon Associate we earn from qualifying purchases.
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.