Focal Point
[SOLVED] FOCCACHE location

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

January 04, 2012, 02:52 PM
Prince Joseph
[SOLVED] FOCCACHE location
Is there any way to get the actual path to the foccache folder which is created when a procedure is running? I understand that it is located in edatemp and I can reference anything from it by using 'FOCCACHE/FILENAME' but I have to run a dos command to execute a batch file which is in FOCCACHE and so I need the full path. Any help is appreciated.

Thanks,
Prince

This message has been edited. Last edited by: Prince Joseph,


Webfocus 8, All Outputs

January 04, 2012, 03:59 PM
Waz
Here is a technique that should get the location.

TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD AS FOCCACHE/FC_CTRY
END

SQLFMI SET SYSFILES MASTER

TABLE FILE SYSFILES
PRINT *
WHERE FILENAME EQ 'fc_ctry'
END


SYSFILES will give the location of the file type, in this case MASTER file. Other types are supported.

If you know that a file exists in FOCCACHE, then this should work.

I have seen a limit with the number of characters stored in the location though. So if its a long path and or loing name, there may be issues.


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!

January 05, 2012, 10:27 AM
Prince Joseph
That works great. Thanks!


Webfocus 8, All Outputs

April 07, 2013, 10:07 AM
Twanette
Darn, this technique no longer works in WF 8.0.01 gen 705.
I have logged a HOTTRACK case. Perhaps 8.0 has a more direct solution.


WebFOCUS 8.2.06 mostly Windows Server
April 07, 2013, 06:22 PM
Waz
Is it still defined the same way in 8 ?

7.7 doco says:

foccache_dir = operating system specific pathname
Internal default: /edatemp
It defines the location of Foccache.


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!

April 08, 2013, 08:25 AM
Alex
[...]ibi\srv80\wfs\edatemp\foccache


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
April 09, 2013, 10:42 AM
Twanette
In 7.7 we used SYSFILES to get the full path name to the sub-directory of FOCCACHE for that session.
In 8.0.01 PHNAME just contains e.g. foccache/fc_ctry.mas


WebFOCUS 8.2.06 mostly Windows Server
April 09, 2013, 05:44 PM
Waz
Twanette, let us know if IBI has a solution.

You are in the box seat with an installation of WF8.


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!

April 18, 2013, 06:05 AM
Twanette
Hi everyone,
Just an update.
What I have been able to determine is that the change in behaviour in fact has to do with SYSFILES, and is not necessarily restricted to FOCCACHE.
In 8.0.01 and 8.0.02 the PHNAME field of SYSFILES contains the appname/filename, and not the Physical File name as it did previously.
I will keep you posted ;-)


WebFOCUS 8.2.06 mostly Windows Server
April 28, 2013, 05:43 PM
Waz
Hoping there is a SET command to revert it back.


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!

January 27, 2014, 10:28 AM
David Briars
Twanette-

As you indicate, in WF 8, PHNAME contains app/filename, as
APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
PRINT *
ON TABLE HOLD AS FOCCACHE/HLDSALES
END
-RUN
TABLE FILE SYSFILES
PRINT FILENAME
      PHNAME
IF FILENAME EQ hldsales
END  
Yields:
PAGE 1 
 
FILENAME PHNAME 
hldsales foccache/hldsales.mas  

Did you ever determine if there is a way to obtain the full path name in WF 8, like there was in WF 7?

-Dave

This message has been edited. Last edited by: David Briars,
January 27, 2014, 03:17 PM
David Briars
APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
PRINT *
ON TABLE HOLD AS FOCCACHE/HLDSALES
END
-RUN
WHENCE HLDSALES MASTER
? PATH  
-EXIT 

WHENCE and ? PATH seem to provide the full path name for FOCCACHE, but how to get the results into an amper variable, rather than a display?
January 27, 2014, 04:06 PM
Tom Flynn
Search on TEMPDIR


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 28, 2014, 11:45 AM
dhagen
Until the problem gets fixed, this will work:

-DEFAULTH &APPLOC = ' '
-* put a file in the foccache
TABLE FILE CAR PRINT *
ON TABLE HOLD AS FOCCACHE/TOUT FORMAT ALPHA
END
-RUN
 
TABLEF FILE _EDAHOME/CATALOG/SYSAPPS 
-* apploc is the fully qualified directory name
PRINT APPLOC
WHERE FNAME EQ 'tout';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TDIRNAME
END
-RUN
-READFILE TDIRNAME
-TYPE Dir is &APPLOC  



"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
February 11, 2014, 05:18 PM
David Briars
Thanks dhagen!

Indeed _EDAHOME/CATALOG/SYSAPPS.APPLOC contains the full path name for the FOCCACHE file in question in WF 8.0.06.