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     Using define fields to JOIN databases

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using define fields to JOIN databases
 Login/Join
 
Silver Member
posted
Can one use a define field for a JOIN statement?
It's actually not as simple as that... here's what I mean.

DATABASE A:
-----------
CONTRACT A8
ITEMDESC A15
QTY I5

DATABASE B:
-----------
CONTKEY A11
DELVADDR1 A20
DELVADDR2 A20

DEFINE FILE B
CONTKEY8/A8 EDIT(CONTKEY,'99999999$$$');

I want to join A and B via CONTRACT and CONTKEY because the first 8 chars of CONTKEY is the contract.
When I executed the join after the DEFINE stmt, I got...
(FOC370) THE FIELDNAME USED IN JOIN CANNOT BE FOUND IN THE FILE

Thanks in advance for any help!


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
 
Posts: 44 | Location: Fort Wayne, IN | Registered: February 07, 2007Report This Post
Master
posted Hide Post
JOIN CONTKEY8 WITH CONTKEY ...

Should do the job.

The with tells you where the define is located within a multi segment structure although this should not be strictly necessary since wf can tell where a define field is logically related unless it is a constant.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
Don't forget that that contrary to intuition, the DEFINE goes after the JOIN.


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
And the JOIN goes before the DEFINE. This is a well-documented feature. Look for define-based joins.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Some databases allow the join to the first part of a key without having to do a define. Can't tell what DB you are using, though.

One other note - with your defined field you would have to join B to A. Joining A to B would not work. You can't join a real field in A TO a defined field in B, but you can join FROM a defined field in B to a real field in A.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
What would be the result if you change the USAGE value of this field in the master?
If the real value in the Database B should be A8 then that would be an other solution. (In fact a correction on the database design)




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     Using define fields to JOIN databases

Copyright © 1996-2020 Information Builders