>My rule of thumb: ALWAYS add the AGAIN clause when you USE a table. No drawbacks, only advantages, as far as I know. My opinion is that with SET EXCLUSIVE OFF, the AGAIN word should be implisit/redundant.
I think there are some drawbacks to this approach.
One case which generates the "File in use" error is opening the file, doing some stuff which moves to a different workarea, and then trying to open the file without having closed the first one.
Another, and more likely for me, is that a SQL SELECT statement opened a table and I closed the cursor, but forgot about the tables used to generate the cursor.
In either case, when you USE the file with the AGAIN clause, the file will open,
but it won't have the alias you expect. This could lead to some very unpleasant results when you later select by the alias name. For example
CLOSE TABLES ALL
SELECT activity.field,order.otherfield ;
FROM activity,order;
WHRERE activity.keyfield = order.keyfield;
INTO CURSOR myCursor
USE IN myCursor
SELECT 0
USE activity AGAIN
LOCATE FOR some condition
SELECT activity
You are now in the workarea opened by the SQL statement, not your USE command. You can imagine the results. Of course you could
USE activity AGAIN ALIAS activity
but then you get an "Alias in Use" error and you're back where you started.
Your framework/coding techniques minimize the risks but those of us with less rigorous work habits could get bitten.