[Stackoverflow] [Progress OpenEdge ABL] Data is not being written in csv file

Status
Not open for further replies.
T

Thiru

Guest
I am new to progress 4GL. By using the following program, data is written in a CSV file and exported if I run for the first time. The issue is data is not written in the same CSV file if I run the same program for the second time. CSV file attribute Read-only flag is set to false.

I think it's overwriting but I don't want that. Each time record should be added to the new row in the CSV file. For example, the total record added in CSV is 250. It should start with 251st rows in the CSV file.

OUTPUT TO "C:\Users\temp\data.csv".

EXPORT DELIMITER ";" "CustNum" "Name".
FOR EACH customer NO-LOCK:
EXPORT DELIMITER ";" Cust-Num Name.
END.
OUTPUT CLOSE.

catch e as progress.lang.error:

if e:getMessage(1) = 98 then
message 'please close the file' view-as alert-box.
else
undo, throw e.

end catch.

Continue reading...
 
Status
Not open for further replies.
Top