Is there any way to qualify a Procedure by Module name while calling the
procedure with CALLP or CALLB
Not exactly.  What I do is start my procedure names with the name of the 
module, so that I know there won't be any duplicates.  For example, if I 
have a module related to customers, I might call it CUST.  When I have a 
subprocedure in that module that retrieve the customer's address, I might 
call it
    cust_getAddr()

A subprocedure for looking up a customer's balance due might be
    cust_getBalDue()

and so on... because I always start my subprocedure names with the name of the module, I won't ever have a duplicate, and it'll be very much like qualifying the module name.
Say I have a procedure "ProC1" with the same name in two sub modules and I
call the procedure "Proc1" in main module by CALLP or CALLB
First... don't use CALLB.  There's no need for CALLB, please don't ever 
use it.  Use a prototype instead.  Thanks.
Second, you can (if you like) use the method I described above. A naming 
convention like that one helps when troubleshooting problems because it's 
easy to tell from error messages where to look for a subproedure.  For 
example, if you have a subprocedure called "calcTax" how do you know which 
module it's in?  However, if you name it "invoice_calcTax" and your 
convention is to always start with the module name, then you'll know that 
it's in the INVOICE module.
If you don't like that method, another way to solve the problem is to 
activate the service program and get a pointer to the exported 
subprocedure using an API.  That way, you can provide the library name and 
object name of the service program you want to use.  If you need to call 
more than one with the same subprocedure name, it's not a problem because 
you've specified the library and srvpgm name.
The APIs are called QleActBndPgm and QleGetExp... I think there's an 
example in the archives.
That won't help you for bind-by-copy, of course, only for 
bind-by-reference (i.e. calling routines in a service program)
In my opinion, the extra complexity of calling APIs, not to mention the 
performance impact of doing the binding dynamically at run time, makes 
this method a less-than-perfect solution.  Using a proper naming 
convention is a better way to solve the problem.  However, that option IS 
available if you need it.
Hope that helps...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.