How to pass "TO Email" address dynamically in DSSe

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Madhu1981
Participant
Posts: 69
Joined: Wed Feb 22, 2006 7:49 am

How to pass "TO Email" address dynamically in DSSe

Post by Madhu1981 »

Hi, I have a sequential file which contains Email Ids.

I have to write a routine, which should fetches the email id from the sequential file and mail has to be send dynamically to that email id which has been fetched earlier.

i have written a code like:

$INCLUDE DSINCLUDE JOBCONTROL.H

sleep 20

Dummy=0

vParamFile = '/dir1/folder/filename.txt'

OpenSeq vParamFile To FileVar Else
Call DSLogWarn("Cannot open ":vParamFile , "Cannot Open ParamFile")
End
loop
ReadSeq Dummy From FileVar Else Exit ;

code = DSSendMail("From:me@here.com\nTo:Dummy\nSubject:Hi ya\nBody:Line1")

Call DSLogInfo(Dummy, "Job Control")
repeat

CloseSeq FileVar


But the "ReadSeq Dummy From FileVar Else Exit " the dummy value is not getting passed to the TO address in the DSSendmail command.

let me know how to pass the to address to the DSSendmail command,

thanks,
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

should be:

Code: Select all

code = DSSendMail("From:me@here.com\nTo:": Dummy :"\nSubject:Hi ya\nBody:Line1")
Mamu Kim
Madhu1981
Participant
Posts: 69
Joined: Wed Feb 22, 2006 7:49 am

Thanks Duke

Post by Madhu1981 »

kduke wrote:should be:

Code: Select all

code = DSSendMail("From:me@here.com\nTo:": Dummy :"\nSubject:Hi ya\nBody:Line1")
Thanks a lot Duke, Its working fine now.
Post Reply