Page 1 of 1

Parameterizing Attached file path in DSSendmail routine

Posted: Thu Aug 28, 2008 6:29 am
by shaonli
Hi,

I want to attach a file in mail which I am sending from Datastage.I am using DSsendmail Routine.
There When I am explicitly giving Attached file path then the file is going in mail.
But when I am using Parameter in file path it is showing Cannot open file.

Arg:

"From:me@here\nTo:you@there\nSubject:Hi ya\nAttach:test/reject/AFile.txt\nBody:Line1"

when I am giving this the file is attached with mail,

But when I am giving the Argument in below foramts it is showning error Cannot open file

"From:me@here\nTo:you@there\nSubject:Hi ya\nAttach:$para_Rej/AFile.txt\nBody:Line1"

"From:me@here\nTo:you@there\nSubject:Hi ya\nAttach:#$para_Rej#/AFile.txt\nBody:Line1"

Can't it be parameterized.

Please suggest.

Thanks
Shaonli

Posted: Thu Aug 28, 2008 6:31 am
by shaonli
Sorry the job is Parallel

Posted: Thu Aug 28, 2008 6:51 am
by Jasti
I have also tried and failed to pass parameters in the fields From and To Addresses to DSSendmailTester Routine Activity and I feel that it can't be parameterized. :)

In case of notification stage also..viewtopic.php?t=121727

Posted: Thu Aug 28, 2008 7:37 am
by chulett
shaonli wrote:Sorry the job is Parallel
Sorry, the job is Sequence. :wink:

Posted: Thu Aug 28, 2008 7:44 am
by chulett
I've had no issues using Job Parameters in the Notification Activity for either email address, the subject nor the attachment, all happily support them. As noted and AFAIK the body doesn't but it's been a long time since I've tried that.

Your problem is the fact that you are passing in a literal string so none of your parameters get resolved. You can build the string outside of the call itself, concatenating the strings to the parameters so the resolved values get incorporated into the final string.

Posted: Mon Sep 01, 2008 1:11 am
by shaonli
Yes it has been possible by passing paramter outside DSsend Mail routine.The Argument is passed from Unix script.
in the argument if routine I am giving that value as Command Output.

So it has been possible to parameterized.

Thanks a lot..
:) Shaonli

Posted: Mon Sep 01, 2008 1:13 am
by shaonli
Yes it has been possible by passing paramter outside DSsend Mail routine.The Argument is passed from Unix script.
in the argument if routine I am giving that value as Command Output.

So it has been possible to parameterized.

Thanks a lot..
:) Shaonli