Focal Point
[CLOSED] How to catch error in RC job and not continue with other tasks

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9857020895

February 02, 2011, 11:22 AM
Joel
[CLOSED] How to catch error in RC job and not continue with other tasks
I have an RC job that runs every week. It has not given me any error until recently. The steps after the task that errored out got executed and I published an incorrect report. The RC job just creates a report to a shared drive does not send an email of the report that got created.

How do I catch this error and tell RC not to execute the rest of the tasks if I get an error? How can I send a notification to an email so that if there was an error, somebody gets notified and we can react to the error before publishing and incorrect report?

Here's the error that I got during the RC job and would like to catch this:

Connecting to server EDASERVE with execution id admin
Executing focexec.
No report to create.
SQLCODE IS 2706 (HEX: 00000A92) XOPEN: 42S02
: ASA Error -141: Table season not found
L (FOC1405) SQL PREPARE ERROR.
Task finished.


Thanks,
Joel

This message has been edited. Last edited by: Joel,


7.6.6
Windows 2003 Server, Sybase IQ, DB2, SQL Server and Oracle Databases
Excel, HTML and PDF
February 02, 2011, 12:32 PM
N.Selph
In Report Caster it seems like each task in a schedule runs on its own and does not look at the previous task status.
The only way I have gotten around this is to put some sort of preprocessing procedure in each task that in some way checks the proper output of the previous task and issues a &KILL_RPC if it is not satisfactory.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
February 02, 2011, 01:08 PM
Doug
You can have "Job 1" create a status file which is then read by "Job 2". Job 2, in turn will run / or not based on the contents of the file created in job 1.

It may be a work arond. But, it's as good as checking a Return Code of a previous job (imho)...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
February 06, 2011, 02:43 PM
Joel
Thanks for the reply. I'll try to incorporate your suggestions with the job.

One question, on the Edit Schedule, there's a tab for settings and then a section for Notification. If I use the dropdown "On Error", will this catch the error of the job and send me notification? I noticed that it will always send notification if there are no email attachment for the job. So if I'm just generating the report to file, I will get an error every time.

Thanks,
Joel


7.6.6
Windows 2003 Server, Sybase IQ, DB2, SQL Server and Oracle Databases
Excel, HTML and PDF
February 07, 2011, 05:06 AM
Computix
Hi Joel,

there is a setting for this behaviour in the RC-configuration.
Start -> Programs -> IBI -> ReportCaster -> Dist. Server -> configuration -> edit

Default Setting -> Default processing for no report to distribute
change to warning

regards,
Markus


WF 7.6.6 (MRE,BID, DevStudio, partly RC) on Windows 2003 /Apache/Tomcat
Output: HTML,Excel,PDF,PPT
Adapters: SQL Server, DB2, Oracle
February 07, 2011, 06:55 PM
Doug
That setting is for notification (of job results) not for error trapping...