Sending e-mail thru SAS


    Sponsored Links


  • 1. Blank is not blank but some other character?
    Hi All, I have a data which seems to be blank space but on trying length(compress(Variable)) its not coming to be 1 but is more than one indicating that the value which seems to be blank but is some other character which seems in SAS as blank. Please help its urgent! Thanks.
  • 2. Library
    Is there any way around the library name length limitation of 8 characters? Thanks! =20 Derek Reed Research, Analytics, and Reporting Sinclair Community College 444 West Third Street, Rm. 7242 Dayton, Ohio 45402 =20
  • 3. Change the character to date
    Hi All Simple question: I have some date variables were saved in character format like"2000-1-1" or "1999-01-15". Does anyone have simple method to change the format from character to date format. Thanks much! Jane
  • 4. proc stepdisc
    If I am not mistake, you can use proc STEPDISC when you have a classification dependent variable with 2 or more levels, and several quantitative independent variables, and you want to know which of these quantitative variables better predict the outcome of the classification variable. Couldn you achieve the same goal with proc LOGISTIC?
  • 5. AE Table --Maximum grade
    Hi , I am working on this table adverse events by grade and it should report maximum grade for subject with multiple occurences of same event. I know how to do this table but not sure how to count the soc's for this kind of table should it be counted the same way that events are counted Thanks in advance

Sending e-mail thru SAS

Postby » Fri, 01 Aug 2008 21:43:11 GMT


I want to send e-mail thru SAS, but my outlook is not configured in
I do want to send the mail with out configuring the outlook, is there
any way?

Please give the setting needed in the SAS.

I'm successful with the computer where the MS Outlook is configured.

Thanks in advance.

Sukumar Baluswamy

Re: Sending e-mail thru SAS

Postby anindya.lugbang » Fri, 01 Aug 2008 22:01:46 GMT

filename mymail email from="<your email id>"
                      to="<to email id>"
                      subject="Put Subject Here"
                      content_type="text/html" emailsys=smtp
emailid="logon id" emailpw="password";
data _null_;
   file mymail;
   put 'hello world';

On Thu, Jul 31, 2008 at 6:13 PM,  XXXX@XXXXX.COM 

Re: Sending e-mail thru SAS

Postby anindya.lugbang » Fri, 01 Aug 2008 22:04:21 GMT

More info -  http://www.**--****.com/ 

On Thu, Jul 31, 2008 at 6:31 PM, Anindya Mozumdar

Similar Threads:

1.Sending email from and to SUGI-mail account

Hi friends,

I just tested sending email from my SUGI account ( XXXX@XXXXX.COM ) to my home one again and now it worked! So the accounts are reachable from and to outside. But a testmail to SAS-L failed as I am not subscribed with that account.

Regards from an overwhelming impressive conference - Jim.

2.Formatting email body when sending email from a z/OS system

All information in and attached to the e-mail(s) below may be =
proprietary, confidential, privileged and otherwise protected from =
improper or erroneous disclosure.  If you are not the sender's intended =
recipient, you are not authorized to intercept, read, print, retain, =
copy, forward, or disseminate this message.  If you have erroneously =
received this communication, please notify the sender immediately by =
phone (704-758-1000) or by e-mail and destroy all copies of this message =
(electronic, paper, or otherwise).  Thank you.

I am having an issue when I send emails from my z/OS system using PUTs
in a DATA step.  My file definition is
FILENAME techserv EMAIL                                          =20
         TYPE=3D'text/html'                                        =20
         TO=3D(' XXXX@XXXXX.COM '                               =20
            )                                                    =20
         FROM=3D' XXXX@XXXXX.COM '                              =20
         SUBJECT=3D"Jobs running high CPU compared to Wall Clock"  =20
         ;                                                       =20

And my DATA step looks like
DATA _NULL_ ;                                                    =20
  FILE techserv ;                                                =20
  PUT "This is a list of jobs with programs that should be   ";  =20
  PUT "investigated.                                         ";  =20
  PUT "                                                      ";  =20
  PUT ;                                                          =20
  PUT "The programs in the jobs are running at least         ";  =20
  PUT "&display_wall. hours and are consuming at least       ";  =20
  PUT "&display_pct. CPU of a single engine.                 ";  =20
  PUT "                                                      ";  =20
  PUT ;                                                          =20

