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



JJW wrote:
> We recently had IBM do an analysis of some of our most
> used programs in terms of CPU usage.  One of the things
> they mentioned was that %trim was a big user of CPU.  Has
> anyone heard this about %trim before?

%TRIM() works by looping through the character value looking for the
first and last non-blank characters in the string.  If your program
makes heavy use of %TRIM() and long fixed length character strings,
it is certainly likely that a lot of CPU time will be spent there.
Whether or not that is significant depends on other things happening
in the program.

Generally, whenever a program makes heavy use of %TRIM(), you
probably should be using varying length character variables instead.
%TRIM() is often used just to find the length of significant strings
within fixed length character variables.  For varying length
variables, the length is maintained as part of the value, and so the
length does not have to be continually re-computed.

Hans





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.