But I have two Execute Routine Activity(running a shell script) in the Sequencer along with two Job activity. Why I am not getting the status report of those two Execute Routine Activity in the above email. How can I have the status report of those two in the email notification?
Question 2:
While in failure I am getting a mail with only the text- tough I have the option to add the Log in the body of the mail. I want the status of the job which failed and the email should tell me which job failed. The Error message was like:
I also wanted to add in the subject the name of the job that failed in case of failure email. Is it possible? DO you think I should write my own routine for this. If so could you give some example of that.
Thanks for your help in advance. :D
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
2. Alas, that's how it works. Submit an enhancement request. If the job fails, then one can have no confidence about stage start and end times, link row counts, etc., so they are simply not reported.
3. Any such change to default behaviour is a DIY exercise. Suitable routines have been posted in this forum, a Search ought to find them. Include "send" and "mail" (and possibly "routine") in your search criteria and specify "all terms".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I am trying to develop the Job control routine to track the status from the calling job and send a mail. I am trying to get the log details by the following code. Is it the correct way of trapping the status from a Datastage job.
I have never used Job control before. Sorry if there are any silly errors
If not-Please let me know how to trap the status of a job
* -----------------------------------------------------------------
* Get the log details from the called Job
* -----------------------------------------------------------------
JobName= DSGetJobInfo(DSJ.ME,DSJ.JOBNAME)
Status= DSGetJobInfo(DSJ.ME,DSJ.JOBSTATUS)
Begin case
case Status=DSJS.VALOK
JobStatus="Job finished a validation run with no warnings."
case Status=DSJS.VALWARN
JobStatus="Job finished a validation run with warnings."
case Status=DSJS.RUNWARN
JobStatus="Job finished a normal run with warnings."
case Status=DSJS.STOPPED
JobStatus="Job was stopped by operator."
case Status=DSJS.VALFAILED
JobStatus="Job failed a validation run."
End Case
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
The status of DSJ.ME should always be "Running". If you look at job control generated for sequences. Then you can see how to get job status. You may need to leave off the job run and the wait for job routine calls but you need to attach to a job first. There is lots of code posted by me and others which explains how to do this.
CopyOfWL_SeqLoadRegistry_test_mail..JobControl (DSSendMail): The following tokens in the 'dssendmail_template.txt' file have not been set in the call to DSSendMail: %from%,%to%
CopyOfWL_SeqLoadRegistry_test_mail..JobControl (@Success_Email): Routine DSU.JobStatusSendMail did not finish OK, return code = '1'
Can you suggest what is the problem in the routine- or Do I need to set some internal file for that-If so how to do that?
Please help.
Thanks
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
CopyOfWL_SeqLoadRegistry_test_mail..JobControl (DSSendMail): The following tokens in the 'dssendmail_template.txt' file have not been set in the call to DSSendMail: %from%,%to%
CopyOfWL_SeqLoadRegistry_test_mail..JobControl (@Success_Email): Routine DSU.JobStatusSendMail did not finish OK, return code = '1'
Can you suggest what is the problem in the routine- or Do I need to set some internal file for that-If so how to do that?
Please help.
Thanks
I saw in JobCONTROL.H in my project diretcory the DSSendMail to be set as:
There is an example routine that shows how DSSendMail should be used. It is in the Routines branch, possibly under Examples (I don't have access to DataStage at the moment).
Examine this code. DSSendMail() requires, as its single argument, a delimited string containing all of the values that will replace tokens in the BAT file.
JOBCONTROL.H is automatically included in job control routines; you do not need to "reset" it (whatever you mean by that). To use DSSendMail from a transform function or a before/after subroutine then you would need to include this header file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.