I am looking for a C/MI api that lets me call a program
(library and program name are variable) with a variable set
of parameters.

I have a client server app where the server is an AS400 ILE
C program.  The program allows a remote program call.  The
client passes the library and program to call with the
paremeter types (input, output, both), length and data if
it is (input or both).  It then calls the program passing
the parameters and allocating the appropriate memory for
each parm.  When the call is complete it takes the
parameters and passes the output and both parms back to the

I am currently calling an RPG program to do the actual
call.  Here is the code 

c                   call(e)   program                   
c                   parm                    parm01      
c                   parm                    parm02      
c                   parm                    parm03      
c                   parm                    parm98      
c                   parm                    parm99      

where parm01..parm99 are based on pointers.  It is *UGLY
but it works.  Well not completely.  It doesn't work for
CLP because the init of CLP sees 100 parms being passed and
some IBM api's also have this feature (for lack of a better
word).  Which means for each CLP and IBM api I wrap the
call in an RPG program that calls the CLP/IBM api with the
correct parms.

look forward to hearing everyone's cleverness,

with a smile,

PS I know that there are as400 servers that could do this
for me but for architectural reasons they are not an option
as this server needs to be easily proxied and work inside
an already existing tcp tunneling architecture.

This thread ...


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