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.
Just use recursive joins if you have a finite structure. Index the parentid on your table and use something like this -
JOIN CLEAR *
JOIN LEFT_OUTER id IN table TAG T1 to MULTIPLE parent IN table TAG T2 AS J1
JOIN LEFT_OUTER T1.id IN table to MULTIPLE parent IN table TAG T3 AS J2
JOIN LEFT_OUTER T2.id IN table to MULTIPLE parent IN table TAG T4 AS J3
TABLE FILE table
BY T1.id
BY T2.id
BY T3.id
BY T4.id
END
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Am I correct? If so then you only need two lines of join code but you will need to use LEFT_OUTER. Make sure you understand the TAG syntax and how referencing it within the TABLE request gives you the fields that you want. It is so similar to SQL statements.
And from you other post, check out the search suggestion I gave you, it will help you all that you need.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
As in the above example, I amgetting B and F in the 1st PARENT columns. I should not get them as they are child of other parents. Can you help me with this.
Thats true 7 joins need to be there. I need to start with nodes which have no parents but just children.some nodes have children and parents, these should not be shown as parents. But I get these. I am not sure how to eliminate these.
You can use the following code to show you one method. The first part just creates some sample data for use within the example, everything else should be self explanitory? -
EX -LINES 4 EDAPUT MASTER,HIERARCHY,CF,MEM,FILENAME=HIERARCHY, SUFFIX=FOC,$
SEGNAME=ONE, SEGTYPE=S0 ,$
FIELD=PARENT, ,A4 ,A4 ,FIELDTYPE=I, $
FIELD=CHILD, ,A4 ,A4 , $
-RUN
CREATE FILE HIERARCHY
MODIFY FILE HIERARCHY
FREEFORM PARENT CHILD
MATCH PARENT
ON MATCH REJECT
ON NOMATCH INCLUDE
DATA
A,B,$
C,D,$
B,E,$
F,E,$
A,F,$
END
-*
TABLE FILE HIERARCHY
BY CHILD
ON TABLE HOLD AS CHILDREN
END
-*
TABLE FILE HIERARCHY
BY PARENT
IF PARENT NE (CHILDREN)
ON TABLE HOLD AS ONLY_PARENTS
END
-*
JOIN CLEAR *
JOIN PARENT IN ONLY_PARENTS TAG T1 TO MULTIPLE PARENT IN HIERARCHY TAG T2 AS J1
JOIN LEFT_OUTER T2.CHILD IN ONLY_PARENTS TO PARENT IN HIERARCHY TAG T3 AS J2
-*
TABLE FILE ONLY_PARENTS
PRINT T2.CHILD
T3.CHILD
BY T1.PARENT <-- Not really required as the host table is designed to give Only Parents (obvious really)
BY T2.PARENT
END
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
As I said in the above code, if I want to use G3.CHILD in the join, how do I use it. It gives me an error when I hold the file as focus and index it. I used ASNAMES but no use. Can you suggest something