Focal Point
[CLOSED] FORMAT SQLMSS vs. FORMAT FOCUS vs FORMAT SAME_DB

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

March 04, 2016, 05:11 PM
stur0063
[CLOSED] FORMAT SQLMSS vs. FORMAT FOCUS vs FORMAT SAME_DB
I'd like to save a hold file - that report caster will generate. This will be a summary of YTD earnings - so running this on-demand is pretty slow near the end of the year.


Can someone help me understand what's shaking with SAME_DB?

I did some testing with FORMAT SQLMSS - I understand what's shaking. I see tables created. I'm not sure I like this. But I could use this.

I did some testing with FORMAT FOCUS - I understand what's shaking. I see a foc file created. This may work for what I want.

I ran the test below for SAME_DB. It appears the generation of the hold works. But I have no clue where it is. I don't see it in the database like I thought I would.

When I try and read from it - I get FOC1892 - file not found.

I've looked through the Creating Reports with WebFOCUS language *.pdf - but I'm clearly missing something.

I can't seem to read from it.

In the end - I just want to make sure I understand the HOLD options I have available - so I can make the best call on which one to implement for my YTD company total to speed up a page.

Which method is considered best practice to persist a HOLD?

ENGINE SQLMSS SET DEFAULT_CONNECTION HI2

TABLE FILE CAR
SUM
     CAR.BODY.DEALER_COST
     CAR.BODY.RETAIL_COST
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY
ON TABLE NOTOTAL
ON TABLE HOLD AS JDS_TEST_SDB FORMAT SAME_DB PERSISTENCE PERMANENT
END
-RUN





-*APP SHOWPATH
? HOLD JDS_TEST_SDB
WHENCE JDS_TEST_SDB MASTER


TABLE FILE JDS_TEST_SDB
BY  COUNTRY
BY  DEALER_COST
BY  RETAIL_COST
BY  SALES
WHERE COUNTRY NE 'FRANCE';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

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


webFOCUS 8207.15
WindowsServer 2019
March 04, 2016, 05:12 PM
stur0063
Forgot to include my current error messages:


0 NUMBER OF RECORDS IN TABLE= 18 LINES= 5
0NO HOLD FILE CURRENTLY ACTIVE
(FOC1892) FILE NOT FOUND : JDS_TEST_SDB MASTER
0 ERROR AT OR NEAR LINE 36 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: JDS_TEST_SDB
BYPASSING TO END OF COMMAND


webFOCUS 8207.15
WindowsServer 2019
March 06, 2016, 04:10 PM
Waz
SAME_DB holds the data back to the source DB.

It only works when all sources for the TABLE FILE are the same.

e.g.

All sources in the TABLE FILE are SQLMSS {sql server}

FOCUS will generate the SQL to run on SQL server to create a temporary table and load it with the results of the SQL SELECT statement.

The nice feature of SAME_DB is that no data is pulled to WebFOCUS and sent back to the DB, its all done on the DB server.


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!

March 08, 2016, 08:31 AM
stur0063
Thanks Waz.

This explains why I can't find a master file then. Smiler

Is there a different trick required to pull data from the SAME_DB table? I'm getting an error in the code above - so I'm still not sure how to pull the report back into webFOUCS then.


webFOCUS 8207.15
WindowsServer 2019
March 08, 2016, 04:00 PM
Waz
Are you running one fex to create the table and another that reads it ?


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!

March 08, 2016, 04:27 PM
stur0063
quote:
Originally posted by Waz:
Are you running one fex to create the table and another that reads it ?


I've tried it as 2 *.fex - and as a single. I pasted the single *.fex CAR example I was using above.


webFOCUS 8207.15
WindowsServer 2019
March 08, 2016, 04:43 PM
Waz
FYI

SAME_DB is irrelevant with a non RDBMS data source.


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!

March 08, 2016, 04:50 PM
stur0063
quote:
Originally posted by Waz:
FYI

SAME_DB is irrelevant with a non RDBMS data source.


Ha - good to know :-)

I'll whip up a non-car example and see how that works.


webFOCUS 8207.15
WindowsServer 2019