Focal Point
[CLOSED] FOCUS vs ALPHA

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

May 27, 2014, 03:55 PM
Doug
[CLOSED] FOCUS vs ALPHA
Is there any justifiable reason why one would use "ON TABLE HOLD AS HOLDFILE FORMAT ALPHA" instead of "ON TABLE HOLD AS HOLDFILE FORMAT FOCUS", when HOLDFILE isn't being used for anything other then a subsequent "TABLE FILE HOLDFILE" request? After all, the is WebFOCUS, isn't it?
Inquiring minds want to know…

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
May 27, 2014, 05:40 PM
Waz
Actually I would just use "ON TABLE HOLD AS HOLDFILE".

The main reason for me is overheads.

FORMAT FOCUS will generate a FOCUS file, a hold file and then load all the records into the FOCUS file.

The HOLD FORMAT ALPHA or just HOLD, only writes out the data to a file.

Simply its quicker.


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!

May 28, 2014, 02:38 AM
Dave
We started to use

ON TABLE HOLD AS H01

instead of

ON TABLE HOLD AS H01 FORMAT FOCUS

to speed things up.

FOCUS format will 'segment' the data for faster retrieval, but it will take much longer to make such a HOLD file.
If the HOLD file is only used in the same procedure ( e.g. temporary and not a saved HOLD file ) it's faster to not use FORMAT FOCUS.

In some cases ( large HOLD-files, which you have to try to avoid ) XFOCUS is faster.

Good luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
May 28, 2014, 08:31 AM
j.gross
Isn't there a SET command to copy the internal matrix (which is nothing but an on-the-fly in-memory Focus file) directly out when you HOLD FORMAT FOCUS, bypassing all the extract processing? That should be more efficient than HOLD [FORMAT ALPHA].
May 28, 2014, 08:34 AM
Ram Prasad E
I go for FOCUS format, in case of using SQL translator. Also when I have a single large data file and I need to have index on particular column which I hit multiple times down the flow with different filter conditions.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
May 28, 2014, 10:29 AM
Håkan
Jacob, I think you're thinking of the DIRECTHOLD parameter, which is set to ON by default. It does not create an intermediate file and a MODIFY procedure, it just makes WF to dump the internal matrix on disk.

/Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
May 28, 2014, 10:36 AM
George Patton
I use HOLD AS FORMAT ALPHA all the time when the next step in the process is a MODIFY with a FIXFORM statement.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
May 28, 2014, 11:09 AM
Doug
Thanks for all the input...

So, IF all I want to do within a single procedure is to do a TABLE FILE request, then the FORMAT FOCUS is not necessary. However, IF I am doing an APP HOLDDATA … APP HOLDMETA… (so that these HOLD files are available to other fexes) then a FORMAT FOCUS would be a better choice then FORMAT ALPHA, right?
May 28, 2014, 11:12 AM
Francis Mariani
No.

Also, if you need to JOIN to/from this HOLD file, FOCUS DBs cannot join with more than one column.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 28, 2014, 02:45 PM
Doug
quote:
FOCUS DBs cannot join with more than one column.
Yeah, What's up with that? This is FOCUS... So, why limit the JOINs to ONE?
May 28, 2014, 02:54 PM
j.gross
They'll catch up to NOMAD one of these decades.
May 28, 2014, 02:59 PM
Francis Mariani
BUT, I recently successfully did a multi-column join with FOCUS dbs using SQL.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 28, 2014, 03:46 PM
j.gross
Can't a condition-based Join be utilized?
May 28, 2014, 05:36 PM
Waz
It seems that conditional joins do work, but not from a hold file to as FOCUS file.

But FOCUS to FOCUS works, bizarre !


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!

May 29, 2014, 06:31 AM
Alan B
Multi field joins can be accomplished on FOCUS/XFOCUS files using the MDI feature. The MDI build is fast, and subsequent retrieval also fast.


Alan.
WF 7.705/8.007
May 29, 2014, 10:48 AM
Doug
quote:
It seems that conditional joins do work, but not from a hold file to as FOCUS file.

But FOCUS to FOCUS works, bizarre !

How about if the HOLD file is the results of a "ON TABLE HOLD AS MYFILE FORMAT FOCUS" line?
May 29, 2014, 11:04 AM
jfr99
Hi Alan,

What is the MDI feature?


WebFocus 8.201M, Windows, App Studio
May 29, 2014, 11:15 AM
Alan B
quote:
How about if the HOLD file is the results of a "ON TABLE HOLD AS MYFILE FORMAT FOCUS" line?

That will work, it is flat file to FOCUS db that is not supported.
quote:
What is the MDI feature?

Multi Dimensional Index. A (paid for I believe) feature of the FOCUS/XFOCUS database. It allows an index to be create from more than 1 dimension and in different segments. Quite cool really and v. rapid. Joins can be constructed onto all or part of an MDI.


Alan.
WF 7.705/8.007
May 29, 2014, 05:28 PM
Waz
Ah, so its like joining to primary key fields in a DB.


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!

May 30, 2014, 02:57 AM
Dave
If you need to join on multiple fields you could choose to add a surrogate-key field ( combined / concatenated ) which is unique.

This way you can always join on one field.
Added bonus : index that key!



...or use match.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
June 10, 2014, 12:42 PM
Doug
Getting more answers here, live, at Summit 2014.

Networking at the Focal Point Booth with Kathleen Butler! Lots of excitement here at Summit 2014 Good One




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206