Focal Point
[SOLVED] Force Focus to create a new focus file

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

August 20, 2012, 04:33 AM
ChristianP
[SOLVED] Force Focus to create a new focus file
Hi Focals,
In my actual project i use focus files as a temporary data source. How can i force WEBFocus to create always a new focus file. In the first run with a big select i got nearly a 2 GB focus file. With a small select with only some rows in the output, the focus file is still 2 GB big.

Greetings

Christian

This message has been edited. Last edited by: ChristianP,


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
August 20, 2012, 05:19 AM
Dave
Hi Christian,

Where is the file stored?
On a RDMS I guess?
Depending on your RDMS the size of a file will only become smaller after a 'reorganize' ( or whatever your RDMS calls it ).

The file is not deleted. Because that takes a lot of time ( performance ). So instead of deleting it, it just marks the rows als 'deleted'. But it still uses the full 2 GB.

I guess when it's a temporary data source it will be removed after the procedure is completed.


Greets ( grĂ¼sse ), Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
August 20, 2012, 05:37 AM
ChristianP
Hi Dave,
the file is located on EDASERVE in the folder of the master files. Which command do i have to use to delete the file after the fex is ready. I point to the Folder with APP HOLD XXXX.

heel hartelijk bedankt


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
August 20, 2012, 08:12 AM
Twanette
Hi,
You could perhaps use the APP DELETEFILE command. This will mean that the FOCUS DB is stored in an accessible APPS folder.
The syntax is:
APP DELETEFILE app_dir filename FOCUS
Where "app" is the application directory, and "filename" is the FOCUS DB file name.


WebFOCUS 8.2.06 mostly Windows Server
August 20, 2012, 10:44 AM
GamP
The size of the file doesn't really matter that much. If the file is re-used by means of a ON TABLE HOLD AS xxx FORMAT FOCUS (or even with CREATE FILE) then the file will be erased internally and will recieve a new contents. The file size will not change, however. If that is a problem, then use Twanette's solution.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 20, 2012, 05:32 PM
Waz
Its always safer to delete prior to creating. Even if its just for space reasons.

You wouldn't want the create to fail and then report from the previous file.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 21, 2012, 09:11 AM
jgelona
Unless you have a DATASET parameter in your master, if you use the CREATE FILE command a new FOCUS file is alway created in the execution folder under edatemp. I have a job that grabs data from about 60 Oracle tables and builds a FOCUS file for adhoc reporting. This job runs at 2:30am and takes about 30 minutes to run. While the job runs, the new FOCUS file is in the temp folder for the ageent in edatemp and the previous file and the master are in baseapp. When the job finishes I do a Unix move (mv) command like this:

-UNIX mv filename.foc &APPROOT/baseapp


If anyone happens to run something while the file is being created, they get the data from the previous file in baseapp.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
August 21, 2012, 09:26 AM
MAdams1
quote:
Originally posted by Twanette:

The syntax is:
APP DELETEFILE app_dir filename FOCUS
Where "app" is the application directory, and "filename" is the FOCUS DB file name.


I couldn't get this to work, however, this does work;
APP DELETEF app_dir filename FOCUS
(FOCUS being the format of the hold file)

@Waz
I agree that deleting prior to recreating a hold file is a good best practice. So thanks for the idea and I have just incorporated this into one of our automated processes.

I love Focal Point, I learn so much.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
August 22, 2012, 12:33 PM
susannah
what about the USE (and/or CREATE) commands?
USE
appname/filename.foc NEW
END
wipes out the original before your fex creates the new one.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 22, 2012, 05:48 PM
Waz
quote:
wipes out the original before your fex creates the new one


Does it also free the space ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 24, 2012, 06:51 AM
ChristianP
Hi Focals,

thanks for the big range of help!!! Iuse the
quote:
APP DELETEF app_dir filename FOCUS

command and it works!!

Greetings

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT