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


  • Subject: RE: Linking RPG module to a CL Program
  • From: Kevin H <KevinH@xxxxxxxxxxx>
  • Date: Fri, 30 Mar 2001 13:23:46 -0500

Stan

I liked this one  -  thanks for sharing.

ta
kmh

At 12:44 PM 3/30/2001, you wrote:
>Steve,
>
>My previous post is incorrect.  The SNDPGMMSG to yourself technique just
>retrieves the program name, not the library.  The DMPCLPGM technique will
>retrieve both the program and the library.  See the sample code below.
>
>Regards,
>Stan
>
>DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(20)
>DCL        VAR(&PROGRAM) TYPE(*CHAR) LEN(10)
>DCL        VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
>
>OVRPRTF    FILE(QPPGMDMP) TOFILE(NONEXIST/NONEXIST)
>DMPCLPGM
>MONMSG     MSGID(CPF0570) EXEC(DO)
>RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA)
>CHGVAR     VAR(&PROGRAM) VALUE(%SST(&MSGDTA 1 10))
>CHGVAR     VAR(&LIBRARY) VALUE(%SST(&MSGDTA 11 10))
>DLTOVR     FILE(QPPGMDMP)
>
>-----Original Message-----
>From: Steve Moland [mailto:Steve@Accessp.com]
>Sent: Friday, 30 March, 2001 6:47 AM
>To: Rpg400-L-Digest (E-mail)
>Subject: Linking RPG module to a CL Program
>
>
>I'm still looking for direct way for a CL program to know what library it
>was loaded from. I don't have the option of passing in a parameter.
>If I created a small RPG module which used the Program Status Data Structure
>I'd have the name of the library from which the program was loaded. Does the
>MAIN program have to be RPG for structure to be populated?
>However I can't seem to find an example of how I'd prototype the call or use
>of the module in a CL program.
>Is this something a CL program can't do?
>Steve Moland
>+---
>| This is the RPG/400 Mailing List!
>| To submit a new message, send your mail to RPG400-L@midrange.com.
>| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
>| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator: david@midrange.com
>+---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 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.