I have written a routine to extract the Fatal error logs and send it through mail.
Routine is as follows : -
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
***CallingProgName = DSJ.ME
rJobHandle = DSAttachJob(Jobname, DSJ.ERRNONE)
JobStartTime = DSGetJobInfo(rJobHandle, DSJ.JOBSTARTTIMESTAMP)
JobEndTime = DSGetJobInfo (rJobHandle, DSJ.JOBLASTTIMESTAMP)
SummaryArray = DSGetLogSummary(rJobHandle, DSJ.LOGFATAL, JobStartTime, JobEndTime, 0)
Mail = DSSendMail("From:DataStage-Development@winn-dixie.com\nTo:Sagardeshmukh@winn-dixie.com\nServer:wdims\nSubject:rJobHandle Failed !\nBody:SummaryArray")
DetachResult = DSDetachJob(rJobHandle)
Ans = Mail
Values of "SummaryArray" is not getting passed as a parameter. could you please help me out regarding this.
Thanks
Sagar.