As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I've got a scenario where I have multiple procedures in a single dashboard. They all use the same HOLD file, but not really... You see they each compute the same hold file (I copied and pasted the code to create the HOLD file into each procedure). I have to think that this is not efficient.
There must be a way where I can compute the HOLD file once, and then all the other procedures within the dashboard use that same HOLD file (so they don't calculate it as well).
In case this is important, I also have an HTML file where I have the prompt/parameter selections.This message has been edited. Last edited by: FP Mod Chuck,
One option you may consider is to use InfoAssist to create the reports in a document. The first report can create the HOLD file and then the rest of the reports can use that same hold file for reporting. You can apply where filters that prompt for parameters and once you save it you can use app studio to create a html file to run it.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
Hey Chuck, Thanks for the response. I was thinking of doing exactly that. However, its not working. Like, what exactly is the 'first' report anyhow?
I tried taking out the bit of code that creates the HOLD file in all the procedures, except for the 'first' one. But when I run it, the other procedures don't find the HOLD file. Is there a path I need to use to find the HOLD file. Or perhaps I'm supposed to use some specific syntax when creating the HOLD file?
Shingles, You could create a separate fex that only creates your hold file. Then using javascript run it. Your dashboard would need to have the other reports set to not be automatically run. Once your creation fex is done then using javascript you can kick off the others.
I just built a dashboard with multiple pages, and used this approach. A single report on the first page creates the hold file (saved to FOCCACHE), and then all the other reports are on separate pages, so that they run later, when the page is visited.
- Rob
WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
Posts: 88 | Location: MI | Registered: July 23, 2009
When you start an InfoAssist report you create the content you want in the hold file and then choose the File button which creates the hold file. After that the hold file is what is displayed to choose the content for the remaining reports. I think you need to start from scratch for this to work.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
You could have a procedure like this which checks for or creates the HOLD file.
rephold0.fex
APP HOLD foccache
FILEDEF repdata DISK foccache/repdata.ftm
STATE foccache/repdata.ftm
-RUN
-IF &RETCODE EQ 0 THEN GOTO Done;
TABLE FILE ggsales
SUM UNITS DOLLARS
COMPUTE TimeStamp/A8 = '&TOD';
BY REGION BY ST
BY CATEGORY BY PCD
ON TABLE HOLD AS repdata
END
-Done
Each report just needs to -INCLUDE the above. The include assumes rephold0.fex is in the Public domain.
rephold1.fex
-INCLUDE IBFS:/WFC/Repository/Public/rephold0.fex
SET PAGE=NOLEAD,STYLE=ENDEFLT
TABLE FILE repdata
SUM UNITS DOLLARS TimeStamp
BY REGION BY ST
END
rephold2.fex
-INCLUDE IBFS:/WFC/Repository/Public/rephold0.fex
SET PAGE=NOLEAD,STYLE=ENDEFLT
TABLE FILE repdata
SUM UNITS DOLLARS TimeStamp
BY CATEGORY BY PCD
END
WebFOCUS 8.2.06
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010
dbeagan, this is the solution when you don't care to extract data from DB several times. Shingles is looking for a solution that will generates the data only once to be then reused multiple times.
Shingles, does you HOLD file (extracted data) can be processed from a batch or does it depend on user's selection ? Is there any manner where you can extract the core data and perform the COMPUTEs in a batch, HOLD the file then have the dashboard/report use the HOLD file to apply filters ? In other words : create a kind of DataMart to be used be your dashboard.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Originally posted by MartinY: dbeagan, this is the solution when you don't care to extract data from DB several times. Shingles is looking for a solution that will generates the data only once to be then reused multiple times.
Shingles, does you HOLD file (extracted data) can be processed from a batch or does it depend on user's selection ? Is there any manner where you can extract the core data and perform the COMPUTEs in a batch, HOLD the file then have the dashboard/report use the HOLD file to apply filters ? In other words : create a kind of DataMart to be used be your dashboard.
This is how I see this working (I'm using pseudo code, so the syntax is not right)...
proc01.fex
-IF FOCCACHE/CAR_SALES.EXISTS EQ 1 GOTO :DATA_EXTRACT;
TABLE FILE CAR
SUM SALES
ON TABLE HOLD AS FOCCACHE/CAR_SALES
END
-:DATA_EXTRACT
proc02.fex
-INCLUDE proc01.fex
TABLE FILE FOCCACHE/CAR_SALES
PRINT *
END
proc03.fex
-INCLUDE proc01.fex
TABLE FILE FOCCACHE/CAR_SALES
PRINT *
END
So every time the procs are run, they will check if the HOLD file exists. If they exist, then great, just use it and don't query the DB. If it doesn't then generate the HOLD file. Will this not work? I haven't had the chance to test 'cause I'm working on more pressing things at the moment.
You could create a compound document that calls the three report. Save it then edit it using text editor and create the hold file before you see the code that creates the compound document.
Or, that "compound document that calls the three reports" can contain an initial fex which creates only the hold file (no report). Or you can create a fex which creates the hold file and -INCLUDE it in the first report to accomplish the same result.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
So every time the procs are run, they will check if the HOLD file exists. If they exist, then great, just use it and don't query the DB. If it doesn't then generate the HOLD file.
The above is true for a certain period of time. Files in FOCCACHE are cleared automatically by the system. This is something configured in the client setting. If I remember well it's the "IBI_Cache_Effective_Policy_Duration".
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Or, you can use the APP HOLDMETA / APP HOLDDATA command if you want o make these permanent hold files. If you do that, you need to ensure that they have significant file names that no one else will be using them as they will either get or overwrite your files. These commands work with "ON TABLE HOLD AS [filaname] FORMAT FOCUS".
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
not sure this helps but we have designed our stuff to have two buttons on a given tab. The first, using whatever filtering is appropriate generates the data into a Hold file; Format Focus--- so it hangs around. Then other button/s may be pressed that go againstt the hold file.
So I'm resurrecting this thread... I'm using some of what what discussed here but I'm hitting a wall.
Consider a dashboard made up of several fex files. PROC1.fex and PROC2.fex are each in their own panels on the dashboard. PROC1 is quite big and complicated and does quite a bit of processing. PROC2 just needs to report some summary data that PROC1 already calculates.
At the end of PROC1 I create a FOCCACHE HOLD file, let's call it FOCCACHE/HOLD_ME.
I've been able to get PROC2 to use FOCCACHE/HOLD_ME (great success), but the problem I'm having is that PROC1 takes much longer to execute. So PROC2 only shows summary data for PROC1's previous execution... they are out of synch.
Is there a way to run PROC2 only after PROC1 updates the FOCCACHE/HOLD_ME file?
I've tried using global variables, but we can't manipulate global variables (am I wrong?)... so really they should be called constants.
I've tried adding a boolean field in the HOLD_ME file that could be used to tell PROC2 when HOLD_ME has been updated, but that ain't working either. I can't remember what the hold up was there to be honest.
If not, one thing you can do is to have PROC1 data built over night using RC. That way the data will also be available for PROC2. If your data may change during the day, you can have your schedule ran multiple time per day and then have your dashboard with an auto-refresh.
Probably several possible options, but since we don't have the whole specs difficult to provide a complete solution. Reading back the original treads you have several options discussed.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thanks for the reply MartinY. That approach won't work though. Users have several parameters that they can change and the submit. With the approach that you have provided, PROC2 will still show summary data for PROC1's previous execution.
If none of the above previously given suggestions works, you may have to reconsider the way your dashboard is built.
Another solution (which is what you are trying to avoid, and sometime we don't have choice) is to also have PROC2 performing the same extraction as PROC1 and not relying on PROC1 result. It will result of querying twice the BD and takes longer time to process, but at least both reports will display the proper result based on user selection.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013