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 a current row (row1) that has a start and stop time. I need to search the master file for the next row (row2) that has run time greater than 0. Once I have that row I need to take the stop time of row1 and subtract the start time of row 2. This will give me the time between when row 1 stopped and row 2 started. Any ideas how to do this in WebFocus? Thanks
WebFocus 7703 Windows 7 Output format: HTML, Excel, PDF
You can do this in a DEFINE. You have to 'save' the contents of the row1 start and stop time and not overwrite them until some condition is met. Then don't calculate elaspsed time until runtime greater than 0.
Here is some pseudo-code that will possibly give you some ideas.
DEFINE FILE filename
CNTR/I8=CNTR+1;
CURRSTRT/I4=IF CNTR EQ 1 THEN STARTTIME ELSE CURRSTRT;
CURRSTOP/I4=IF CNTR EQ 1 THEN STOPTIME ELSE CURRSTOP;
ELAPSED/I8=IF RUNTIME GT 0 THEN 'calculate elapsed time';
END
This of course needs lots of work but might give you an idea of what you need to do.
Tracie, What happens after you found row 2? do you look for row 3 and do the same calculation between 3 and 2? Also, is your file sequential?
If this hypotheses is correct could this be your solution:
-* File tracie1.fex
DEFINE FILE CAR
RUNTIME/I5=IF SALES LT 10000 THEN 0 ELSE SALES;
START/D7=RCOST;
ENDT/D7=DCOST;
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL START ENDT RUNTIME
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL START ENDT RUNTIME
COMPUTE DIFF/D7=IF LAST ENDT EQ 0 THEN 0 ELSE START - LAST ENDT;
IF RUNTIME NE 0
END
This message has been edited. Last edited by: Danny-SRL,
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, 2006