![]() |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|