<?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 Get the File Attributes (example: Last Updated Date) from a zip file downloaded from Web in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Get-the-File-Attributes-example-Last-Updated-Date-from-a-zip/m-p/152488#M40107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do the following &lt;/P&gt;&lt;P&gt;- Download a Zip File from Web. I have done this using FILENAME URL - Working Fine&lt;/P&gt;&lt;P&gt;- Unzip the File and get all the member data. I have done this using FILENAME ZIP, DOPEN, DREAD and FOPEN in a DATA Step - Working Fine.&lt;/P&gt;&lt;P&gt;- Get the Last Updated TimeStamp of every member in the ZIP File. - &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;This is the one I need help&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;- When I tried to get the File Attributes (using FOPEN, FINFO) on the unzipped file, I get current date as &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;I&lt;/STRONG&gt;&lt;/SPAN&gt; have created the file during the unzip process.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;- When I tried to get the File Attributes (using FOPEN, FINFO) on the zip file immediately after download, File Identifier comes as ZERO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Selva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2014 17:12:25 GMT</pubDate>
    <dc:creator>SelvaN</dc:creator>
    <dc:date>2014-12-16T17:12:25Z</dc:date>
    <item>
      <title>Get the File Attributes (example: Last Updated Date) from a zip file downloaded from Web</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-the-File-Attributes-example-Last-Updated-Date-from-a-zip/m-p/152488#M40107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do the following &lt;/P&gt;&lt;P&gt;- Download a Zip File from Web. I have done this using FILENAME URL - Working Fine&lt;/P&gt;&lt;P&gt;- Unzip the File and get all the member data. I have done this using FILENAME ZIP, DOPEN, DREAD and FOPEN in a DATA Step - Working Fine.&lt;/P&gt;&lt;P&gt;- Get the Last Updated TimeStamp of every member in the ZIP File. - &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;This is the one I need help&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;- When I tried to get the File Attributes (using FOPEN, FINFO) on the unzipped file, I get current date as &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;I&lt;/STRONG&gt;&lt;/SPAN&gt; have created the file during the unzip process.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;- When I tried to get the File Attributes (using FOPEN, FINFO) on the zip file immediately after download, File Identifier comes as ZERO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Selva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 17:12:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-the-File-Attributes-example-Last-Updated-Date-from-a-zip/m-p/152488#M40107</guid>
      <dc:creator>SelvaN</dc:creator>
      <dc:date>2014-12-16T17:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get the File Attributes (example: Last Updated Date) from a zip file downloaded from Web</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-the-File-Attributes-example-Last-Updated-Date-from-a-zip/m-p/152489#M40108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you have downloaded the zip file (say as foo.zip), you can use &lt;SPAN style="font-family: courier new,courier;"&gt;unzip -l foo&lt;/SPAN&gt; to list the contents of the zip file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Archive:&amp;nbsp; foo.zip&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; Length&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp; Time&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; --------&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&amp;nbsp; 09-10-13 08:32&amp;nbsp;&amp;nbsp; test.dat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37&amp;nbsp; 03-04-14 13:04&amp;nbsp;&amp;nbsp; xxx.lst&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 72949&amp;nbsp; 11-14-12 14:39&amp;nbsp;&amp;nbsp; wagner.log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 73015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 files&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;You can use a construct like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;filename oscmd pipe "unzip -l foo"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data fileinfo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;infile oscmd truncover end=last;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;format file_name $50. file_date date9. file_time time5.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;input;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if _n_ &amp;gt; 3 and not last and substr(_infile_,2,8) ne '--------';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;file_date = input(substr(_infile_,12,8),mmddyy8.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;file_time = input(substr(_infile_,21,5),time5.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;file_name = substr(_infile_,29);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;unzip&lt;/SPAN&gt; is a standard tool on UNIX systems.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 09:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-the-File-Attributes-example-Last-Updated-Date-from-a-zip/m-p/152489#M40108</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-12-17T09:38:45Z</dc:date>
    </item>
  </channel>
</rss>

