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 email@example.com and provide your corporate email address, company, and name.
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.
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, 2013
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, 2006
👍 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.
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, 2005