|
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 set > 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 RPG - RPG 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 handling required for QTEMP). _______________________________________________ This is the C programming iSeries / AS400 (C400-L) mailing list To post a message email: C400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/c400-l or email: C400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/c400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.