Page 1 of 1

create a job to go through all the reject output files

Posted: Mon May 02, 2016 10:52 pm
by abyss
I wish to create a job to go through all the reject output files and email a summary to user, does anyone know how? parallel job or server job? or should I write a script to do it? I know there is a DSSendMail routine available in datastage
https://www.ibm.com/support/knowledgece ... dMail.html
viewtopic.php?t=94042
http://datawarehouse.ittoolbox.com/grou ... ob-5785370
however i am not sure how to use the datastage routine.

thanks
abyss

Posted: Mon May 02, 2016 11:10 pm
by chulett
Not sure there's any need for a "routine" quite yet. A Sequence job can easily be used to create a file and then email that as an attachment. I think we'd need to know a bit more about what you mean by "a summary" to provide more help.

If your reject files are all datasets then you'll need a Parallel job to read them, otherwise it's your choice.

Posted: Mon May 02, 2016 11:20 pm
by ray.wurlod
Definitely can achieve this with a sequence. Do you want one email per file, or one email to which all files are attached?

Posted: Tue May 03, 2016 7:41 am
by abyss
Thanks chulett, the reject file don't have to be dataset.
the summary means IDEALLY i want tell user number of total rejected records been produced each job in the email.

so you saying I should create a server job to do it?

thanks
abyss

Posted: Tue May 03, 2016 7:43 am
by abyss
Ray - yeah just one email with all the files that are not empty :)
thanks

Posted: Tue May 03, 2016 7:57 am
by chulett
That doesn't sound like any kind of a summary.

Use whatever you are most comfortable with to create the summary - Server job, Parallel job, script - if your rejects are plain text files than any of those could be used. And IMHO create one file with a summary of all rejects and attach that, the Notification Activity only supports one (from what I recall) and there really isn't a need to send out "all of the files that are not empty" when the goal is to produce a summary.

Typical would be a csv file, that would automatically open as an Excel spreadsheet on Windows, which most consumers would be most comfortable with.

ps. Use the Reply to topic link rather than quoting everything all the time unless there really is a need to quote the post you are replying to. Hint: there generally isn't. :wink:

Posted: Tue May 03, 2016 9:44 am
by johnboy3
Reply to topic! Yessss!
john3