PARADATA (CONCAT) keeps files open
Posted: June 27th, 2021, 10:45 pm
Dear CSPRO users,
I have an entry application that concats some paradata files, using paradata(concat, ....), but I need to replace the concatenated paradata files with new ones. The issue is that looks like the paradata(concat,...) function keeps open all the files after the concatenation, so I can not replace or delete them. Just to show the problem I wrote this basic program:
PROC GLOBAL
PROC PARADATATEST_DIC_FF
PROC BUTTOM
if $ = 0 then
stop(-1);
endif;
paradata(concat,"paradata3.cslog","paradata1.cslog","paradata2.cslog");
if !filedelete("paradata1.cslog") then
errmsg("paradata1.cslog can not be deleted");
endif;
reenter;
The paradata1.cslog file can not be deleted because the paradata(concat,..) keeps it open. I am attaching this program to replicate the problem.
Kind regards
Harry Hernandez
I have an entry application that concats some paradata files, using paradata(concat, ....), but I need to replace the concatenated paradata files with new ones. The issue is that looks like the paradata(concat,...) function keeps open all the files after the concatenation, so I can not replace or delete them. Just to show the problem I wrote this basic program:
PROC GLOBAL
PROC PARADATATEST_DIC_FF
PROC BUTTOM
if $ = 0 then
stop(-1);
endif;
paradata(concat,"paradata3.cslog","paradata1.cslog","paradata2.cslog");
if !filedelete("paradata1.cslog") then
errmsg("paradata1.cslog can not be deleted");
endif;
reenter;
The paradata1.cslog file can not be deleted because the paradata(concat,..) keeps it open. I am attaching this program to replicate the problem.
Kind regards
Harry Hernandez