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 would like to calculate how long did it take to run a Batch job. I know I can use HDIFF to calculate the difference between two dates but how do I get difference when working with one one date column?
For Ex: Duration for Batch_ID A123 in hours is 1, in minutes is 64, and in seconds is 3884This message has been edited. Last edited by: FP Mod Chuck,
What is the duration for batch id B567? Are you just comparing the first batch id to the last one? If that's the case, you should: 1. Make sure the data is sorted by Batch ID. 2. Use LAST syntax to find the last batch id and flag it so you know what two values have to be subtracted to get the difference.
Ideally, your database would have a START and END date times so you could avoid all this because you'll also have to account for when the clock resets from 23:59 to 0:00 at midnight and if your times are split between two dates, your calculation would have to account for that.
I would suggest a multi-verb for calculating the difference between a batch's earliest and last timestamps. Off the top of my head:
TABLE FILE X
SUM
MIN.Time_Run
MAX.Time_Run
COMPUTE Time_Spent/I10 = HDIFF(MAX.Time_Run, MIN.Time_Run, 'SECOND', Time_Spent);
BY Batch_ID
PRINT
COMPUTE Step_Time/I10 = HDIFF(Time_Run, LAST Time_Run, 'SECOND', Step_Time);
BY Batch_ID
BY Time_Run NOPRINT
END
You probably want to special-case the first row of Step_Time though, as you'll get a huge number otherwise (Batch start time - basedate:'1900/12/31').
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 :