Datawatch Forums  

Go Back   Datawatch Forums > Monarch Data Pump

Reply
 
Thread Tools Display Modes
  #1  
Old July 28th, 2010, 09:51 AM
John Battalio John Battalio is offline
Junior Member
Monarch Forum Newcomer (Welcome!)
 
Join Date: Feb 2010
Location: Eau Claire, WI
Posts: 5
Default Stop post process on job failure

Hi,
I am using Monarch/Data Pump 10.5 pro. How can I stop a post process from running if any job in the Data Pump process fails? Currently I just have one job in the process. Like, is there something that I can check prior to running my post process? Thanks.
Reply With Quote
  #2  
Old August 26th, 2010, 11:37 AM
Bill Watson Bill Watson is offline
Member
Monarch Forum Expert
 
Join Date: Feb 2004
Location: UK
Posts: 52
Default

i am sure there are a couple of ways to do it

a. parse the log events so far and ensure all the project outputs have been success
b. check your output file(s) are where you expect them to be

in either case you can use the "return false" command to halt a script. obviously if you were outputting to a database, you would have to use the first method

I haven't tried the first method but I am sure I saw something along those lines on the forum somewhere. (maybe Gareth can provide some guidance). for the File Method see the example below:

For this script to work you need to add System.IO to the Imports section on the References and Imports tab of the Script Editor.

Add the following code into your post process script

Code:
dim strPath as string = "C:\Data\"
dim strFile as string = "MYFILE.XLS"
Dim din As New IO.DirectoryInfo(strPath)
Dim aryFin As IO.FileInfo() = din.GetFiles(strFile)
Dim fin As IO.FileInfo

For Each fin In aryFin
   if fin.name = strfile then 
      log.addevent(strfile & " Found. Proceeding: " & now.tostring())
      'add code to do whatever you want to do

  else
      log.addevent(strfile & " Not Found. Halting Process: " & now.tostring())
      return false
   end if
Next
__________________
Cheers,

Bill


Monarch 1,4,5,6.02,8.02 Pro,9
Datapump 5, 8.0, 8.5
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:25 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) 2010 Datawatch Corporation.