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.
I have been wrestling with this for hours and I just can't seem to get my head around a way to do this.
I have the data I need in the top Format below, but I need it in the sequence in the lower Format. The data is built from reading a file multiple times to see if there is child data (the parent and child data is all in the same file). So it reads the parent info (level 1) using the Item Number and gets all the level 1's. It then re-reads the file using the Component Item Number as the Parent to get all the Level 2's. It then re-reads the file using these Component Item Numbers as the parent to get all the Level 3's and so on (up to possibly 15 levels). As such, the data comes out in the order it appends the data to the file which is basically in Level order.
However, they want to see it sequenced so that if the particular Level 1 has a level 2, it needs to print below it and then if that level 2 has a level 3, then print that below the level 2 and so on. Some might have no lower level and some might have multiple lower levels but only one of those lower levels has another subsequent level and so on.
Required Output (I added the indentations to make it easier to see what I am needing) Level Item Number Component Item Number 1 AB11914A FA11915A 2 FA11915A AP90001A 3 AP90001A PA70133 3 AP90001A PA70136 4 PA70136 PA1 5 PA1 PA123456 2 FA11915A PA71143 2 FA11915A SO11074B11 3 SO11074B11 PB70540 3 SO11074B11 PB70541 4 PB70541 PA 3 SO11074B11 PB70656 1 AB11914A PA70207 1 AB11914A PA70797
It seems like it should be easy but for some reason I can't get my head round how to do it, either by resorting the output or by changing the way it retrieves the data initially.
Any and all help would be greatly appreciated.This message has been edited. Last edited by: rogerwilkouk,
I’m sure some of the old-schoolers will have a more elequent mathematical algorithm to suggest.
As a 1st stab, I would compute 15 temp columns for each record pair from source to keep track of sequences for the various levels that it is associated with. I.e. tlev1 tlev2 ... tlev15 And compute sequence value for each record pair read. Are you familiar with using LAST to reference the previous record values?
-------------------------------------------------------------------------------- prod: WF/AS 8.2.05; OmniGen; In FOCUS since 1991
Posts: 104 | Location: United Kingdom | Registered: February 07, 2008
Nicely compact and to the point, David. This probably turned into our go-to example for hierarchical FOCUS queries. Awesome.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
David. This worked Awesome. You've saved me a lot of hair pulling. Even though I've got it working I am going to do a lot more reading on this to ensure I fully understand it.
Yes, even though it is a small model, there are something interesting things going on: * building a master for a FOCUS file. * loading a FOCUS file. * using FML.
Yes, for sure read up on these components, as they can be used as building blocks to solve other types of problems, as well.