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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Can hold files store defines as defines?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Can hold files store defines as defines?
 Login/Join
 
Virtuoso
posted
I just looked at the master-files for some HOLD-files I created, and noticed that fields that I specified with DEFINE are NOT stored as such, but are instead stored as full-fledged fields with their data in the FOC-file? I kind of expected those to be only added to the masters, and not to the FOC-files.

Is there a switch to chose which of the two (DEFINEs in the master, or data in the FOC-file) will be used?

Not a big deal really, disk-space is cheap, but I wouldn't be surprised if simple calculations would perform better than traversing a larger FOC-file, at least in some cases.

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
This is normal behaviour, and it is so for every relational database I've come across. DEFINE fields are "virtual fields" on input and become real fields on output, just like reading a MS SQL Server or DB2 view - virtual on input, real on output.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
quote:
Can hold files store defines as defines

So, no, hold files cannot store defines as defines.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Actually that's not entirely true.

Views in DBMSes are just queries, so columns that are only defined as an expression in the view remain just that, an expression. The WebFOCUS equivalent of that is a master-file describing a database-table, with DEFINE's (or virtual fields) added to the master for the expressions.

However, in reporting you'd probably store several so-called "materialized views" with aggregated data in your DBMS, like what WebFOCUS does with HOLD-files.

My question is whether I can get WebFOCUS' masters about HOLD-files to behave the same as DBMS views or masters about database tables, so that it doesn't store redundant data (results of expressions based on other columns in the record) in its HOLD-files if not necessary.

The feature seems entirely possible, I'm just wondering if it's there yet?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
adding a noprint to a field might do that
or the SET HOLDLIST=PRINTONLY is probably an option




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
If you not want the computed or defined fields to be sored in teh hold file you should add the DEFINES after you created the HOLD file.

TABLE FILE XXX
PRINT fields
ON TABLE HOLD
END
DEFILE FILE HOLD
defines
END
TABLE FILE HOLD
PRINT fields 
defines
END




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
<FreSte>
posted
There is a way to get the define'd fields in a report.
Maybe with some creative thinking this could be usefull Smiler

-Fred-

-* --- Define fields on CAR-database
DEFINE FILE CAR
  CNAME1/A12 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N';
  CNAME2/D5  = IF COUNTRY EQ 'ITALY' THEN  0  ELSE  1;
  NEWDATE/YYMD WITH COUNTRY='&DATEYYMD';
END

SQL FMI SET TEMPDEFINES ON
-RUN

SQL FMI SET MFDNAME CAR
-RUN

TABLE FILE SYSCOLUM
  PRINT
     COLUMN_NAME
     DEFTEXT
  IF DEFTYPE EQ 'P' OR 'T'
END
 
Report This Post
Virtuoso
posted Hide Post
Smart Fred

Wonder how you could use this
And does it also work for defines and computed fields in the Master.

Is this documented somewhere?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by FrankDutch:
DEFILE FILE HOLD


Haha, nice one!

Yeah, I could just define the fields again every time I need them, but in many cases I need them more than once (the hold files are created by the reportcaster in many cases) or they're going to be used by someone else.

The latter is precisely why I want those fields to be available from the hold-file (or rather, the master file), as those people are just too damn lazy (or just incapable) to try and define them themselves! They're usually just trying to get their work done, which isn't writing WebFOCUS reports - they just happen to need one for it.

Most of the extra defines I need are related to report readability. For example, we have reports that use numbers like 1110401 for a date, or 11114 for a week number - you can imagine people other than the report author are having trouble interpreting those.
My job here is to set a standard for how reports are created, but the report owners won't follow that standard if that involves too much work (too complicated for them to understand right away, for example) or if they don't agree with how that goal is accomplished (by increasing the size of FOC-files with extra fields more than they think necessary, for example).

@Fred; I'm not really sure what part of your example is relevant to this issue and I can't really verify as the SQL FMI command is unknown to WF's help system (booh!). I suppose you could put the results of retrieving those defines in an ALPHA file and include them before a TABLE FILE, but that's not really the kind of solution I'm looking for.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
You can create a masterfile with the defined fields that overrules the masterfile that was created on the fly.

If you are sure the created holdfile is always the same structure, just make that new Masterfile .

If you do a SAVE and not a HOLD there will be a FTM or FOC file, but there is no MAS file created.
That might do it for you




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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     [CLOSED] Can hold files store defines as defines?

Copyright © 1996-2020 Information Builders