<?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: Dymanically determine last modified date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48832#M10084</link>
    <description>That is not right. test*.txt is identified test1.txt testab.txt .... etc.&lt;BR /&gt;
* is wildchar which stands for any txt filename start with test.&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
    <pubDate>Fri, 15 Apr 2011 01:02:31 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-04-15T01:02:31Z</dc:date>
    <item>
      <title>Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48826#M10078</link>
      <description>how to dymanically determine last modified date for a set of files and then move them to a separate folder?&lt;BR /&gt;
for instance if c:\temp has the following files&lt;BR /&gt;
test1.txt&lt;BR /&gt;
test2.txt&lt;BR /&gt;
text3.txt&lt;BR /&gt;
&lt;BR /&gt;
and test2.txt is the last modified file.it needs to be moved to c:\results.</description>
      <pubDate>Tue, 12 Apr 2011 19:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48826#M10078</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2011-04-12T19:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48827#M10079</link>
      <description>If you are using windows you can use the FINFO function which gives you the modiied date (this is for 9.2 only)&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-func-finfo.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-func-finfo.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
D</description>
      <pubDate>Tue, 12 Apr 2011 21:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48827#M10079</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-04-12T21:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48828#M10080</link>
      <description>And Operate System Command will be more power.&lt;BR /&gt;
[pre]&lt;BR /&gt;
filename txt pipe 'dir c:\temp\test*.txt /od';&lt;BR /&gt;
data txt;&lt;BR /&gt;
 infile txt expandtabs truncover dlm=' ';&lt;BR /&gt;
 input dt anydtdtm20. size $ fname $20.;&lt;BR /&gt;
 format dt datetime20.;&lt;BR /&gt;
 if not missing(dt) then output;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 set txt end=last;&lt;BR /&gt;
 if last then call system('move c:\temp\'||fname||' c:\results\'||fname);&lt;BR /&gt;
run;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 13 Apr 2011 03:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48828#M10080</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-13T03:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48829#M10081</link>
      <description>I tried to run this changing the folder name,but dataset txt has zero records.</description>
      <pubDate>Wed, 13 Apr 2011 15:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48829#M10081</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2011-04-13T15:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48830#M10082</link>
      <description>I am not sure what wrong it happened.&lt;BR /&gt;
But I test it successfully in my OS. Maybe Due to the encodeing of OS(mine is Chinese Win).&lt;BR /&gt;
Can you post the result of command " dir ..... /od" .&lt;BR /&gt;
I will fix it.&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 14 Apr 2011 02:05:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48830#M10082</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-14T02:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48831#M10083</link>
      <description>I guess you need to add a back slash in between 'test' and '*'&lt;BR /&gt;
&lt;BR /&gt;
filename txt pipe 'dir c:\temp\test\*.txt /od';</description>
      <pubDate>Thu, 14 Apr 2011 21:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48831#M10083</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-04-14T21:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48832#M10084</link>
      <description>That is not right. test*.txt is identified test1.txt testab.txt .... etc.&lt;BR /&gt;
* is wildchar which stands for any txt filename start with test.&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 15 Apr 2011 01:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48832#M10084</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-15T01:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48833#M10085</link>
      <description>Ahh...you're right. I thought 'test' was a folder and we need to get the list of .txt files in that folder.</description>
      <pubDate>Fri, 15 Apr 2011 13:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48833#M10085</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-04-15T13:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48834#M10086</link>
      <description>KSharp,&lt;BR /&gt;
 the folder has three text files:&lt;BR /&gt;
thats why I used wild character *&lt;BR /&gt;
The error is:&lt;BR /&gt;
Stderr output:&lt;BR /&gt;
The system cannot find the path specified.&lt;BR /&gt;
&lt;BR /&gt;
filename txt pipe 'dir C:\Documents and Settings\Desktop\Excel SAS\test\*.txt /od';&lt;BR /&gt;
data txt;&lt;BR /&gt;
infile txt expandtabs truncover dlm=' ';&lt;BR /&gt;
input dt anydtdtm20. size $ fname $20.;&lt;BR /&gt;
format dt datetime20.;&lt;BR /&gt;
if not missing(dt) then output;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set txt end=last;&lt;BR /&gt;
if last then call system('move C:\Documents and Settings\Desktop\Excel SAS\test\'||fname|| ' C:\Documents and Settings\Desktop\Excel SAS\test\results\'||fname);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
53   filename txt pipe 'dir C:\Documents and Settings\Desktop\Excel SAS\test\*.txt /od';&lt;BR /&gt;
54   data txt;&lt;BR /&gt;
55   infile txt expandtabs truncover dlm=' ';&lt;BR /&gt;
56   input dt anydtdtm20. size $ fname $20.;&lt;BR /&gt;
57   format dt datetime20.;&lt;BR /&gt;
58   if not missing(dt) then output;&lt;BR /&gt;
59   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The infile TXT is:&lt;BR /&gt;
      Unnamed Pipe Access Device,&lt;BR /&gt;
      PROCESS=dir C:\Documents and Settings\Desktop\Excel SAS\test\*.txt /od,&lt;BR /&gt;
      RECFM=V,LRECL=256&lt;BR /&gt;
&lt;BR /&gt;
Stderr output:&lt;BR /&gt;
The system cannot find the path specified.&lt;BR /&gt;
NOTE: 0 records were read from the infile TXT.&lt;BR /&gt;
NOTE: The data set WORK.TXT has 0 observations and 3 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.70 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
60   data _null_;&lt;BR /&gt;
61   set txt end=last;&lt;BR /&gt;
62   if last then call system('move C:\Documents and Settings\Desktop\Excel&lt;BR /&gt;
62 ! SAS\test\'||fname|| ' C:\Documents and Settings\Desktop\Excel&lt;BR /&gt;
62 ! SAS\test\results\'||fname);&lt;BR /&gt;
63   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 0 observations read from the data set WORK.TXT.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.12 seconds&lt;BR /&gt;
      cpu time            0.01 seconds</description>
      <pubDate>Thu, 19 May 2011 16:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48834#M10086</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2011-05-19T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48835#M10087</link>
      <description>If I remember my windows environments correctly, there is always a user between the "documents and settings" and the "desktop".  Like this&lt;BR /&gt;
&lt;BR /&gt;
C:\Documents and Settings\username\Desktop&lt;BR /&gt;
&lt;BR /&gt;
There is also a public&lt;BR /&gt;
&lt;BR /&gt;
C:\Documents and Settings\public\Desktop</description>
      <pubDate>Thu, 19 May 2011 18:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48835#M10087</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-05-19T18:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48836#M10088</link>
      <description>Don't you need to quote a path with spaces.&lt;BR /&gt;
[pre]&lt;BR /&gt;
filename txt pipe 'dir "C:\Documents and Settings\Desktop\Excel SAS\test\*.txt" /od';&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Test the windows command in a dos box if it don't work there it won't PIPE.</description>
      <pubDate>Thu, 19 May 2011 22:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48836#M10088</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-05-19T22:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanically determine last modified date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48837#M10089</link>
      <description>I test it.Found the reason.&lt;BR /&gt;
It is because the name of directory(Excel SAS) contains white blank.&lt;BR /&gt;
So the command dir is failed.&lt;BR /&gt;
If you can, change the name to ExcelSAS without blank.&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 20 May 2011 05:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dymanically-determine-last-modified-date/m-p/48837#M10089</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-05-20T05:24:32Z</dc:date>
    </item>
  </channel>
</rss>

