DSsendmail Special Characters Issue
Posted: Mon Sep 15, 2008 12:05 pm
I have a after job subroutine which sends out emails. It sends out a link to a file for our customers to view.
We are moving from DataStage 7.1 Server Edition to DataStage 7.5 Parallel Edition. The routine has always worked correctly on the server edition.
Here is the code:
The filename that comes in the email that is sent out, looks like this:
\servername$cldirectory\subdirectory\Stats.xls
If I add an additional \ at the begining of the filename that is passed in (\\\servername\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername$cldirectory\subdirectory\Stats.xls
If I also add an additional \ near the $ (\\\servername\\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername\\$cldirectory\subdirectory\Stats.xls
If I add a / near the $ (\\\servername\/$cldirectory\subdirectory\Stats.xls), it results in:
\\servername\subdirectory\Stats.xls
If I add a / before the \ near the $ (\\\servername/\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername/\$cldirectory\subdirectory\Stats.xls
Which WORKS...but it's weird looking. Can someone tell me how the DSSendmail routine is different on enterprise 7.5 from server 7.1 and if there is something I can do to make this look correct?
We are moving from DataStage 7.1 Server Edition to DataStage 7.5 Parallel Edition. The routine has always worked correctly on the server edition.
Here is the code:
Code: Select all
code = DSSendMail("from:DATASTAGE@spt.com\nto:myemail@address.com\nSubject: Statistics\nBody:This report shows the latest Statistics. Please do not reply to this email address. This email was generated by an automated system.\n \nReport can be found at: \\servername\$cldirectory\subdirectory\Stats.xls\n \n")
\servername$cldirectory\subdirectory\Stats.xls
If I add an additional \ at the begining of the filename that is passed in (\\\servername\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername$cldirectory\subdirectory\Stats.xls
If I also add an additional \ near the $ (\\\servername\\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername\\$cldirectory\subdirectory\Stats.xls
If I add a / near the $ (\\\servername\/$cldirectory\subdirectory\Stats.xls), it results in:
\\servername\subdirectory\Stats.xls
If I add a / before the \ near the $ (\\\servername/\$cldirectory\subdirectory\Stats.xls), it results in:
\\servername/\$cldirectory\subdirectory\Stats.xls
Which WORKS...but it's weird looking. Can someone tell me how the DSSendmail routine is different on enterprise 7.5 from server 7.1 and if there is something I can do to make this look correct?