<?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: dirlistwin in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61944#M17594</link>
    <description>Just as an aside: using %sysevalf gives you the date value immediately.&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
[pre]&lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d) ;  &lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d+0) ;&lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d-5) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
When I want to edit the date value in macro logic I tend to use the intnx function like in&lt;BR /&gt;
[pre]&lt;BR /&gt;
%let my_date = %sysfunc(intnx(day,"&amp;amp;sysdate"d,-5),ddmmyyp10.) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
(where I know that syntactically the dot after the format name ain't needed)</description>
    <pubDate>Wed, 11 Aug 2010 06:31:41 GMT</pubDate>
    <dc:creator>Robert_Bardos</dc:creator>
    <dc:date>2010-08-11T06:31:41Z</dc:date>
    <item>
      <title>dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61940#M17590</link>
      <description>I looking at grabbing some files based the modification date and trying this with dirlistwin.  How do I get dirlistwin to recognize the modification date.  My goal is to grab files that are less than 5 day old.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Nick</description>
      <pubDate>Mon, 09 Aug 2010 20:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61940#M17590</guid>
      <dc:creator>nickb</dc:creator>
      <dc:date>2010-08-09T20:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61941#M17591</link>
      <description>You will need to modify the macro to get the date modified rather than the date created.  Use the dir /? command to see the syntax you need to change for your version of windows.   Then modify the first filename command in the macro.</description>
      <pubDate>Mon, 09 Aug 2010 20:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61941#M17591</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-08-09T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61942#M17592</link>
      <description>Thanks.  I got the macro edited so that it will read the correct date.  I want to incorporate the date filter and I don't want to hardcode the dates.  Do you know a way to do something like this:&lt;BR /&gt;
&lt;BR /&gt;
%dirlistwin (D:/temp/tmp/images,&lt;BR /&gt;
			OUT=work.temp,&lt;BR /&gt;
			REPORT=N,&lt;BR /&gt;
			MINDATE = "&amp;amp;sysdate."d - 5,&lt;BR /&gt;
			MAXDATE = "&amp;amp;sysdate."d&lt;BR /&gt;
			)&lt;BR /&gt;
&lt;BR /&gt;
The directory that I'm checking has MANY files and I only want the files that are 5 days old.</description>
      <pubDate>Tue, 10 Aug 2010 14:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61942#M17592</guid>
      <dc:creator>nickb</dc:creator>
      <dc:date>2010-08-10T14:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61943#M17593</link>
      <description>In the macro world you will have to force the conversion of the data constant.&lt;BR /&gt;
One way to do this is with the PUTN function.&lt;BR /&gt;
[pre]%macro test(now, then);&lt;BR /&gt;
%put now &amp;amp;now;&lt;BR /&gt;
%put then &amp;amp;then;&lt;BR /&gt;
%mend test;&lt;BR /&gt;
%test(%sysfunc(putn("&amp;amp;sysdate"d,6.)),  %eval(%sysfunc(putn("&amp;amp;sysdate"d,6.))-5))&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 11 Aug 2010 03:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61943#M17593</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-08-11T03:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61944#M17594</link>
      <description>Just as an aside: using %sysevalf gives you the date value immediately.&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
[pre]&lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d) ;  &lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d+0) ;&lt;BR /&gt;
%put %sysevalf("&amp;amp;sysdate"d-5) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
When I want to edit the date value in macro logic I tend to use the intnx function like in&lt;BR /&gt;
[pre]&lt;BR /&gt;
%let my_date = %sysfunc(intnx(day,"&amp;amp;sysdate"d,-5),ddmmyyp10.) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
(where I know that syntactically the dot after the format name ain't needed)</description>
      <pubDate>Wed, 11 Aug 2010 06:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61944#M17594</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2010-08-11T06:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: dirlistwin</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61945#M17595</link>
      <description>Good suggestion on the use of %SYSEVALF. Much simpler.</description>
      <pubDate>Wed, 11 Aug 2010 19:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dirlistwin/m-p/61945#M17595</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-08-11T19:03:40Z</dc:date>
    </item>
  </channel>
</rss>

