If you don't count the loading of the variable length field then you
are right.
However, if the value of the field doesn't change then the length
doesn't either, so you only need to find out the length when it changes.
If you are not loading the variable length field with concatenation,
this is what happens:
varlenfld = %trimr(otherfield)
length = %len(varlenfld)
which is the same as before.
Albert
-----Original Message-----
From: rob@xxxxxxxxx
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Wed, Feb 24, 2010 12:51 pm
Subject: Re: Performance of %LEN(%TRIMR(S))
thank you, but shaving 30% off of a 2 minute string operation that
could
be better alleviated by a variable length string isn't going to give
you
subsecond response time.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Albert York <albertyork@xxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 02/24/2010 02:43 PM
Subject: Re: Performance of %LEN(%TRIMR(S))
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
In my tests, CHECKR performed at least 30% better than %len(%trimr(s))
-----Original Message-----
From: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Wed, Feb 24, 2010 9:53 am
Subject: Performance of %LEN(%TRIMR(S))
I'm investigating a performance issue, and it's looking like we're
taking the biggest hit on a %LEN(%TRIMR(S)) call, where S is 18462
bytes
long.
Any alternatives?
--
JHHL
--
This is the RPG programming on the IBM i / System i (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.
--
This is the RPG programming on the IBM i / System i (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.
--
This is the RPG programming on the IBM i / System i (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.