Focal Point
WebFOCUS Quiz Thread

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

September 18, 2008, 12:28 PM
hammo1j
WebFOCUS Quiz Thread
This is an idea from another forum to keep the interest going.

The rules are very simple:

The first one to post the correct answer to a question, posts a new question (must be on FOCUS/WebFOCUS) and so on. Any comments in between on the question or topics raised are of course welcome.

If a partial answer is posted the winner is the one who provides the final piece of the jigsaw.

Once the correct answer has been acknowledged then that poster is free to post the next question (Gobinath: this does not mean the question should be why WebFOCUS has issued a particular error message in the report you are working on!)

Here's the first question:

What are ALL (and I mean ALL) the differences between TABLE and TABLEF?



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
September 18, 2008, 01:05 PM
mgrackin
TABLE vs. TABLEF (without reading the manual)

Assuming you are using a FOCUS database:

1) TABLE reads the FOCUS database in physical page order as they are written in the FOCUS database.

2) TABLEF reads the FOCUS database in the order of the pointers for the key values which are base on the SEGTYPE.

3) TABLE creates an internal matrix which is used for aggregating (SUM), BY phrase sorting, WHERE TOTAL tests, etc.

4) TABLEF does NOT create an internal matrix and therefore will aggregate and sort based on the BY phrases on the fly. To get a correct looking report the BY phrases must match the segment key fields in the FOCUS database. If the BYs do not match the keys you could potentially end up with more than one aggregated line for the same sort value because it does this on the fly.

5) TABLEF is faster due to skipping the step of creating an internal matrix.

I can't think of any other differences off hand.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
September 18, 2008, 01:07 PM
mgrackin
Perhaps a FOCWizard should be the judge of the answers and clarify if necessary.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
September 18, 2008, 01:27 PM
hammo1j
Great answer mgrackin you got most of it but...2 more points are needed...anyone got a view on this?



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
September 18, 2008, 01:39 PM
j.gross
TABLEF does not support
IF TOTAL / WHERE TOTAL
BY TOTAL
ACROSS
multiple verbs.
-- all because of No Internal Matrix.


- Jack Gross
WF through 8.1.05
September 18, 2008, 01:42 PM
mgrackin
Here's a guess:

6) TABLE allows alternate and idexed views. TABLEF does not allow these. "TABLE FILE CAR.FIELDNAME"


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
September 18, 2008, 01:59 PM
hammo1j
Mickey good work you now got one of the 2.

JG one of my points was "much more limited functionality - no compute, if total or multi verbs as stand outs" so that was covered by Mickey's earlier answer.

Come on folks think back to those old FOCUS internals courses and whoever gets the last one wins!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
September 18, 2008, 03:19 PM
mgrackin
My last guess before I check the manual:

7) TABLEF does not support JOINS.

This is probably wrong but that's my guess.

The WF71 Creating Reports manual has info about TABLEF on page 17-8. I'm looking now...


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
September 18, 2008, 03:38 PM
j.gross
Another diff:

They report on multipath PRINT requests differently.

TABLE will fill in the columns of the report in parallel; whereas TABLEF will put instances from each child path in a separate set of rows (leaving the other child paths' entries Missing)

Try this w/ TABLE and then w/ TABLEF, to see the diff:
TABLE FILE CAR
PRINT STANDARD WARRANTY BY COUNTRY BY CAR
IF CAR EQ JAGUAR
END



- Jack Gross
WF through 8.1.05
September 18, 2008, 03:50 PM
Carol Dobson
TABLEF does not allow the RETYPE command.

OK, you said go back in time! Big Grin



WebFOCUS 7.6.6/TomCat/Win2k3
September 18, 2008, 04:16 PM
Prarie
Oh...that's right....the good ole days.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I still support an old app in FOCUS Six for Windows!



WebFOCUS 7.6.6/TomCat/Win2k3
TABLEF does not allow the HOLD, SAVE, or multiple print commands either.
DST operator does not work for TABLEF
Also, SET EMPTYREPORT = OFF will have no effect in TABLEF command
I can't think of anything else, so I'll state the obvious.

TABLEF has an F and TABLE doesn't


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!

quote:
They report on multipath PRINT requests differently.

TABLE will fill in the columns of the report in parallel; whereas TABLEF will put instances from each child path in a separate set of rows (leaving the other child paths' entries Missing)

Try this w/ TABLE and then w/ TABLEF, to see the diff:

TABLE FILE CAR
PRINT STANDARD WARRANTY BY COUNTRY BY CAR
IF CAR EQ JAGUAR
END


We have a winner! Sorry to take so long to acknowledge but its a timezoned world!

Over to you J.G for the next question...



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
"Internal Matix" is a misnomer. When is the internal matrix not a matrix?


- Jack Gross
WF through 8.1.05
Just guessing here ...

Whenever there is not an across or fml request in progress ??


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
When there is only one row and one column?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Nope.
Nope.
Hint: why did the internal matrix have a 2Gb limit


- Jack Gross
WF through 8.1.05
This is a wild guess:

Would it be because it is actually a FOCUS database being built "internally"?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
Yes ... almost there ...


- Jack Gross
WF through 8.1.05
Answer:

When it's a multiple-verb request.

As Mickey noted, the 'internal matrix' is actually a Focus database (hence the limit on size).

For a single-verb request, it's a one-segment structure, which can aptly be described as a matrix: ultimately it holds an n-by-m rectangle of data (n = &LINES; m = number of sort + dependent fields). If there was a point in time when Focus did not yet support multiple verbs, then the 'internal matrix' terminology was an apt description up to that point.

But the structure of the internal database for multiple-verb requests has multiple segments -- one per verb, in a single-path hierarchy. (The top segment is keyed to the BY fields of the first verb; successive segments are keyed to their additional BY fields relative to their immediate parent.)

If you HOLD FORMAT FOCUS, the output MFD reflects the segment and field structure of the 'internal matrix' database, so you can verify the above.

(PRINT, ACROSS, COMPUTE, and BY TOTAL entail some variation from or expansion of the above)

Note the clever leveraging of assets: TABLE includes under the covers a MODIFY engine for gathering in the data to be reported.


Have a nice weekend.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
Thanks Jack - does this mean its Mickey's turn?



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Both the WHERE clause and the IF statement may be used to select records based on a list of values in a file.

Other than general syntactical differences,

What are the two most important differences between using a WHERE clause versus an IF statement to select records based on a list of values in a file?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
1. Syntax:

IF FIELD EQ (FILENAME)
WHERE FIELD IN FILE FILENAME

2. Size of file

IF: 32K
WHERE: 16K


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Ginny

Funny enough tho it says file size in manual it is actually 32k records for IF. Never did tests for WHERE.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Ginny,

File size is one of the differences. Although syntax is different, I excluded that as one of the answers.

quote:
Other than general syntactical differences,


The second difference is not so obvious and may not even be documented.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
I checked the WF71 Creating Reports manual and the information in the manual alludes to the second difference I'm looking for as the answer.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
Sorry, I missed that bit about syntax.

As for the record counts, I was lazy and didn't want to do a lot of number typing.

I looked in the 5.3 manual and there are lots of differences. The only one that caught my eye wasn't actually stated. It said that the IF file could have multiple columns in it as long as the one tested was first. That wasn't mentioned for WHERE which leads one to suppose that the WHERE file can only have one column. But I have not tested this per se and I know that I've used DST to do this which would generate two columns.

The other difference was the special character thing for WHERE in that you had to put quotes around the value in the file.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google