Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ILE procedures where used

155 views
Skip to first unread message

Jack

unread,
Nov 29, 2007, 3:48:23 PM11/29/07
to
Hi,

Is there a way (other than scanning the sources) to find out where a
given procedure is called?

Let's say I have a module M1 with 2 exported procedures (P1 and P2).
How could I find out which programs, services programs or modules
invoke P1?

Thx

Jack

Jonathan Ball

unread,
Nov 29, 2007, 9:20:49 PM11/29/07
to

Try using the QBNLPGMI API. According to the manual:

You can use the QBNLPGMI API to:

* List modules bound into an ILE program
* List service programs bound to an ILE program
* List data items exported to the activation group
* List data item imports that are resolved by weak
exports that were exported to the activation group
* List copyrights of an ILE program


http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/apis/qbnlpgmi.htm


The parameter in which you specify the name of the ILE
program allows the special value *ALL as well as
generic values ('ABC*'), so you could in theory get
information on all the ILE programs in a library, or
even in all libraries - the library portion of the
parameter also allows *ALL - and write the information
to a file, or just manipulate it in your program that
calls the API.

Jack

unread,
Nov 30, 2007, 3:11:43 PM11/30/07
to
On Nov 29, 9:20 pm, Jonathan Ball <jonb...@whitehouse.not> wrote:
> Jack wrote:
> > Hi,
>
> > Is there a way (other than scanning the sources) to find out where a
> > given procedure is called?
>
> > Let's say I have a module M1 with 2 exported procedures (P1 and P2).
> > How could I find out which programs, services programs or modules
> > invoke P1?
>
> > Thx
>
> > Jack
>
> Try using the QBNLPGMI API. According to the manual:
>
> You can use the QBNLPGMI API to:
>
> * List modules bound into an ILE program
> * List service programs bound to an ILE program
> * List data items exported to the activation group
> * List data item imports that are resolved by weak
> exports that were exported to the activation group
> * List copyrights of an ILE program
>
> http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/apis/qbnl...

>
> The parameter in which you specify the name of the ILE
> program allows the special value *ALL as well as
> generic values ('ABC*'), so you could in theory get
> information on all the ILE programs in a library, or
> even in all libraries - the library portion of the
> parameter also allows *ALL - and write the information
> to a file, or just manipulate it in your program that
> calls the API.

Thx for the answer.
I found a sample of a program calling the QBNLPGMI API that works
fine. It gives the list of the modules invoked, but not the list of
the modules' procedures invoked in the program/service program. There
must be a place where the procedures invoked are stored, and a way to
get this information...

Karl Hanson

unread,
Nov 30, 2007, 3:27:05 PM11/30/07
to

The List Module Information (QBNLMODI) API could be used to list module
imports (MODL0200 Format). Imported symbol type 0x00 indicates a procedure.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/qbnlmodi.htm

Perhaps you could use one API to list modules, and then for each module
use QBNLMODI. Of course, even though a procedure may be
referenced/imported, that does not necessarily mean it is actually
called when the referencing module runs.

--
Karl Hanson

0 new messages