× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 13/01/2005, at 10:58 AM, Tony Carolla wrote:

I have created six modules, and then created a service program from
these (my first one YAY!).  I was displaying the service program, and
on the Procedure Exports screen, all of my procedure exportes are
listed, and the 'Argument Optimization' field says *NO.  Now, I am
curious.  The help text speaks of some mysterious way of optimizing
the passing of args to ILE procedures (which I am doing).  All six of
these procedures in the service program receive a single 140 Alpha
parameter, by value.  i.e.

     D CBI_R061        PR                  LikeDS(temp_Box)
     D  ReportLine                  140A   Value

Now, to me, passing 140 bytes to an ILE procedure would be a great
candidate for optimization.  Is there some way, while creating the
module, to specify this optimization is to take place, or to be
attempted?  Is it when I create the service program?

ARGOPT support is compiler specific. C supports it via the #pragma argopt() directive. It optimises parameter passing by trying to keep space pointer parameters and space pointer return values in registers.


I think that C (and possibly its incremental derivative) is the only OS/400 programming language that supports this feature.

Why are you passing string parameters by VALUE? If you're worried about space you should be passing by constant reference using CONST. In general, you should use CONST and avoid VALUE unless the interface you are prototyping requires it (i.e., a C-style interface you have no control over).

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.