But the email message body looks like
This is a list of jobs with programs that should be investigated. The
programs in the jobs are running at least 0:15 hours and are consuming
at least 80% CPU of a single engine.

Can someone tell me what I'm doing wrong and point me to where I can
learn more?

Jim Horne
ITE-Large Systems & Messaging
Lowe's Companies, Inc.

3.Send e-mail through SAS and REXX.

Hi SAS'ers 

        I wish to send e-mail through SAS. So, i developed a REXX
Panel where i can supply all the Mail-ids and the Message. Now through
SYSPARM, i am not able to pass all addresses because it has a
restriction that we can only pass upto some maximum length through a

So finally decided that, let Rexx program write all the the Id's and
the Message to a Output File so that this can be used as an Input to
my SAS program in the next JCL Step.  So i came up with a SAS program
like below that reads the file.

Input File containing the Id's and Messages: 

Hello dear, 
        Pls help me to succeed in sending mails to 
my dear ones through SAS; 

So, all the string appearing inbetween the lines To: and CC: needs to
be concatenated into another new field say, TOIDS. Same way for the
another fields CCIDS. But for messages, i will save each line in one
temporay variable until EOF.
In Rexx,, its quite easy to implement the above logic, but is it
possible to do the same way in SAS.

The SAS Program follows here, but i'm not able to run it

  %LET array todata (5) $ todata1-todata5;        /*Unable to declare
Arrays  globally, it gives error */
  %LET array ccdata (4) $ ccdata1-ccdata4;        /*Unable to declare
Arrays  globally, it gives error */
  %LET array msgdata (2) $ msgdata1-msgdata2;      /*Unable to declare
Arrays  globally, it gives error */
 data r ;
  retain i 1; 
  retain j 1; 
  retain k 1; 
  retain type 1; 
  infile mailfile; 
  input   inrec;       
  if inrec = 'To' then  type = 1; 
  else if inrec = 'CC' then type = 2;   
  else if inrec = 'Message' then type = 3;
  if type = 1 and inrec NE 'To' then;         
        todata (i) = inrec;
else if type = 2 and inrec NE 'CC' then; 
        todata (j) = inrec;
else if type = 3  then 
              msgdata(k) = inrec; 
data getarr;  /*The arrays todata(), ccdata() and msgdata() should be
accessible here*/
RETAIN TOIDS _CHARACTER_;  /*How to initialize it here, since this is
a variable length*/
RETAIN CCIDS _CHARACTER_; /*How to initialize it here, since this is a
variable length*/
do i= 1 to 5; 
   TOIDS =  TOIDS || ' ' || todata(i); 
TOIDS = strip(TOIDS); 
do j= 1 to 4; 
   CCIDS = CCIDS || ' ' || ccdata(j); 
CCIDS = strip(CCIDS); 
do while msgdata(k) NE ' ' 
       put 'msgdata(i)'; 


I have given comments wherever it errored out. Please update me how to
solve these errors.

Alternatively, i tried even interacting SAS with REXX execs, but i was
getting some problems while executing. Can you tell me what changes
needs to be done inorder to make it work. This message is somewhat
longer as i need to post the entire program with input dataset and i'm
extremely sorry for that!.

Thanks in anticipation.

4.Send a mail with SAS

Hello everybody,

Is someone know how to send a mail with a programm SAS. The mail may
contain some sentence in bold, in color and underligned.



5.Sending mail with SAS

Hello SasUsers,

How to send a mail via SAS with the result ODS HTML directly in the
body of the mail.

Thanks. Ash007.

INPUT X1 X2 X3 X4 X5 $; CARDS;
2 5 5 1161 ABIEN
35 6 3 1336 ALMIC
82 1 5 1499 ANIEL

filename mm email
	to 				= " XXXX@XXXXX.COM "
	from 			= " XXXX@XXXXX.COM "
	subject 		= "test email formate"
	type 			= "text/html"
	content_type 	= "text/html";

ods html body = mm style = styles.default rs = none ;

proc print data = TABLE_BIDON; run;

ods html close;

6. Sending an E-Mail using SAS

7. Sending emails via Outlook from SAS but a security Yes/No box appe

8. Sending email from SAS using Gmail account

Return to sas


Who is online

Users browsing this forum: No registered users and 46 guest