BookmarkSubscribeRSS Feed
venkatard
Calcite | Level 5

I had used the below code but i get the following error.

FILENAME outmail EMAIL

SUBJECT="Results as of %sysfunc(date(),yymmdd10.)"

FROM= "email";

DATA _NULL_;

FILE outmail

TO= "email"

ATTACH="C:\Users\sas\Desktop\outlier.html";

PUT "Here are the results of your query";

RUN;

error message -

ERROR: Undetermined I/O failure.

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:

  You might want to open a track with SAS Tech Support about this. Generallly, there are various options that must be set in order for email to work correctly. The options are documented in the discussion of email in the doc. It will be necessary to know, for example, whether you are using SMTP or POP mail, what you operating system is, what the name of your mail host and other options.

cynthia

Doc_Duke
Rhodochrosite | Level 12

There are lots of ways for the e-mail interface to fail.  A couple of things to check:

  • your system options (e-mail ones start with EMAIL).
  • the type of e-mail service (MAPI or SMTP)
  • do you have access to SMTP?  Your network admins can block that.

Doc Muhlbaier

Duke

sas4ml
Fluorite | Level 6

Hi,

Which version of SAS are you running? If you are running a 64-bit version of SAS® 9.2 in a Windows x64 operating environment with Microsoft Outlook 2007 or 2010 or Lotus Notes as the 32-bit MAPI client.

The behavior does not occur with the 32-bit version of SAS 9.2 on a Windows x64 machine with a 32-bit MAPI client such as 32-bit Microsoft Outlook or 32-bit Lotus Notes. 

Likewise, the behavior does not occur with 64-bit SAS with a 64-bit MAPI client such as Outlook 2010 64-bit edition. The system type architecture of SAS and the MAPI e-mail client software should match. Otherwise, the error occurs.

Please refer to the documentation provided in the following link

http://support.sas.com/kb/41/961.html

Hope this helps!

Thanks

I have suggested a few changes to the lines denoted by <<<<<.

For the first line corresponding to FILENAME , I think you should include an email address of the recipient.

FILENAME outmail EMAIL  'address'   <<<<

SUBJECT="Results as of %sysfunc(date(),yymmdd10.)"

FROM= "email";

DATA _NULL_;

FILE outmail

TO= "email"   

ATTACH="C:\Users\sas\Desktop\outlier.html";

PUT "Here are the results of your query";

RUN;


Sudhakar_A
Calcite | Level 5

FILENAME MailBox EMAIL 'mailid@xxxx.com'

    SUBJECT='Batch_summary'

        attach="F:\Batch_Summary.xls";

    options emailsys=smtp emailid='myemailid@xxxx.com' emailpw=xxxxx EMAILHOST=mail.xxxx.com;

    data _null_;

        file mailbox;

        put /' Hi All,' /;

        put ' Batch executed, check the attachment for log and comparison issues.' /;

        put ' Regards';

        put ' SAS 9.3';

       run;



sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 5154 views
  • 0 likes
  • 5 in conversation