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



Here's the program I use, from an article in News/400, CALLERID.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 * System API error code

D Qusec           DS

D  QusBPrv                1      4B 0

D  QusBAvl                5      8B 0

D  Qusei                  9     15

D  Quserved              16     16

 

 * Type definition for the RCVM0200 format

D RCVM0200        DS           120

D  Program              111    120

 

 *Program message parameters

D Pm_MsgId        S              7    Inz(*Blanks)

D Pm_MsgF         S             20    Inz(*Blanks)

D Pm_MsgDta       S             12    Inz('Who are you')

D Pm_Length       S              9B 0

D Pm_MType        S             10    Inz('*INFO')

D Pm_MKey         S              4    Inz(*Blanks)

D Pm_CSEntry      S             10    Inz('*')      
D Pm_Counter      S              9B 0 Inz(4)

 

D Pm_Format       S              8    Inz('RCVM0200')

D Pm_Wait         S              9B 0 Inz(0)

D Pm_Action       S             10    Inz('*REMOVE')

 

C     *Entry        Plist

C                   Parm                    Caller           10

 

 * Set error code structure not to use exceptions

C                   Z-add     16            QusBPrv

 

 * Set length of message data

C                   Z-add     12            Pm_Length

 

 * Send program message

C                   Call      'QMHSNDPM'

C                   Parm                    Pm_MsgId

C                   Parm                    Pm_MsgF

C                   Parm                    Pm_MsgDta

C                   Parm                    Pm_Length

C                   Parm                    Pm_MType

C                   Parm                    Pm_CSEntry

C                   Parm                    Pm_Counter

C                   Parm                    Pm_MKey

C                   Parm                    Qusec

 

 * Check for errors

C                   If        QusBAvl > 0

C                   ExSR      *PSSR

C                   EndIF

 

 * Clear return data astructure

C                   Clear                   RCVM0200

 

 * Set Length of message information

C                   Z-add     120           Pm_Length

 

 * Recieve program message

C                   Call      'QMHRCVPM'

C                   Parm                    RCVM0200

C                   Parm                    Pm_Length

C                   Parm                    Pm_Format

C                   Parm                    Pm_CSEntry

C                   Parm                    Pm_Counter

C                   Parm                    Pm_MType

C                   Parm                    Pm_MKey

C                   Parm                    Pm_Wait

C                   Parm                    Pm_Action

C                   Parm                    Qusec

 

 * Check for errors

C                   If        QusBAvl > 0

C                   ExSR      *PSSR

C                   EndIF

C                   Move      Program       Caller

C                   Return

 

C     *PSSR         BegSR

C                   Return

C                   EndSR

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-----Original Message-----
From: Andrew Batch [mailto:Andrew@IBS-PUBLIC-SERVICES.CO.UK]
Sent: Thursday, July 13, 2000 8:57 AM
To: RPG400-L@midrange.com
Subject: 


I have program (A) which calls program (C)

And

Program (B) which calls program (C).

 When program C is executed (and without using a parameter) how can I
determine which program made the call.

Thanks

Andy Batch
+---
| 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 ...


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.