DSSendMail syntax question

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

DSSendMail syntax question

Post by RodBarnes »

I am using DSSendMail as an after-job subroutine. Mostly, it works correctly but when I attempt to have it send an attachment, it reports:
  • Cannot open attachment file 'D:\Ascential\DataStage\Staging\Orbit_rod\seqCompliance\Rejects\UnknownBase.csv'
Which is the correct path and filename. I can confirm the file is there and I can open it.

The statement I am using is found below.

Code: Select all

From: #jpSequence#@datastage.adp.com\nTo: #jpSmtpRecip# #jpSmtpCopy#\nSubject: (#jpOrbitServer#.#jpOrbitUserId#): Unknown system bases\nServer: #jpSmtpHost#\nAttach: #jpFilePath#\#jpProject#\#jpSequence#\Rejects\UnknownBase.csv\nBody: The attached file contains the list of systems that show an unknown OS or Hardware base.
If I remove the "Attach" segment (below), it works fine.

Code: Select all

From: #jpSequence#@datastage.adp.com\nTo: #jpSmtpRecip# #jpSmtpCopy#\nSubject: (#jpOrbitServer#.#jpOrbitUserId#): Unknown system bases\nServer: #jpSmtpHost#\nBody: The attached file contains the list of systems that show an unknown OS or Hardware base.
Can anyone point me to a reason why the file would not be accessible?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are the values (from the "job starting" log message) for the job parameters jpFilePath, jpProject and jpSequence ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Post by RodBarnes »

I just took at closer look at the message and there is a leading space between the (') and the "D:\Ascential..." I guess it needs to not have spaces between the tokens and the values. Removed them and it worked.

Thanks for your reply, Ray.
Post Reply