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     Problem in JOIN [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problem in JOIN [SOLVED]
 Login/Join
 
<Toshu>
posted
CODE is:
TABLE FILE VCTD700
PRINT *
ON TABLE HOLD AS FILE1
END
TABLE FILE VCTD715
PRINT *
ON TABLE HOLD AS FILE2 FORMAT FOCUS INDEX TR SITE CLOSED_DT
END
JOIN SITE AND TR IN FILE1 TAG TAG1 TO SITE AND TR IN FILE2 TAG TAG2

TABLE FILE FILE1
PRINT TAG1.TR
END
-RUN
ERROR:
TABLE FILE FILE1
FOC236) LINKED FILE DOES NOT HAVE A MATCHING KEY FIELD OR SEGMENT: FILE2
BYPASSING TO END OF COMMAND
PRINT TAG1.TR
END
Please help!

This message has been edited. Last edited by: <Toshu>,
 
Report This Post
Virtuoso
posted Hide Post
Toshu,

FOCUS files can have many indexes but you cannot join on more than one.

What you can do is create in FILE2 a DEFINEd field, concatenate SITE and TR. Then join to that field.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
You cannot use AND in the JOIN when the cross-referenced file is a FOCUS DB. I would DEFINE or COMPUTE the concatenated fields when creating both HOLD files and then JOIN using the computed/defined field.



(FOC236) LINKED FILE DOES NOT HAVE A MATCHING KEY FIELD OR SEGMENT:
The referencing, and cross-referenced file do not have the field
named as the CRKEY in common. The CRKEY must be the fieldname or
alias of the referencing field and the fieldname of the cross-
referenced field.

From the documentation on JOIN:

Syntax: How to Join Real Fields
The following JOIN syntax requires that the fields you are using to join the files are real fields declared in the Master File. This join may be a simple one based on one field in each file to be joined, or a multi-field join for data sources that support this type of behavior. The following syntax describes the simple and multi-field variations:

JOIN [LEFT_OUTER|INNER] hfld1 [AND hfld2 ...] IN hostfile [TAG tag1]
TO [UNIQUE|MULTIPLE]
crfield [AND crfld2 ...] IN crfile [TAG tag2] [AS joinname]
END
where:

JOIN hfld1
Is the name of a field in the host file containing values shared with a field in the cross-referenced file. This field is called the host field.

AND hfld2...
Can be an additional field in the host file, with the caveats noted below. The phrase beginning with AND is required when specifying multiple fields.

When you are joining two FOCUS data sources you can specify up to four alphanumeric fields in the host file that, if concatenated, contain values shared with the cross-referenced file. You may not specify more than one field in the cross-referenced file when the suffix of the file is FOC. For example, assume the cross-referenced file contains a phone number field with an area code-prefix-exchange format. The host file has an area code field, a prefix field, and an exchange field. You can specify these three fields to join them to the phone number field in the cross-referenced file. The JOIN command treats the three fields as one. Other data sources do not have this restriction on the cross-referenced file.
For data adapters that support multi-field and concatenated joins, you can specify up to 16 fields. See your data adapter documentation for specific information about supported join features. Note that FOCUS data sources do not support these joins.


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
<JG>
posted
quote:
SITE AND TR IN FILE2


Toshu the error being generated is not the real error.

The problem is you cannot do a multi field to multi field join for FOCUS data sources

Create a concatenated key and use that instead

Francis posted first
 
Report This Post
<Toshu>
posted
Thanks a ton to all of you! It is resolved. I know I'm new so asking basics. But it feels good to grow with this forum and with all of you!
 
Report This Post
Virtuoso
posted Hide Post
Try a "conditional join". IT should effect the required join directly to the existing Focus file -- no preliminary HOLD, no additional indexed catenated key field.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     Problem in JOIN [SOLVED]

Copyright © 1996-2020 Information Builders