Sending mails (2)

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
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Sending mails (2)

Post by gpbarsky »

[:)][:)][:)][:)][:)]
Hi.

Can anybody tell me what's wrong in the code this ROUTINE ?

*
* Envio de notas
*
Ans = "";
Deffun DSX.DSSendMail(A);
*
xFrom = "From:notificacion-etl@osde.com.ar";
xTo = "To:":pmSendTo;
xSubject = "Subject:":pmSubject;
xServer = "Server:osde-central-2.osde";
xBody = "Body: IMPORTANCIA-":pmImportancia;
xBody = xBody:" n n":pmL1;
xBody = xBody:" n":pmL2;
xBody = xBody:" n":pmL3;
xBody = xBody:" n":pmL4;
xBody = xBody:" n":pmL5;
xBody = xBody:" n":pmL6;
xBody = xBody:" n":pmL7;
xBody = xBody:" n":pmL8;
xBody = xBody:" n":pmL9;
xBody = xBody:" n":pmL10;
xBody = xBody:" n":pmL11;
xBody = xBody:" n":pmL12;
xBody = xBody:" n":pmL13;
xBody = xBody:" n":pmL14;
xBody = xBody:" n":pmL15;
xBody = xBody : " n n n*** DataStage - Cobranzas ***";
*
CALL DSLogInfo("va a mandar el mail.","MasterJobSB");
rc = DSX.DSSendMail(xFrom:"n":xTo:"n":xSubject:"n":xServer:"n":xBody:"n");
CALL DSLogInfo("RC-":rc:".","MasterJobSB");
*
IF rc "0"
THEN
CALL DSLogFatal("Error en el DSSendMail.","MSG");
Ans = "ERROR1";
END
ELSE
CALL DSLogInfo("** Se ha enviado un mail a ":pmSendTo:" por el asunto ":pmSubject:".","MSG");
END


All parameters are variables whose name begins with "pm". It compiles fine, but when I run it I get an error message "ERROR". And this is not the message sent by the routine.

As a job, it works fine, but as a routine it does not.

Any help on this will be appreciated.

Bye.
[:)][:)][:)][:)][:)]

Guillermo P. Barsky
Buenos Aires - Argentina
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Post by gpbarsky »

Thank you Emma [:I]

But the thing is that I have not a Unix system, I have an NT system. And what is DWFindFile ?

Thanks again [;)]


Guillermo P. Barsky
Buenos Aires - Argentina
Post Reply