I asked this question once a year ago, but an answer stayed unclear for me.

The problem is following:
My C program must call an RPG program (e.g. PROGA), that can be in one of the 2 
libraries (or in both) KLIB123 or KAPBASELIB.
If program is in KLIB123, I must call it even if it is also in KAPBASELIB. If 
it is missing in KLIB123, a version from KAPBASELIB must be called.
These 2 libraries are in proper order in library list - KLIB123 is before 
KAPBASELIB.

Now what I do :

#pragma map(action, "PROGA")
#pragma linkage(action, OS)
void action (......)

int main()
{
  .....
  action (...) ;
  .....
}

This DOES NOT work.
If I put 
#pragma map(action, "KLIB123/PROGA")
and PROGA is in KLIB123, it works. But if PROGA is in KAPBASELIB - it does not 
work.

If I put 
#pragma map(action, "*LIBL/PROGA")
it never works.

I thought, that the thread does not have proper library list (The program is 
called from PC via another program (H56HSR)). I used QWCRTVCA to get a current 
library list and it is correct, containing KLIB123 and KAPBASELIB in proper 
order.

Is there any way to call RPG program as a function using library list?
Or maybe I'm doing something wrong?

TIA,
Jevgeni Astanovski
IT support department manager
Sampo pank.
Tallinn, Estonia. 


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-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 [javascript protected email address].

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