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     Error while joining two HOLD files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Error while joining two HOLD files
 Login/Join
 
Member
posted
I am getting a FOC 236 error while trying to join two hold files:

(FOC236) LINKED FILE DOES NOT HAVE A MATCHING KEY FIELD OR SEGMENT: DAGTDATA
BYPASSING TO END OF COMMAND

Here are the details
====================
The join command :
(FOC236) LINKED FILE DOES NOT HAVE A MATCHING KEY FIELD OR SEGMENT: DAGTDATA
BYPASSING TO END OF COMMAND

The first HOLD file:
DEFINITION OF HOLD FILE: DAGTDATA
0FIELDNAME ALIAS FORMAT
FOCLIST E01 I5
ACD E02 I11 MISSING = ON
LOGID E03 A200 MISSING = ON
TSTAFFEDTIME E04 D20.2 MISSING = ON
TMEETTIME E05 D20.2 MISSING = ON
TACDCALLS E06 D20.2 MISSING = ON
TDAACDCALLS E07 D20.2 MISSING = ON
TACDTIME E08 D20.2 MISSING = ON
TACWTIME E09 D20.2 MISSING = ON
THOLDTIME E10 D20.2 MISSING = ON
TAVAILTIME E11 D20.2 MISSING = ON
AVAYA_LOGIN E12 A50


Teh Second HOLD file:
DEFINITION OF HOLD FILE: CRIDS
0FIELDNAME ALIAS FORMAT
FOCLIST E01 I5
ACD E02 I11
AGTLOC E03 A30
AVAYA_NAME E04 A50
ACTIVATION_DATE E05 YYMD
REVOCATION_DATE E06 YYMD MISSING = ON
AVAYA_LOGIN E07 A50
TPX E08 A50 MISSING = ON
BRICKVISION E09 A50 MISSING = ON
MAESTRO_TEMPE E10 A50 MISSING = ON
VISION E11 A50 MISSING = ON
MAESTRO_HAWAII E12 A50 MISSING = ON



What am I doing wrong?


7.6.4/Windows 2k/
 
Posts: 16 | Registered: March 05, 2008Report This Post
Expert
posted Hide Post
We need the JOIN as well.


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
Remember that the field you are joining TO should be indexed. There are exceptions, but this is the safest way to go.

You can do this when you create the hold file using the syntax

ON TABLE HOLD AS holdfile FORMAT FOCUS INDEX indexfield


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
The join command is missing, and is in this case essential.
The error that you are getting points to the segment name: DAGTDATA, not to a field.
This might mean that your join statement is not correct.
Maybe you used something like
join dagtdata.dagtdata.acd in dagtdata to dagtdata.dagtdata.acd in crids as j1
This should then be
join dagtdata.dagtdata.acd in dagtdata to crids.crids.acd in crids as j1
Or just leave out the file/segment qualifiers altogether.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Member
posted Hide Post
Sorry about that! Didn't notice that I had pasted the wrong piece of text......

Here is the JOIN command I am using:

JOIN
CRIDS.SEG01.ACD AND CRIDS.SEG01.AVAYA_LOGIN IN CRIDS TO ALL
DAGTDATA.SEG01.ACD AND DAGTDATA.SEG01.AVAYA_LOGIN IN DAGTDATA AS J0
END

The rror message is ...

(FOC236) LINKED FILE DOES NOT HAVE A MATCHING KEY FIELD OR SEGMENT: DAGTDATA
BYPASSING TO END OF COMMAND



I tried this one too...

JOIN
CRIDS.CRIDS.ACD AND CRIDS.CRIDS.AVAYA_LOGIN IN CRIDS TO ALL
DAGTDATA.DAGTDATA.ACD AND DAGTDATA.DAGTDATA.AVAYA_LOGIN IN DAGTDATA AS J0
END

but get the following error

(FOC370) THE FIELDNAME USED IN JOIN CANNOT BE FOUND IN THE FILE:
CRIDS.CRIDS.ACD


7.6.4/Windows 2k/
 
Posts: 16 | Registered: March 05, 2008Report This Post
Virtuoso
posted Hide Post
It does not appear from your file definitions that your hold files are sorted and/or indexed on the fields you are joining?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Master
posted Hide Post
Since you are doing a join all, I would define a concatenated field on both files.
DEFINE FILE your input file
ACD_A/A11=EDIT(ACD);
ACD_LOGIN/A61=ACD_A|AVAYA_LOGIN;
END

Then your first by field would be ACD_LOGIN. I would also index this field on DAGTDATA.
Your join would be:

JOIN ACD_LOGIN IN CRIDS TO ALL ACD_LOGIN IN DAGTDATA AS J0


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Member
posted Hide Post
I have this code in place to index the second file in the JOIN

ON TABLE HOLD AS DAGTDATA FORMAT FOCUS INDEX ACD AVAYA_LOGIN


7.6.4/Windows 2k/
 
Posts: 16 | Registered: March 05, 2008Report This Post
Member
posted Hide Post
Thanks PBrightwell! That worked.

I am curious to know why the JOIN didn't work when joining on two fields.

Also, This join worked....

JOIN
CRIDS.SEG01.ACD_LOGIN IN CRIDS TO ALL
DAGTDATA.SEG01.ACD_LOGIN IN DAGTDATA AS J0
END

but not this one

JOIN
CRIDS.CRIDS.ACD_LOGIN IN CRIDS TO ALL
DAGTDATA.DAGTDATA.ACD_LOGIN IN DAGTDATA AS J0
END


7.6.4/Windows 2k/
 
Posts: 16 | Registered: March 05, 2008Report This Post
Master
posted Hide Post
Your fields were not consecutive in both of your files which tells me that they were not sorted in the same order. That will work on an index file like an ORACLE DB, but it won't work with flat files. Indexing the second file will make this run faster especially since you were doing a one to many join.

did you try ACD_LOGIN IN CRIDS TO ALL ACD_LOGIN IN DAGTDATA?
or
CRIDS.ACD_LOGIN IN CRIDS TO ALL DAGTDATA.ACD_LOGIN IN DAGTDATA?

I think because you are repeating the file id in CRIDS.CRIDS that focus isn't recognizing it

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


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
quote:
N TABLE HOLD AS DAGTDATA FORMAT FOCUS INDEX ACD AVAYA_LOGIN


I would suggest to use shorter field names when used for index fields.
and two fields will not work




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
Master
posted Hide Post
From the manual:

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 field1 [AND field1a...] IN host [TAG tag1]
TO [ALL] field2 [AND field2a...] IN crfile [TAG tag2] [AS joinname]
END
where:
JOIN field1
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 field1a...
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.
IN host
Is the name of the host file.
TAG tag1
Is a tag name of up to eight characters (usually the name of the Master File), which is
used as a unique qualifier for fields and aliases in host files.
The tag name for the host file must be the same in all the JOIN commands of a joined structure.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
You can't use two fields in the join in the cross reference file if the cross reference file is a FOCUS database. Do a search on this in FocalPoint this topic was covered quite extensively not too long ago.


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report This Post
Master
posted Hide Post
The original hold files were not FOCUS (.FOC) databases.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report 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     Error while joining two HOLD files

Copyright © 1996-2020 Information Builders