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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] db_lookup
 Login/Join
 
Silver Member
posted
is it possible to do a db_lookup in a hold file?

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


WebFocus 762 AS400 / DB2
 
Posts: 34 | Location: Winnipeg, MB | Registered: January 23, 2008Report This Post
Expert
posted Hide Post
quote:
There are no restrictions on the source file. The lookup file can be any non-FOCUS data source that is supported as the cross referenced file in a cluster join. The lookup fields used to find the matching record are subject to the rules regarding cross-referenced join fields for the lookup data source. A fixed format sequential file can be the lookup file if it is sorted in the same order as the source file.
- Documentation.


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
Silver Member
posted Hide Post
Hi Francis,

What if the db_lookup is in the DEFINE or COMPUTE? Will it work?

Thanks,
noel


WebFocus 762 AS400 / DB2
 
Posts: 34 | Location: Winnipeg, MB | Registered: January 23, 2008Report This Post
Expert
posted Hide Post
You really must read the documentation:

quote:
DB_LOOKUP can be called in a DEFINE command, TABLE COMPUTE command, MODIFY COMPUTE command, or DataMigrator flow.


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
It's always easier to ask someone who knows.... Wink


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
quote:
There are no restrictions on the source file. The lookup file can be any non-FOCUS data source


I got caught on this, not reading the rest of the paragraph. Created a FOCUS file and caused the server to crash.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
i've used db_lookup in DEFINE field of a HOLD file.
the Looked-up table is from the database.
its working without crashing the server.


-Gokul,
WebFOCUS 769, 773, Windows XP, 7.
 
Posts: 9 | Location: India | Registered: October 07, 2009Report This Post
Gold member
posted Hide Post
Just to clarify ... The file you are defining is the HOLD file. The table you are using for the DB_LOOKUP can be a SQL Server table.

 
TABLE FILE PASSED_BINNED
SUM
  PASSED
     TAGS
     PASSED_TAGS
     DETECTED_TAGS
     PPT_TAGS_REMAINING
BY SPECIES_RELEASE
BY RELEASE
BY REL_RELEASEDATETIME AS 'RELEASEDATETIME'
BY YEAR
BY SYSTEM
BY LD_TYPE
BY UNIT
BY JULDAY
BY HOUR
BY QUARTER_HOUR
BY HOURS
ON TABLE HOLD AS ALMOST_THERE
END
-RUN
DEFINE FILE ALMOST_THERE
  FLOW/D14.6 MISSING ON = DB_LOOKUP(OPS_HOLD_ALL,YEAR,OPS_YEAR,SYSTEM,OPS_SYSTEM,LD_TYPE,OPS_TYPE,UNIT,OPS_UNIT,JULDAY,OPS_JULDAY,HOUR,OPS_HOUR,QUARTER_HOUR,OPS_QUARTER_HOUR,OPS_VALUE );
...


The closer you can match the sort order (or index) of the two tables, the better. OPS_HOLD_ALL is a SQL Server table with dam flows taken every fifteen minutes for six years and FLOWs are returned with no noticeable lag.
 
Posts: 60 | Location: Ellensburg Washington | Registered: May 22, 2009Report This Post
Guru
posted Hide Post
One more thing. In Release 7.7 you can enable a cache for DB_LOOKUP. If you are looking up the same values repeatededly this can improve throughput.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders