|
On 09-Dec-2013 10:29 -0800, Vernon Hamberg wrote:-snip-
On 09-Dec-2013 08:31 -0800, Vernon Hamberg wrote:
I'm looking at some code - the purpose is to put the 1st 4 digits<<SNIP>> we're dealing here with things that will never involve
of a 6-digit variable into a 4-digit numeric variable.
It is being done with the MOVEL opcode now.
I'm wondering about efficient alternative methods. One I can think
of is to use a data structure -
dcl-ds dsMoveL qualified;
num4 zoned(4);
num6 zoned(6) pos(1);
end-ds;
Anything simpler? Better performing?
I hope the syntax is right!! But you get the idea, right?
calculations - IDs stored as zoned data types. MOVEL has the
advantage that it's not really a calculation in the sense of an
expression, it's a kind of memory operation, seems to me. <<SNIP>>
Moving the /fixed-format/ code elsewhere, a
subprocedure, to avoid its ugliness remaining inline to the
since-modified to free-format code, might best just code the original
MOVEL and be done with it.? It all depends of course, on what the code
really *needs* to do to make everything work, while avoiding any
unnecessary breakage; however /broken/ might be defined :-)
http://archive.midrange.com/rpg400-l/201308/msg00134.html
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.