Focal Point
[CLOSED] Check Free spaces in Focus Table

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

November 18, 2011, 07:01 AM
Poryes
[CLOSED] Check Free spaces in Focus Table
Hi All -

How to check the free spaces available in focus table?
How to check the spaces utilized?

Please let me know, Is there any way or formula available.

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


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
November 18, 2011, 12:21 PM
Ian Dalton
? FILE XXXXX will tell you the no. of pages used and then multiply by 4k to get space needed. REBUILD REBUILD will clear out the deleted pages.


_______________________
*** WebFOCUS 8.1.05M ***
November 20, 2011, 04:07 PM
Waz
As the FOCUS DB is just a file, space available will be the free disk space/FOCUS DB limit ations.

You could also check the file size with this query.

This assumes the FOCUS file is in the path.
SQL FMI SET SYSFILES FOCUS
TABLE FILE SYSFILES
PRINT FILENAME SIZE
END



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!

November 21, 2011, 03:58 AM
Wep5622
The file size is not necessarily equal to the focus DB size.
For example, if you write a table file of about 1k out to a pre-existing hold file of 2 GB, then your hold file will stay that size, but hardly any of the file gets used (just that 1k at the start).

Ian's answer gets you the DB size (1k in above example), while Waz's answer gets you the actual file size (2 GB).

It would be cool to be able to report on these. Is there a way to make the result of "? FILE xxx" available to FOCUS? I assume there's a FOCUS command under the hood somewhere in there?

Unfortunately, there doesn't appear to be a command to just trim the fat off the large file. If you want to reduce it to its minimum required size, you'll have to either REBUILD it or delete and recreate it.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 24, 2011, 07:31 AM
Poryes
Thanks Ian/Waz/Wep.

I tried with ? FILE XXXXX. Got the below details.

DDNAME = FDBA111
DSNAME = FDB.BASE111.FOCUS
DISP = SHR
DEVICE = DISK
VOLSER = OCBL76
DSORG = PS
RECFM = F
SECONDARY = 180000
ALLOCATION = BLOCKS
BLKSIZE = 4096
LRECL = 4096
TRKTOT = 9240
EXTENTSUSED = 1
BLKSPERTRK = 12
TRKSPERCYL = 15
CYLSPERDISK = 10017
BLKSWRITTEN = 110748
FOCUSPAGES = 110743

Do I need to multiply the focuspages 110743 with 4K? ie 110743x4 = 442972

correct me if I'm wrong...


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
November 24, 2011, 07:47 AM
Ian Dalton
Yes that's right so your actual space requirements are 453,603,328 bytes or as it says 110,748 blocks (equates to 9,299 tracks or 615 cylinders) - so best to have all this as primary and say 25 cyls secondary. I see you are on the first extent only so that's OK.


_______________________
*** WebFOCUS 8.1.05M ***
November 26, 2011, 11:45 AM
Dan Satchell
If you are in an MVS environment, tbe following command will place file attribute info from the ? TSO ddname command into Dialogue Manager variables. The Dialogue Manager variables will have the same names as the attribute names returned by the ? TSO DDNAME command (i.e., &DDNAME, &DSNAME, &DISP, &DEVICE, &VOLSER, &DSORG, &RECFM, &SECONDARY, &ALLOCATION, &BLKSIZE, &LRECL, &TRKTOT, &EXTENTSUSED, &BLKSPERTRK, &TRKSPERCYL, &CYLSPERDISK, &BLKSWRITTEN, &FOCUSPAGES).

-? TSO DDNAME ddname



WebFOCUS 7.7.05