0 votes
by ProFrame (120 points)
First an description of my problem:
1) a directory contains 200 data-files like: .......\PR1140-0265.fth
2) to process the data-files with the main program takes 20min.
    ( I use the command: "included" to read the data-files, afterwards I delete the file, also it takes 200 sessions,)
3) to process the data-files quicker, I start then main program (copies of it) separately 4 times and run it with  an interval with about 1 second. When no error occur, it takes now 8 min.
4) But there are moments that an error occurs like:  Err# -258 ERR: Failed to open requested file.
5) 1 of the 4, is busy (say 1)  to included a file, but not deleted it yet. (this is done direct after including)
6) Another (2 or 3 or 4) sees the file of 5) still exists (with use of command "fileexist?" ) and also try to include it.
7) That's the moment, in my opinion, the error occurs and the program crashed.
Unfortunately "included" gives no flag back, in that case the solution for me would than easier for me.
Can you give me a solution for this problem, or define a word like "included" which give a success-flag back?
with regards,
Hugo Overbeek

1 Answer

0 votes
by Stephen Pelc (1.1k points)

The source code for INCLUDED is in Kernel/Common/kernel62.fth.

I'm sorry that I cannot provide you with a tested answer, but I am in the middle of moving house for the next week or so.

What I suggest is that you use
  ['] included catch
which will return the error code to you, 0 for success.