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] EXTRA column in HOLD file
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] EXTRA column in HOLD file
 Login/Join
 
Gold member
posted
I am running the following code under 8.2.01m:

TABLE FILE CAR
SUM
CNT.DST.MODEL
MIN.MODEL
MAX.MODEL
CNT.DST.COUNTRY
MIN.COUNTRY
MAX.COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
? HOLD

My question is, why is there an extra field in my HOLD file?

DEFINITION OF HOLD FILE: HOLD
FIELDNAME ALIAS FORMAT
MODEL E01 I9
MODEL E02 A24
MODEL E03 A24
MODEL E04 A24
COUNTRY E05 I9
COUNTRY E06 A10
COUNTRY E07 A10
COUNTRY E08 A10

The extra values are E02 and E06- the other columns are what you would see without the HOLD file.

I know that WebFOCUS is generating the column, because ON TABLE SET HOLDLIST PRINTONLY removes it- I just don't understand the reasoning.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 56 | Registered: May 29, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
As you mentioned it, HOLDIST PRINTONLY prevents this automatic adding of fields. I think it's just one of those things that sneaked into the program once as default, which they can't change because of backwards compatibility.

The solution is easy, just put SET HOLDLIST = PRINTONLY in edasprof and that will be your systemwide default.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 324 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
To have 100% exact answer, you may need to talk with IB support team.
But here my explanation, which I think is not that far from the exact one.

It's all about internal process (matrix).
When you perform CNT.DST.MODEL, internally the system is first find the DST (distinct) value from MODEL and stores it in its internal matrix.
Then it use this "new" internal field to perform the CNT (count) and have the result returned to you.
So as for internal MODEL fields, you have two of them :
- one which is alpha (A24) that contains the distinct values (which is probably E02)
- one which is int (I9) : the count (from the distinct values)

So as Frans stated, it's always a good idea to have the SET HOLDLIST = PRINTONLY in effect to avoid confusion.


WF 7.7.05M, 8.1.05M, 8.2.0.1M gen240 Windows, HTML, Excel, PDF
In Focus since 2007
 
Posts: 1825 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Master
posted Hide Post
This is another one of those things they don't teach anymore.

By default your output file will have all fields in your SUM/PRINT statements and all the fields used in COMPUTE statements. The CNT.DST, MIN, MAX prefixes are treated in the internal matrix like a COMPUTE. Because you are using SUM, the last MODEL and last COUNTRY will also be in the output unless you use HOLDLIST=PRINTONLY somewhere.

If you have over 20+ years of code like we do, I'd be careful about putting this in the edasprof. You could have code that depends on these "extra" fields being the HOLD files. You could end up with programs that stop working.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 868 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
That's why I think if you have a younger environment, it's important to set it in edasprof to avoid this kind of implicit dependencies.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 324 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
👍 I like that idea Frans, I normally add "ON TABLE SET HOLDLIST PRINTONLY", as well as ON TABLE SET ASNAMES ON" in my fexes to be specific. However, with the development being pushed toward IA instead of AS, the SETing of HOLDLIST in edaprof is an excellent idea. If can always be reversed in the fexes as needed.
quote:
The solution is easy, just put SET HOLDLIST = PRINTONLY in edasprof and that will be your system-wide default.


   In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2758 | Location: Nashville TN Area [Test&Prod:8204Mg48] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] EXTRA column in HOLD file

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