<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic warning in Log- code to send an email via sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/warning-in-Log-code-to-send-an-email-via-sas/m-p/978831#M378688</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;Hello&lt;BR /&gt;&lt;BR /&gt;I am writing a long sas code that create a permanent data set in a library called r_r.&lt;BR /&gt;Then I want to send an email from sas about it.&lt;BR /&gt;&lt;BR /&gt;I get one warning message in Log:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6924         /* 1) Reset */
6925       ods _all_ close;
6926       ods listing close;
194                                                        The SAS System                          13:20 Thursday, November 13, 2025

6927       ods results off;
6928       filename m clear;
WARNING: No logical assign for filename M.
&lt;/CODE&gt;&lt;/PRE&gt;
Here is the code I run to send the email.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/****Send via Email**********/
/****Send via Email**********/
/****Send via Email**********/
proc sql  noprint;
select put(max(Haamada_date),ddmmyy10.) as max_Haamada_date  into : max_Haamada_date
from r_r.XXXPanel_xxxt_CS
;
quit;
 

/*%let TO_Email=("Ron.Einstein@BankLeumi.co.il");*/


  /* 1) Reset */
ods _all_ close; 
ods listing close; 
ods results off; 
filename m clear;

FILENAME m EMAIL 
/*TO=&amp;amp;TO_Email.*/
TO="xxx.xxx@xxx.co.il"
FROM="xxx.xxx@xxx.co.il"
SUBJECT="xxxx-CS" 
CONTENT_TYPE="text/html" 
encoding="utf-8";
data _null_;
  file m lrecl=32767;
  put "פאנל  חדש עודכן עד  תאריך &amp;amp;max_Haamada_date. &amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "בברכה &amp;lt;br&amp;gt;";
  put "xxx xxx &amp;lt;br&amp;gt;";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 18:29:48 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2025-11-13T18:29:48Z</dc:date>
    <item>
      <title>warning in Log- code to send an email via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/warning-in-Log-code-to-send-an-email-via-sas/m-p/978831#M378688</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;Hello&lt;BR /&gt;&lt;BR /&gt;I am writing a long sas code that create a permanent data set in a library called r_r.&lt;BR /&gt;Then I want to send an email from sas about it.&lt;BR /&gt;&lt;BR /&gt;I get one warning message in Log:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6924         /* 1) Reset */
6925       ods _all_ close;
6926       ods listing close;
194                                                        The SAS System                          13:20 Thursday, November 13, 2025

6927       ods results off;
6928       filename m clear;
WARNING: No logical assign for filename M.
&lt;/CODE&gt;&lt;/PRE&gt;
Here is the code I run to send the email.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/****Send via Email**********/
/****Send via Email**********/
/****Send via Email**********/
proc sql  noprint;
select put(max(Haamada_date),ddmmyy10.) as max_Haamada_date  into : max_Haamada_date
from r_r.XXXPanel_xxxt_CS
;
quit;
 

/*%let TO_Email=("Ron.Einstein@BankLeumi.co.il");*/


  /* 1) Reset */
ods _all_ close; 
ods listing close; 
ods results off; 
filename m clear;

FILENAME m EMAIL 
/*TO=&amp;amp;TO_Email.*/
TO="xxx.xxx@xxx.co.il"
FROM="xxx.xxx@xxx.co.il"
SUBJECT="xxxx-CS" 
CONTENT_TYPE="text/html" 
encoding="utf-8";
data _null_;
  file m lrecl=32767;
  put "פאנל  חדש עודכן עד  תאריך &amp;amp;max_Haamada_date. &amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "&amp;lt;br&amp;gt;";
  put "בברכה &amp;lt;br&amp;gt;";
  put "xxx xxx &amp;lt;br&amp;gt;";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 18:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/warning-in-Log-code-to-send-an-email-via-sas/m-p/978831#M378688</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-11-13T18:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: warning in Log- code to send an email via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/warning-in-Log-code-to-send-an-email-via-sas/m-p/978832#M378689</link>
      <description>&lt;P&gt;You try to clear a file reference that does not exist. Remove the FILENAME CLEAR statement.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 18:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/warning-in-Log-code-to-send-an-email-via-sas/m-p/978832#M378689</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-11-13T18:56:22Z</dc:date>
    </item>
  </channel>
</rss>

