Focal Point
Clear APP HOLD at end of FEX??? APP UNHOLD?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6921018331

November 16, 2004, 06:47 PM
<NorthNone>
Clear APP HOLD at end of FEX??? APP UNHOLD?
Thanks for stopping by to read my question...
We're converting from FOCUS to WEBFOCUS (NT server). Some of our longer FEXes (using APP HOLD) create many temporary .mas, .foc and .ftm files. These files are used to create the final file which usually is FTP'd to another server.
When the FEX is done, we are writing a LOT of code to delete the temporary .mas, .foc and .ftm files.
PLEASE...is there an APP UNHOLD that will wipe out any temp files created by a particular FEX as it closes?
We don't want to just leave them out there.
We don't want to Del *.* because another process might have written something out there in the meantime.
Help GRATEFULLY received. Thanks for your time.
JSouth
November 16, 2004, 07:03 PM
suzy_smith
Just

APP HOLD

on a line all by itself will clear the APP HOLD that points to a specific spot.
November 16, 2004, 07:27 PM
<Pietro De Santis>
But this most likely does not delete the files.

Why do an APP HOLD at all? If the same FEX is doing all the work, why not just have a FILDEF for the last file that is FTP'd?

Am I missing something?
November 16, 2004, 07:28 PM
<NorthNone>
Suzy - thanks for taking time to reply :-)
Unfortunately that did not delete the already created temporary files when I tried it, it just stops additional ones from being created in that location.
Any other ideas?
November 16, 2004, 07:39 PM
<NorthNone>
Pietro, well...hmmm...why did I use it...I used APP HOLD because I was told to. I took it out and found that much of the FEX still worked.
Would you be so kind as to post code showing how to do the FTP with the FILEDEF?
I am MOST grateful for your time and assistance :-)
JSouth
P.S. Without APP HOLD is there a risk that two processes running at the same time could wipe out each others' temp files? Or does WebFocus keep track of which files resulted from which FEX? We automate a lot of these things so it is possible for more than one process to run at the same time.
November 16, 2004, 08:07 PM
<Pietro De Santis>
Not using APP HOLD guarantees that nothing will wipe each other out - each WebFOCUS call runs in it's own temp space - the files disappear automatically, unless you use a SET command to save them.

-SET &TEMPDIR = TEMPPATH(60,'A60');
-SET &FTPFILE = &TEMPDIR || 'FTPFILE.TXT';

FILEDEF FTPFILE DISK &FTPFILE
-RUN

TABLE FILE BLAHBLAH
SUM APPLES
BY ORANGES
ON TABLE SAVE AS FTPFILE
END
-RUN

I'm not sure of the FTP command syntax, but it would be executed next.

I hope this helps.
November 16, 2004, 08:10 PM
<NorthNone>
THANKS! You have been a great help. Just one more (I hope) question - if the main FEX calls (-INCLUDE) another FEX, does it still work correctly?
Again, I am most grateful for your assistance.
JSouth
November 16, 2004, 08:15 PM
<Pietro De Santis>
Absolutely. All -INCLUDE and EX or EXEC are in the same WebFOCUS call.