Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Automatically detect that scheduled report has failed

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Automatically detect that scheduled report has failed
 Login/Join
 
Silver Member
posted
Is there a way to get a message (email or otherwise) when a scheduled report fails?

Unfortunately there is no guarantee that a report runs properly when it is scheduled, even though it runs fine in the browser with exactly the same parameters. So we are forced to schedule each report and check the results before each and every product release. This is very time-consuming, boring, and error prone.

So we are looking for a way to detect that (the execution of) a scheduled report failed.

Ideally we would get an alert if a report failed, at a configurable email address.
Or else we would go to a web page that would show us an entry for each report we have scheduled and for each entry when it last ran and if the last run was successful or not.

We are willing to manually register each report when it is scheduled (even though this seems superfluous - the ReportCaster knows of all the scheduled reports).

If nothing else can be done, we would already be grateful if we could just get a concatenation of the logs of all scheduled report.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Virtuoso
posted Hide Post
ReportCaster writes its results into a database that you can report on. The data you are looking for is in the BOTLOG and BOTLOG2 tables.

One word of warning, we have a case open where errors in procedures executed (EX foo bar=1 baz=2 etc.) from another procedure in RC do not propagate to the top procedure. As a result RC reports the job as completed successfully, while it did encounter errors.
If you just -INCLUDE other procedures, errors are reported correctly as far as we have seen.

Example code:
-DEFAULT &LOGDATE = &YYMD.EVAL;

JOIN
 STAT_BT_NAME IN BOTLOG2 TO
 STAT_BT_NAME IN BOTLOG AS J0
 END
DEFINE FILE BOTLOG2
 DATE0/HYYMDS = HINPUT(8, '19700101', 8, DATE0);
 STARTHDATE/HYYMDS = HADD(DATE0, 'ms', START_STAMP, 8, STARTHDATE);
 LOGDATE/I8YYMD = HDATE(STARTHDATE, 'YYMD');
END
TABLE FILE BOTLOG2
PRINT
 MSG_CODE AS 'Message,code'

BY HIGHEST LOGDATE
BY HIGHEST STARTHDATE AS 'Log,date'
BY COUNTER AS ''
BY MESSAGE AS 'Message'
BY STAT_BT_NAME AS 'Job ID'
BY JOB_DESC AS 'Job,desc.'
BY TASKOBJ AS 'Task,object'

WHERE ERROR2 EQ 'Y';
WHERE LOGDATE GE '&LOGDATE';
END


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Why don't you just set the Notification Tab (click to Open Schedule first) to send out a message 'On Error' or is that not informative enough ?


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
Master
posted Hide Post
Look at the Notification tab in the ReportCaster schedule setup and choose "On Error" You'll get some additional fields to fill out including where to send the error message.


hmmm.... there seems to be an echo in here !


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
How do these last 2 suggestions reflect the question, "Automatically", which, actually means, "Programically".
Wep suggested 1 answer, we have used that, but is a report and after the fact. Capturing the error in Task1 and generating a HTML message in Task2 is another way, which we also use...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
quote:
How do these last 2 suggestions reflect the question, "Automatically", which, actually means, "Programically".


Tom: I guess it all depend on one's definition of "automatic". A notification that the report has failed that appears magically in my e-mail seems pretty automatic to me ...


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Silver Member
posted Hide Post
Thank you guys!

Either one works. I let the QA people decide what they want to use.

I myself like to use a SQL query (based on the WF code):

SELECT DATEADD(s, (CAST(END_STAMP AS bigint) - 24 * 3600 * 1000 * (CAST(END_STAMP AS bigint) / (24 * 3600 * 1000))) / 1000, DATEADD(dd, (CAST(END_STAMP AS bigint) / (24 * 3600 * 1000)), '1970-01-01')) AS [TimeStamp],
Job_Desc, RC_Message, ERROR2 AS IsError
FROM [dbo].[BOTLOG2] bl2
INNER JOIN [dbo].[BOTLOG] bl
ON bl2.STAT_BT_NAME = bl.STAT_BT_NAME
WHERE ERROR2 = 'Y'
ORDER BY [TimeStamp] DESC


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Automatically detect that scheduled report has failed

Copyright © 1996-2020 Information Builders