Hi Guy
Here is an old piece of code that still works for me today in 19.1... Maybe it will look familiar to your 2.3 days
Code:
Get Seq_New_Channel to iChannel
direct_input Channel iChannel sFile
move '' to sStatus
repeat
read sCode
read nQty
send update_StatusPanel to (Status_Panel(self)) ('Updating ... '+(string(sCode)))
//if ((sCode<>'') and (nQty<>0)) begin //REMMED 2.1.57
if ((sCode<>'')) begin
clear ICITEMS
move sCode to ICITEMS.CODE
find eq ICITEMS by index.1
[found] begin
clear ICLOCQTY
move ICITEMS.SERIAL_# to ICLOCQTY.ITEM
move sLoc to ICLOCQTY.LOCATION
find eq ICLOCQTY by index.1
[found] begin
//DO NOTHING
end
[not found] begin
clear ICLOCQTY
reread
Move ICITEMS.SERIAL_# to ICLOCQTY.ITEM
Move sLoc to ICLocQty.Location
saverecord ICLOCQTY
unlock
end
If (iAddType<>2) If ((nQty-ICLOCQTY.QTY_ON_HAND)<>0) Send AdjICCount Icitems.Code (nQty-ICLocQty.Qty_On_Hand)
Else Send AdjICCount Icitems.Code nQty
end
end
readln
until [seqeof]
Close_Input channel iChannel
Send Seq_Release_Channel iChannel
As others have said, the problem with CSV is handling embedded commas which is some cases can be a problem but mostly Carriage Returns which really make CSV a limited medium for data exchange.
Mike