<?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 Re: Hyperlink not work in email in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727986#M226505</link>
    <description>&lt;P&gt;I played around with it (Apple mail client on a Mac). https: links are properly recognized and handed off to the browser, but the file: link needs to be right-clicked to call up the context menu containing "Open with...".&lt;/P&gt;</description>
    <pubDate>Sun, 21 Mar 2021 09:18:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-03-21T09:18:49Z</dc:date>
    <item>
      <title>Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727291#M226175</link>
      <description>&lt;P&gt;Hello helpers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to look for solutions but could not find any that could resolve the problem that I have.&lt;/P&gt;
&lt;P&gt;The email sent automatically when production completed. Although the link shows correct file path when you hover around it, it will not direct to the correct path.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When copy the hyperlink from the email, it replaces "\" and space in the path, i.e. "file%3A%5C%5C".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone advise how to make the hyperlink work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Test script:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

%macro email_test_link(DS);

/*set the folder for hyperlink in the email*/
%let nobs=%eval(0) ;
proc sql noprint;
	select nobs into :nobs
	from dictionary.tables
	where libname = 'WORK' and memname = %sysfunc(upcase("&amp;amp;ds"));
quit;

* Send email to developer for log check;
filename mymail email 
to=(&amp;amp;email_to.)
TYPE='TEXT/HTML'
SUBJECT = "Production log check complete on &amp;amp;SYSDAY &amp;amp;SYSDATE9"
;

data _null_;
	file mymail;
	put '&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;';
	put '&amp;lt;style type="text/css" MEDIA=screen&amp;gt;&amp;lt;!--';
	put 'body { color: #346170; font-family: Verdana; font-size: 12pt; }';
	put '.errorMessage { color: Red; font-size: 16pt; }'; 
	put '--&amp;gt;&amp;lt;/style&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;';
	put "Hello -&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; production is complete.";
	put "&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;";
	put "Check data outputs in the daily folder:";
	put '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;';
	put "&amp;lt;a href=&amp;amp;daily_data.&amp;gt;links&amp;lt;/a&amp;gt;";
	put "&amp;lt;br/&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;";
	put '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;';
	put "Total records for &amp;amp;DS: &amp;amp;nobs &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";
	put "&amp;lt;br/&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;";
	%if &amp;amp;nobs = 0 %then %do;
		put '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;span class="errorMessage"&amp;gt;';
		put 'Process may failed, check required!';
		put "&amp;lt;/span&amp;gt;";
		put "&amp;lt;br/&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;";
	%end;
	put '&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';
	put "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";
	put "--------------------------------------------------------------------------------------------------&amp;lt;br&amp;gt;";
	put "Job Started Execution at:  &amp;amp;STARTTIME_Char and completed at: &amp;amp;CompletedTime_Char &amp;lt;br&amp;gt;";
	put "SAS session started running at: &amp;amp;systime on &amp;amp;SYSDAY &amp;amp;SYSDATE9";
run; 

%mend email_test_link;



%let daily_data = %sysfunc(URLENCODE(file:\\xx\HomeDir$\xx\Downloads\)); 
%let email_to=%str("xxx@xx.xx.xx" );

data test;
a="HHAAHA";
run;


%email_test_link(test);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Mar 2021 02:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727291#M226175</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-18T02:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727306#M226184</link>
      <description>&lt;P&gt;Blind guess:&lt;/P&gt;
&lt;P&gt;Add some quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put "&amp;lt;a href='&amp;amp;daily_data.'&amp;gt;links&amp;lt;/a&amp;gt;";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and change the \ to / when setting daily_data.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 05:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727306#M226184</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-18T05:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727324#M226192</link>
      <description>&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/File_URI_scheme" target="_blank" rel="noopener"&gt;file URI scheme&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uses forward slashes, regardless of platform.&lt;/P&gt;
&lt;P&gt;Change your PUT statement to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put '&amp;lt;a href="'"&amp;amp;daily_data."'"&amp;gt;links&amp;lt;/a&amp;gt;';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Mar 2021 08:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727324#M226192</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-18T08:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727552#M226310</link>
      <description>Hey Thanks ... forgot to mention that I have already tried the "/"</description>
      <pubDate>Thu, 18 Mar 2021 20:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727552#M226310</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-18T20:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727553#M226311</link>
      <description>Will try and see</description>
      <pubDate>Thu, 18 Mar 2021 20:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727553#M226311</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-18T20:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727559#M226314</link>
      <description>Hi Kurt,&lt;BR /&gt;&lt;BR /&gt;Thanks for the option.&lt;BR /&gt;&lt;BR /&gt;Have tested all different slash options for daily_data together with your suggestion, unfortunately I have no luck yet.</description>
      <pubDate>Thu, 18 Mar 2021 20:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727559#M226314</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-18T20:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727704#M226393</link>
      <description>&lt;P&gt;On which platform (operating system) do you read the mail, and with which application?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 09:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727704#M226393</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-19T09:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727984#M226504</link>
      <description>Hi Kurt, Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;It is weird that I no longer receive the SAS communities notification email..&lt;BR /&gt;&lt;BR /&gt;Windows 10 Enterprise&lt;BR /&gt;Office 365 Outlook</description>
      <pubDate>Sun, 21 Mar 2021 08:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727984#M226504</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-21T08:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727986#M226505</link>
      <description>&lt;P&gt;I played around with it (Apple mail client on a Mac). https: links are properly recognized and handed off to the browser, but the file: link needs to be right-clicked to call up the context menu containing "Open with...".&lt;/P&gt;</description>
      <pubDate>Sun, 21 Mar 2021 09:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727986#M226505</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-21T09:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink not work in email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727988#M226507</link>
      <description>sad I can not do that on my laptop</description>
      <pubDate>Sun, 21 Mar 2021 09:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hyperlink-not-work-in-email/m-p/727988#M226507</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-03-21T09:35:57Z</dc:date>
    </item>
  </channel>
</rss>

