Focal Point
How do i clear the contents of a hold file

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

June 16, 2005, 05:02 PM
<mjdeaver>
How do i clear the contents of a hold file
I need to know how to clear the contents of a hold file.
June 16, 2005, 07:25 PM
dhagen
By default, in webfocus, the hold file will be removed after the webfocus report is finished executing. Also, if this is a permanent file, the next time you run the hold command, it will overright the current file.

Or, you can just delete it with an operating system command.

-* Unix
!rm /path/file.ftm

-* Win
!del C:\path\file.ftm
June 22, 2005, 01:22 AM
Piipster
If you are using the APP HOLD technique you can also use

APP DELETEFILE app1 filename filetype

where filetype is one of

FOCUS - .FOC
MASTER - .MAS
ACCESS - .ACX
FOCEXEC - .FEX
MAINTAIN - .MNT
FOCSTYLE- .STY
HTML - .HTM
GIF - .GIF
FOCTEMP - .FTM
DATA - .DAT
June 22, 2005, 02:55 PM
slfmr
The way I have done it is:

DEFINE FILE HOLDFILENAME CLEAR
END

For files that use the same name and are compounded one after the other so that it clears once that report is created.

Does that help?
June 24, 2005, 03:40 PM
susannah
is your HOLD file in your agent and you want to make sure it is empty as you move from one part of your procedure to another part? eg, you want to avoid table file hold on the wrong hold file in the event that some error has occured?? If so,

CMD ERASE HOLD.*

will delete the hold.ftm and the hold.mas from within the agent, as the agent is on top of the path. ( i use edapath, not apppath); CMD is the dos escape that works for me, i'm in windows server.
If, for some reason, you need the full path of your HOLD file within your agent, do the following:
-SET &MYPATH = TEMPPATH(40,'A40');
-SET &AL = ARGLEN(40,&MYPATH,'I2') -1 ;
-SET &LAL ='A'|&AL;
-SET &MYPATH = SUBSTR(40,&MYPATH,1,&AL,&AL,'&LAL');
-SET &MYFILE = &MYPATH | '\HOLD.*';
then
CMD ERASE &MYFILE