<?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 Different results in SAS Enterprise Guide and SAS Base in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-results-in-SAS-Enterprise-Guide-and-SAS-Base/m-p/418001#M102681</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;try to send report by Email using SAS EG, But when I try the same code in SAS Base, there is an error happen as&amp;nbsp;warrning in the begin include this messege: "WARNING: No output destinations active." .&lt;/P&gt;&lt;P&gt;Then, &amp;nbsp;the report only shows 2 columns of 6, after that the macro report window doesn't close by itself so I close it by myself so I can go back to the editor to check program and run it again.&lt;/P&gt;&lt;P&gt;Then, When I close the window, there is an error appear in the log which is: "ERROR: Email: The connection was refused.".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro send_mail(); 
options emailsys=smtp;
options emailauthprotocol=none;
*options emailhost="xx.xx.xx";
*options emailport=25;
*options emailpw = "xxxxxx";

 
filename temp email
to = ( "my@email.com" )
subject="Test"
type="text/html"
from ="xxxxx@xxxx.com" ;

 
ODS html body=temp style =  RTF ;  /*HTMLBlue JOURNAL ANALYSIS  PEARL LISTING SAPPHIRE */
ods html text = "This is an automatic message please do not reply,";
ods html text = "there is an issue!" ;

ods html text = "";
 
PROC REPORT DATA=WORK.x
 
style (report) = {background = white
font_face = "Verdana" font_size = 7pt just=left }
style (column) = {background = white CELLHEIGHT = 2.5%
font_face = "Verdana" font_size = 7pt just=left}
style (header) = {foreground = cx5e2750 font_face="Verdana"
font_size = 8pt just=left
background = white} ;

DEFINE ISSUE_ID / 'Issue ID';
define REFERENCE_NO / 'Reference NO';
define ISSUE_SHORT_DESC / 'Issue Short Description';
define user_id / 'User ID';
define DISPLAY_NM / 'Display Name';
define Closed_Date /'Closed Date';

run;
ods html text = "";
ods html text = "Regards";
ods html text = "";
ods html text = "Risk Mgmt. Application support team ";
ods _all_ close;
%mend send_mail;

%macro check();
proc sql;
select count(*) 
into: n
from work.x;
quit;

%if &amp;amp;n = 0 %then
    %put "N is NOT" ;
%else 
	%send_mail;
  
%mend check;

/* call the macro */
%check;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is the log since the first warnning:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2643 %mend check;&lt;BR /&gt;2644 %check;&lt;BR /&gt;WARNING: No output destinations active.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Writing HTML Body file: TEMP&lt;/P&gt;&lt;P&gt;NOTE: There were 39 observations read from the data set WORK.RB_OBS_NOTI.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;real time 5:30.44&lt;BR /&gt;cpu time 0.50 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR: Email: The connection was refused.&lt;/P&gt;</description>
    <pubDate>Sun, 03 Dec 2017 11:47:13 GMT</pubDate>
    <dc:creator>Mohkad</dc:creator>
    <dc:date>2017-12-03T11:47:13Z</dc:date>
    <item>
      <title>Different results in SAS Enterprise Guide and SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-results-in-SAS-Enterprise-Guide-and-SAS-Base/m-p/418001#M102681</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;try to send report by Email using SAS EG, But when I try the same code in SAS Base, there is an error happen as&amp;nbsp;warrning in the begin include this messege: "WARNING: No output destinations active." .&lt;/P&gt;&lt;P&gt;Then, &amp;nbsp;the report only shows 2 columns of 6, after that the macro report window doesn't close by itself so I close it by myself so I can go back to the editor to check program and run it again.&lt;/P&gt;&lt;P&gt;Then, When I close the window, there is an error appear in the log which is: "ERROR: Email: The connection was refused.".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro send_mail(); 
options emailsys=smtp;
options emailauthprotocol=none;
*options emailhost="xx.xx.xx";
*options emailport=25;
*options emailpw = "xxxxxx";

 
filename temp email
to = ( "my@email.com" )
subject="Test"
type="text/html"
from ="xxxxx@xxxx.com" ;

 
ODS html body=temp style =  RTF ;  /*HTMLBlue JOURNAL ANALYSIS  PEARL LISTING SAPPHIRE */
ods html text = "This is an automatic message please do not reply,";
ods html text = "there is an issue!" ;

ods html text = "";
 
PROC REPORT DATA=WORK.x
 
style (report) = {background = white
font_face = "Verdana" font_size = 7pt just=left }
style (column) = {background = white CELLHEIGHT = 2.5%
font_face = "Verdana" font_size = 7pt just=left}
style (header) = {foreground = cx5e2750 font_face="Verdana"
font_size = 8pt just=left
background = white} ;

DEFINE ISSUE_ID / 'Issue ID';
define REFERENCE_NO / 'Reference NO';
define ISSUE_SHORT_DESC / 'Issue Short Description';
define user_id / 'User ID';
define DISPLAY_NM / 'Display Name';
define Closed_Date /'Closed Date';

run;
ods html text = "";
ods html text = "Regards";
ods html text = "";
ods html text = "Risk Mgmt. Application support team ";
ods _all_ close;
%mend send_mail;

%macro check();
proc sql;
select count(*) 
into: n
from work.x;
quit;

%if &amp;amp;n = 0 %then
    %put "N is NOT" ;
%else 
	%send_mail;
  
%mend check;

/* call the macro */
%check;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is the log since the first warnning:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2643 %mend check;&lt;BR /&gt;2644 %check;&lt;BR /&gt;WARNING: No output destinations active.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Writing HTML Body file: TEMP&lt;/P&gt;&lt;P&gt;NOTE: There were 39 observations read from the data set WORK.RB_OBS_NOTI.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;real time 5:30.44&lt;BR /&gt;cpu time 0.50 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR: Email: The connection was refused.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2017 11:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-results-in-SAS-Enterprise-Guide-and-SAS-Base/m-p/418001#M102681</guid>
      <dc:creator>Mohkad</dc:creator>
      <dc:date>2017-12-03T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Different results in SAS Enterprise Guide and SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-results-in-SAS-Enterprise-Guide-and-SAS-Base/m-p/418366#M102766</link>
      <description>&lt;P&gt;The proc sql at the start of macro check has nowhere to write the result of its select statement.&lt;/P&gt;
&lt;P&gt;Open a destination or write to a table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The mail error is a different matter and&amp;nbsp;I expect that your EG server has the email configured when our desktop SAS doesn't.&lt;/P&gt;
&lt;P&gt;Ask your SAS admin for the email parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 04:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-results-in-SAS-Enterprise-Guide-and-SAS-Base/m-p/418366#M102766</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-12-05T04:35:24Z</dc:date>
    </item>
  </channel>
</rss>

