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] master file: mandatory filter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] master file: mandatory filter
 Login/Join
 
Gold member
posted
Hi all,

I'd need to implement a fixed filter on one of my tables in a multi-segment master file.
As I understand, my options are:
- add a join with the included WHERE condition
BUT: if no join made --> no WHERE condition applied
- add a filter in the MFD
BUT: if a user doesn't apply the filter, he'll get too much data
- add a fixed filter in a report object or a database view or a FILTER FILE definition
BUT: I'd like to keep all data-definitions within my MFD's

Is there any way I can add a static WHERE-clause to my segment/table within the Master File?
(no need for a dynamic rule, just WHERE TYPE = 'onlythistype')

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


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Virtuoso
posted Hide Post
Look at DBA and VALUE_WHERE:
.
.
.
END
DBA=SECURITY,$
USER= ,ACCESS=R,RESTRICT=VALUE_WHERE,NAME=SYSTEM,VALUE=COUNTRY EQ 'FRANCE' OR CAR EQ 'ALFA ROMEO';,$


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Great, works fine!

I'm having trouble understanding the DBA=SECURITY line though...
From what I understand in the help files, I'd need to fill in a Database Administrator login, but where does the 'SECURITY' value come from?
Is this a dummy or pre-defined value?


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Virtuoso
posted Hide Post
That is just a dummy value, but a value is needed to ensure that the DBA rules work.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
understood, thanks!


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Gold member
posted Hide Post
I've reopened the ticket due to some collateral damage of the solution regarding SQL-generation.
Issue: Whenever I create a report with the Define, the sql-generation goes out of whack...

My simplified MFD:
 
FILENAME=debugkarl, $
  SEGMENT=DD_CARD_OW_HIER, CRFILE=TABLES_DWH/DD_CARD_OW_HIER, CRINCLUDE=ALL, $
  SEGMENT=DD_CARD_CONTRACT, SEGTYPE=KU, PARENT=DD_CARD_OW_HIER, CRFILE=TABLES_DWH/DD_CARD_CONTRACT, CRINCLUDE=ALL, CRJOINTYPE=INNER,
    JOIN_WHERE=ICOH_CHILD_ID EQ CACO_ACNT_CONTRACT__OID;, $
    DEFINE DF_NUM_CARD_VALID/A100=IF CACO_CDLOK EQ '1000' THEN 'TEST'; $
END
DBA=SECURITY, $
USER=, ACCESS=R, RESTRICT=VALUE_WHERE, NAME=DD_CARD_OW_HIER, VALUE=DD_CARD_OW_HIER.ICOH_CHILD_ID EQ DD_CARD_OW_HIER.ICOH_ID;, $
 


My simplified report:
 
TABLE FILE DEBUGKARL
SUM DEBUGKARL.DD_CARD_CONTRACT.DF_NUM_CARD_VALID
 


My Result:
FOC2510 - FOCUS-MANAGED JOIN SELECTED FOR FOLLOWING REASON(S):
FOC2505 - A SEGMENT IN THE STRUCTURE IS NON-KEYED: DD_CARD_OW_HIER
FOC2517 - FST. OR LST. WHERE SORT FIELDS DO NOT COVER KEY
FOC2590 - AGGREGATION NOT DONE FOR THE FOLLOWING REASON:
FOC2592 - RDBMS-MANAGED JOIN HAS BEEN DISABLED
(Followed by two distinct queries on both tables)

Apologies for not using an MFD on the sample application, but I believe this problem is related to relational connections...


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Virtuoso
posted Hide Post
quote:
DEFINE DF_NUM_CARD_VALID/A100=IF CACO_CDLOK EQ '1000' THEN 'TEST'; $


Lacking an ELSE clause, the define is treated as:

DEFINE DF_NUM_CARD_VALID/A100=
IF CACO_CDLOK EQ '1000' THEN 'TEST' ELSE (LAST DF_NUM_CARD_VALID); $

The implicit LAST may be what triggers the FOC2517 message.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
I was wondering where the LST./FST. reference came from...

Thanks!


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Virtuoso
posted Hide Post
What happens when you add "ELSE ' '" to the DEFINE?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
As soon as I added ELSE statements to my defines, they started getting translated to SQL without issues.
As a result, aggregation & table links were done correctly on the database.

I'm still in the process of figuring all my defines out and how they are translated by WebFocus, but it seems the combination of non-translatable defines and DBA-rules caused all aggregation & table relations to be done in WebFocus rather then by the database.

I've had similar issues when a bunch of joins and defines all worked fine until I added an EDIT() somewhere in a define and suddenly links & aggregation were done in memory instead of on the database...

Either WebFocus is a bit tricky when it comes to SQL-translation or I just need to figure things out a bit more. (2nd option to be more likely as I'm relatively new to the WF-platform )


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report 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] master file: mandatory filter

Copyright © 1996-2020 Information Builders