• Subject: RE: Determining what library a CL program is called from?
  • From: Tim McCarthy <TimM@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 28 Sep 1999 10:19:08 -0400

If you're looking for a technique then what I do is materialize the
current invocation entry to get the invocation number, materialize the
previous invocation then materialize the program pointer to get the
program name and library. I have an MI program that does this but you
could do it in C too. If you want to use the other offered alternative
that uses spool file output (the overhead makes this unattractive) you
should be aware that this won't catch the situation where you've another
version of the program (same name) running out of a different library.
If you read backwards through the output that would help I suppose. Let
me know if/where you want it posted. 

TrailBlazer Systems, Inc.
http://www.softwarejungle.com
AS/400 E-Commerce Solutions

Chaos, panic, & disorder - my work here is done.

> -----Original Message-----
> From: David Gibbs [SMTP:david@midrange.com]
> Sent: Monday, September 27, 1999 1:59 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: Determining what library a CL program is called
> from?
> 
> Tim:
> 
> Can you post it?  I'm just looking for a technique or IBM API to call.
> 
> An external program won't do me any good, as I have to stay pure.
> 
> david
> 
> > 
> > I've got one. This time you can have source and everything :-)
> > 
> > TrailBlazer Systems, Inc.
> > http://www.softwarejungle.com
> > AS/400 E-Commerce Solutions
> > 
> > Chaos, panic, & disorder - my work here is done.
> > 
> > > -----Original Message-----
> > > From:     David Gibbs [SMTP:dgibbs@mks.com]
> > > Sent:     Monday, September 27, 1999 10:03 AM
> > > To:       'Midrange Mailing List'
> > > Subject:  Determining what library a CL program is called from?
> > > 
> > > Greetings!
> > >  
> > > Does anyone know of a way for a CL program to determine what
> library
> > > it is
> > > executing in?
> > >  
> > > I'm looking for either an API or a technique that will simply tell
> me
> > > what
> > > library the current CL program is executing out of so I can
> qualify my
> > > recursive program call to ensure I call the same copy.
> > >  
> > > Thanks!
> > >  
> > > david
> > >  
> > > 
> > > --
> > > 
> > > David Gibbs
> > > Sr. Software Engineer
> > > Mortice Kern Systems US, Inc.
> > > 2500 S. Highland Ave., Suite 200
> > > Lombard, IL  60148
> > > 
> > > phone: (630) 495-2108 x5004
> > > http://www.mks.com <http://www.mks.com/> 
> > > mailto:dgibbs@mks.com <mailto:dgibbs@mks.com> 
> > > 
> > > 
> > > Opinions expressed are strictly my own and do 
> > > not necessarily reflect those of my employer.
> > > 
> > >  
> > > +---
> > > | This is the Midrange System Mailing List!
> > > | To submit a new message, send your mail to
> MIDRANGE-L@midrange.com.
> > > | To subscribe to this list send email to
> MIDRANGE-L-SUB@midrange.com.
> > > | To unsubscribe from this list send email to
> > > MIDRANGE-L-UNSUB@midrange.com.
> > > | Questions should be directed to the list owner/operator:
> > > david@midrange.com
> > > +---
> > +---
> > | This is the Midrange System Mailing List!
> > | To submit a new message, send your mail to
> MIDRANGE-L@midrange.com.
> > | To subscribe to this list send email to
> MIDRANGE-L-SUB@midrange.com.
> > | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> > | Questions should be directed to the list owner/operator:
> david@midrange.com
> > +---
> > 
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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-2019 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 here. If you have questions about this, please contact [javascript protected email address].