<<
An interesting concept.  You might consider using ITEMCNT
function to get number of columns to process and you could then
make the loop a definitive one.
>>

Either way -- you'll loop as many times -- and I have this technique from 
before ITEMCNT was in the language!

<<
So I need the complete OLD record in
variables for the INSERT command.  From my programming point of
view I try to minimize loops where ever possible.  
>>

I've done this too -- you can build the parts of the INSERT command as you loop 
through the columns.

<<
>From your code I assume all of you columns are the same data
type since you don't have a SET VAR command to set the variable
data type.  In my case I have diverse data types in the record
TEXT, INTEGER
>>

No, I always run with WHILEOPT off, and I simply clear and recreate the 
variables directly from the record data as needed -- they pick up the correct 
type that way.  The code I posted before was recreated from memory -- the 
actual code is a bit longer and loaded up with error checking and things like 
that.
--
Larr


Reply via email to