On 09 Sep 2013 06:09, John Mathew wrote:
Can some please explain what performance steps generally follow while
coding in RPG400 and RPG IV. I had to do some performance tuning on
the existing programs. <<SNIP>>
Aside from language [thus making the discussion on-topic], and
probably of more general importance, is to code in a manner such that
the work is performed _efficiently_ on the OS where the code runs. In
the case of the object-based IBM i OS, minimize object create\delete.
In the case of the single-level-storage of the IBM i OS, tend toward one
copy of anything; i.e. the original. And for any OS, minimize
data-movement and copy. Of course some attempts to be efficient for the
sake of performance are incompatible with good coding practices; e.g.
often it is better to use a copy of data vs the original data in
parameters, in order to avoid the called program having addressability
to the original data, so as to prevent the called program from
corrupting storage in the calling program.