Hi folks. Thanks for the pointers getting a Job Control set up to send e-mail when a job aborts. Im VERY close to having it to work the way I want, but Im still having a little bit of trouble. I downloaded a command line mailer that does exactly what I want it to do (in this case, "Postie")....that is, when I run it from the command line. When I execute it using the DSExecute subroutine in the NT environment, I have mixed results. The problem Im having is that no matter what combination of (for lack of a better phrase) sting container characters (i.e. " or or ) I use, I cannot get more than the first word of the string to be sent in the e-mail (note that Postie will send only the first word of a string if you do not use quotation marks around the text from the command line...Ive tested).
Its as if the double-quote characters are being stripped from the command by the DSExecute routine before the command is being executed. Has anyone else had a similar problem, and if so, how was it handled?
Below is a sample of the Job Control routine that Ive created...notice how I have "MailSubject" and "MailMessage" set up. It doesnt work. Ive tried every combination of the above mentioned characters I can think of. Any suggestions?
* Setup FTPTest, run it, wait for it to finish, and test for success
hJob1 = DSAttachJob("FTPTest", DSJ.ERRFATAL)
If NOT(hJob1) Then
Call DSLogFatal("Job Failed: FTPTest", "JobControl")
Abort
End
ErrCode = DSRunJob(hJob1, DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(hJob1)
Status = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
If Status = DSJS.RUNFAILED Then
MailHost= -host:ourhosename
MailTo= -to:Scott.Conder@ivyhill-wms.com
MailSubject= -s:"DataStage Error"
MailMessage= -msg:"FTPTest job Aborted!"
MailCommand="postie -high ":MailHost:MailTo:MailFrom:MailSubject:MailMessage
* Execute the mail routine
OutPut=""
SysRetCode=""
Call DSExecute ("NT", MailCommand, OutPut, SysRetCode)
* Fatal Error - No Return
Call DSLogEvent(hJob1, DSLogWarn, "Job Aborted, e-mail sent")
End
Command Line E-mail / DSExecute
Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.
Return to “Archive of DataStage Users@Oliver.com”
Jump to
- Moderators' Choice
- ↳ Editor's BLOG Corner
- ↳ Ask the Experts! - Dads and Grads
- ↳ DSXchange Testimonials
- ↳ Cognos (IBM BI)
- FAQs
- ↳ FAQs
- ↳ FAQ Discussion
- DataStage
- ↳ General
- ↳ IBM<sup>®</sup> Infosphere DataStage Server Edition
- ↳ IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- ↳ Archive of DataStage Users@Oliver.com
- IBM<sup>®</sup>Infosphere Products<sup></sup>
- ↳ Business Glossary
- Suggestions
- ↳ Site/Forum
- ↳ Enhancement Wish List
- Consulting
- ↳ Talent
- ↳ Looking for Talent
- Support
- ↳ Parameter Manager
- ↳ Compile All Plus
- Usergroup Forums
- ↳ Usergroup Central Forum
- ↳ Heartland Usergroup Forum
- The Written Word
- ↳ Articles, White Papers and Tips and Tricks
- ↳ Product Documentation
- Third Party Applications
- ↳ Third Party Applications
- Product Derivatives
- ↳ Functions
- ↳ Routines
- ↳ Jobs
- ↳ Logs
- Tools
- ↳ Tools Forum
- Category
- ↳ Infosphere Master Data Management
- ↳ Data Quality Best Practices
- ↳ IBM QualityStage
- ↳ Information Analyzer (formerly ProfileStage)
- ↳ IBM<sup>®</sup> SOA Editions (Formerly RTI Services)
- ↳ IBM<sup>®</sup> DataStage TX
- ↳ BI
- ↳ Data Integration