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



----- Original Message -----
From: "Scott Klement" <klemscot@xxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, November 26, 2003 1:32 AM
Subject: Re: Low performance on varying length field

Hello Scott!


>     2) 65537 bytes of memory allocated for #RtnStr variable.

I thought, that this would be done at program initialization of the calling
procedure lately???

>     4) 65537 bytes of data are copied from #RtnStr to the caller's

Why that?? When the storage for the return value is allocated before the
procedure is called and only a few characters have to be returned?

I've debugged the calling procedure and set #str1 to a larger string then
the test-string before my procedure was called. After returning from
procedure 2 displaying field str1#  in hex-mode shows, that only bytes in
length of the return-string are overwritten instead if 65535 bytes...

And....using a RPG builtin-function with long varying length fields doesn't
need so much time to perform.

T. Kruse



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.