|
OK, I need to get this straight. When we call a ILE rpg program we don't
work with this array directly do we? The values are put into the parms of
the PEP. Is that right? I'm guessing that the call to the PEP is an internal
bound call so it would work in the same way as a bound subprocedure call.
Are there differences between the way parms are passed during a call to the
PEP and during a call to a subprocedure?
From this I would infer that passing long strings by value when there is alength mismatch will involve two copies of the data being made. The first a
simply blind copy of the original data and the second used in casting to
match the definition on the PR. For passing by constant reference only the
second (casting) copy will be made. If the passed variable is much larger
than that defined on the PR then the first copy in unnecessarily expensive
as the second (casting) copy would simply truncate the data.
If the variable is an exact match to the PR definition then passing by value
would still involve a complete copy being made, but passing by constant
reference would not because the original would be used and protected from
changes.
Finally, how does %parms work in these cases? I assumed that %parms was
simply a count of the elements in the array of pointers. If the parameters
are passed individually in bound calls then there is no array and no element
count. So is %parms literally the number of parms passed, taking into
account of *OMIT being a passed parm and *NOPASS not? Is this the same for
the PEP too?
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.