Page 1 of 1

PARADATA (CONCAT) keeps files open

Posted: June 27th, 2021, 10:45 pm
by Harry
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

Re: PARADATA (CONCAT) keeps files open

Posted: June 28th, 2021, 8:25 am
by Gregory Martin
Thank you for reporting this problem and supplying a nice test application. This is indeed a bug, which I just fixed. The fix will be in CSPro 7.6.2, which we hope to release this week.