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



One way I've solved this problem is to always pass the address of the
SDS of the calling program to any sub program. The sub program will then
have all the details of the parent.

However, as you pointed out this has the limitation of relying on
structure/standards to maintain the integrity.

Other programs I've seen rely on the LDA to pass this data. But again,
the integrity needs to be forced.

I would also be interested in a better method if anyone has one.

Jim

 

 

The bitterness of poor quality remains long after low pricing is
forgotten! 

 

Cautillo, Leon M.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Cunningham
Sent: Friday, 21 July 2006 7:25
To: rpg400-l@xxxxxxxxxxxx
Subject: Find the calling program


Is there any way for an RPG to determine what program called it?  I am
writing a service program that writes records to a database and one of
the fields I want to store is the name of the program that asked the
service program to create the record. So PGMA calls PGMB that calls
SERVICEPGM I want SERVICEPGM to write a database record with PGMB in the
tracking field. I have done this many years ago but at that time I
passed a parameter to know who was requesting the service but then all
the code was mine and I trust my code :) This time a lot of people will
be using the service program and I would prefer not to let them pass me
anything they want.
 
Mike Cunningham
Pennsylvania College of Technology
www.pct.edu
mcunning@xxxxxxx

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.