Page 1 of 1

How to get an Alert Message when a File is being Written

Posted: Tue Aug 14, 2007 10:21 pm
by cosec
I have a File to Capture rejected records....Is it Possible to get an alert everytime this File is written to...? If so how..thanks....(without using job sequence)

Posted: Tue Aug 14, 2007 10:29 pm
by ArndW
Yes, it is possible (perhaps even easy) to do something like this. The question is what sort of an alert message? You can put a transform stage in the stream that writes to this reject file, and add a specific call to write a log message (the sdk routine "UtilityWarningToLog" will do that). Or you can put a before-stage or after-stage call in that transform to issue just one call to a program, or script, or routine of your choice.

Posted: Tue Aug 14, 2007 11:07 pm
by chulett
If you mark the constraint as a 'Reject Row' you'll automatically get an 'alert' (read 'warning') logged with the total row count rejected if anything goes down it. As noted, the answer is heavily dependant on what kind of 'alert' you want.

Posted: Wed Aug 15, 2007 8:05 pm
by cosec
Thanks for the Input...I would like the alert to be written to a Log File. For eg whenever there are rejected records I would like it to indicate that on the log...(I am assuming I will have to do some scripting in order to display that in the batch log)

Posted: Wed Aug 15, 2007 8:10 pm
by chulett
What 'batch log'? Sounds like you may need to write an after-job routine to get a LinkRowCount and write to your 'log file' if the value is > 0.