Thanks Barbara and Elvis..

I agree about the switch statement that you outlined at
first glance it might not be the most elegant but given the
other alternatives (MI and resolving system pointers) it is
the most practical.

thanks for the help

On Wed, 11 Jun 2003 15:10:21 -0400
 Barbara Morris <bmorris@xxxxxxxxxx> wrote:
Glen Marchesani wrote:
> Hello,
> I am looking for a C/MI api that lets me call a program
> (library and program name are variable) with a variable
> of parameters.

I don't know of any way to do this except by coding N+1
calls where N is
the maximum number of parameters.  A bit icky to set up but
once you
have it set up, you're done.  You don't have to do
something extra for
each new number-of-parms-sensitive program that comes up.
 (With your
current method of wrappering APIs, you might have to have
more than one
wrapper per API, or at least more than one call per API.)

Handling the variable library and program name is easy in
supports a variable for both CALL and for the EXTPGM
keyword of
prototypes.  In C and I think in MI, you have to call
rslvsp for to get
the library and program pointers (there's also some special
required for QTEMP).

This is the C programming iSeries / AS400 (C400-L) mailing
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

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