|
Duane, Unfortunately, you can't always assume that a procedure's parameters are always sequential. However, see this thread, which explains what you can do with the NPM_PARMLIST() MI builtin. http://www.systeminetwork.com/isnetforums/showthread.php?t=45802 (look at message #14 onwards). With this builtin, you can process parameters in an argc/argv way. There are several code samples that Scott and I each added. Although it essentially discusses CONST parameters, you can process VALUE parameters, but it's a little more tricky, since you'd need to retrieve the data itself from the returned Argument field (using natural padding to determine the start/end of each parameter). Regards, Rory On 12/18/06, Christen, Duane J. <dchristen@xxxxxxxxxxxxx> wrote:
I am trying to build a procedure which will concatinate several parameters and return one string. I have made the assumption that a procedure's parameter pointers (passed by value) are stored sequentially in memory. This looks to be as true in RPGIV as it is in C, (argv) so I set my array's basing pointer to the address of the first parameter, the array elements each contain the same address as the corrisponding parameter, as I would expect, but I am only able to access the first parameter's data through the array either in the compiled code or with the debugger. The code is at: http://code.midrange.com/index.php?id=9356ecdb93 How do I work around this? Is there a way to process parameters as a list in RPGIV, rather than individually? Duane Christen NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-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.