Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 3 procedures 1 dashboard
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] 3 procedures 1 dashboard
 Login/Join
 
Platinum Member
posted
Hi All,

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,


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hi Shingles

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: 1594 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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?


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Guru
posted Hide Post
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.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 263 | Registered: October 10, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
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: 86 | Location: MI | Registered: July 23, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Shingles

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: 1594 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 138 | Registered: October 19, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks dbeagen,
I was talking to an IBI consultant about this (it sort of came up) and he suggested doing something like. I like this approach.

Thanks!


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
quote:
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.

The HOLD file is dependent on user interaction.


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Member
posted Hide Post
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.


WebFOCUS 8.2.01M
Windows, All Outputs
 
Posts: 10 | Registered: July 20, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
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.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3013 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:

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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
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: 3013 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
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.


WebFOCUS 8.
Windows, All Outputs
 
Posts: 539 | Registered: June 28, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hey Folks,

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.

Any tips?


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Does PROC1 data depend on user selection ?

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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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.


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 158 | Registered: May 19, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 3 procedures 1 dashboard

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.