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.
Not sure if I'm asking this correctly, but.... Is it possible to join data from one segment of a file to data from another segment of the same file, provided of course that there is a field common to both segments? I need to put data form one segment, say, Employee, Earnings codes and so on from one segment and then hire date, job, title from another segment, and yes there is an employee id in the segments to join.
I'm just not sure how to go about this.
Thank you.This message has been edited. Last edited by: webmeister,
If they're different segments in the same table and they both have Employee as a field, then they're most likely already related and you wouldn't have to do the JOIN, non?
If you need a join, the join syntax can include the segment name, something like this:
JOIN table-name1.segment-name1.EMPLOYEE IN table-name1 to table-name1.segment-name2.EMPLOYEE IN table-name1 AS J1
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
=========================================================================== I WANT TO JOIN DATA IN THE ABOVE SEGMENT TO DATA IN THE BELOW SEGMENT ===========================================================================
Look up recursive join. That should work for you. You will have to TAG the join so that you will be able to differentiate between the fields with the same names but on different levels.
I was wondering about that....I'll look it up and see what it can do for me. I've never really understood recursive joions, so there's no time like the present to learn.
From the MFD you have provided, it is clear the key filed of the two segment is same. There should be some identifier in each segment to identify the type of the record. For instance consider CORP, EMPLOYEE ID and TYPE (values 0000001 and 0000002) forms the key of the VSAM file. You can use the below approach to join the two segments of the data source:
DEFINE FILE filename
KEY_1/A12 = EDIT(KEY_300,'999999999999$$$$$$$');
END
TABLE FILE filename
PRINT EMPNAME
EARNINGCODE
BY KEY_1
IF TYPE EQ '0000001'
ON TABLE HOLD AS TP1HLD
END
TABLE FILE filename
PRINT HIREDATE
JOB
TITILE
BY KEY_210
IF TYPE EQ '0000002'
ON TABLE HOLD AS TP2HLD
END
JOIN KEY_1 IN TP1HLD TO KEY_210 IN TP2HLD AS JOIN12
TABLE FILE TP1HLD
PRINT EMPNAME
EARNINGCODE
HIREDATE
JOB
TITLE
BY KEY_1
END
-Shrikant
FOCUS 7.2.3 Platform: IBM system Z9 Business class O/P formats: Flat files, excel and CSV files
Posts: 39 | Location: Hyderabad, India | Registered: April 28, 2007