Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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: 71 | Registered: May 29, 2015Report 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: 454 | Location: Europe | Registered: February 05, 2007Report 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 versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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: 454 | Location: Europe | Registered: February 05, 2007Report 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 FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders