<?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: Create email when directory fail in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Create-email-when-directory-fail/m-p/813420#M34119</link>
    <description>&lt;P&gt;Use a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
length dref $8;
rc = filename(dref,"C:\Documents and Settings");
did = dopen(dref);
if did
then do;
  call symputx("dir_open","1");
  rc = dclose(did);
end;
else call symputx("dir_open","0");
rc = filename(dref);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Macro variable dir_open can be used as a boolean value to make the decision of either continuing or sending the mail.&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 08:03:25 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-05-16T08:03:25Z</dc:date>
    <item>
      <title>Create email when directory fail</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-email-when-directory-fail/m-p/813411#M34118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename DIRLIST pipe 'dir "C:\Documents and Settings" /b';&lt;/P&gt;&lt;P&gt;data dirlist ;infile dirlist lrecl=200 truncover;&lt;BR /&gt;input file_name $100.&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way SAS can generate an email when directory path/file is not available/file is locked. So the email brings the attention to be resolve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In data step please.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 03:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-email-when-directory-fail/m-p/813411#M34118</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2022-05-16T03:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create email when directory fail</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-email-when-directory-fail/m-p/813420#M34119</link>
      <description>&lt;P&gt;Use a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
length dref $8;
rc = filename(dref,"C:\Documents and Settings");
did = dopen(dref);
if did
then do;
  call symputx("dir_open","1");
  rc = dclose(did);
end;
else call symputx("dir_open","0");
rc = filename(dref);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Macro variable dir_open can be used as a boolean value to make the decision of either continuing or sending the mail.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 08:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-email-when-directory-fail/m-p/813420#M34119</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-16T08:03:25Z</dc:date>
    </item>
  </channel>
</rss>

