<?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: filename mail email PUT with unix varaible in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519933#M140930</link>
    <description>&lt;P&gt;UNIX environment variables are not automatically imported into SAS. Exceptions: environment variables that contain a path to a directory or to a file are automatically used as librefs or filerefs, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a macro variable from a UNIX environment variable, use the %sysget() function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
filename mail email 
to=(&amp;amp;mv_email_destinataire_list) 
from="SAS"		
subject="Export file";
file mail;
put "hello, please find enclosed the file";
PUT "link= \\\%sysget(GRPFPU)\Export_files\result.xls";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To be more specific, I'd incorporate the protocol and proper UNIX-style syntax:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put "link= https://%sysget(GRPFPU)/Export_files/result.xls";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Replace https with whatever you're using to access the file.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Dec 2018 12:40:53 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-12-10T12:40:53Z</dc:date>
    <item>
      <title>filename mail email PUT with unix varaible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519906#M140911</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
filename mail email 
to=(&amp;amp;mv_email_destinataire_list) 
from="SAS"		
subject="Export file";
file mail;
put "hello, please find enclosed the file";
PUT "link= \\\ukipu004.dummy-website.fr\cdg\Export_files\result.xls";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;by launching this code, it works. I mean, in the reveived email, by clicking on the link, the file is found and opened.&lt;/P&gt;&lt;P&gt;however I 've got a unix variable $GRPFPU that contains ukipu004.dummy-website.fr\cdg&lt;/P&gt;&lt;P&gt;so I try to launch with this line ==&amp;gt;PUT "link= \\\$GRPFPU\Export_files\result.xls";&lt;/P&gt;&lt;P&gt;but the email contains \\\$GRPFPU\Export_files\result.xls instead of \\\ukipu004.dummy-website.fr\cdg\Export_files\result.xls then this link doesn't work.&lt;/P&gt;&lt;P&gt;thanks a lot in adavance for your help&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Nasser&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 11:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519906#M140911</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-12-10T11:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: filename mail email PUT with unix varaible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519933#M140930</link>
      <description>&lt;P&gt;UNIX environment variables are not automatically imported into SAS. Exceptions: environment variables that contain a path to a directory or to a file are automatically used as librefs or filerefs, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a macro variable from a UNIX environment variable, use the %sysget() function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
filename mail email 
to=(&amp;amp;mv_email_destinataire_list) 
from="SAS"		
subject="Export file";
file mail;
put "hello, please find enclosed the file";
PUT "link= \\\%sysget(GRPFPU)\Export_files\result.xls";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To be more specific, I'd incorporate the protocol and proper UNIX-style syntax:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put "link= https://%sysget(GRPFPU)/Export_files/result.xls";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Replace https with whatever you're using to access the file.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 12:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519933#M140930</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-10T12:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: filename mail email PUT with unix varaible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519946#M140938</link>
      <description>&lt;P&gt;thnaks a mot Kurt. It works as attended. evenf if the link is a littl weird with "\" and "/" like this :&lt;/P&gt;&lt;P&gt;lien= \\\/ukipu004.dummy-website.fr\folst\Export_files\result.xls&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 13:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-mail-email-PUT-with-unix-varaible/m-p/519946#M140938</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-12-10T13:08:39Z</dc:date>
    </item>
  </channel>
</rss>

