<?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 proc s3 help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657426#M196992</link>
    <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;I have file on s3 bucket(static file name&amp;nbsp; ex:test.txt ) and that file over writes everyday.&lt;/P&gt;&lt;P&gt;So I need to read that file based on modified date.&lt;/P&gt;&lt;P&gt;ex:If test.txt&amp;nbsp; modified date is today then run Proc s3 otherwise file is not modified today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc s3 config="/u/marti/.tks3.conf";
   create "/myBucket";
   put "/u/marti/project/test.txt" "/myBucket/test.txt";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2020 10:38:47 GMT</pubDate>
    <dc:creator>sathya66</dc:creator>
    <dc:date>2020-06-11T10:38:47Z</dc:date>
    <item>
      <title>proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657426#M196992</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;I have file on s3 bucket(static file name&amp;nbsp; ex:test.txt ) and that file over writes everyday.&lt;/P&gt;&lt;P&gt;So I need to read that file based on modified date.&lt;/P&gt;&lt;P&gt;ex:If test.txt&amp;nbsp; modified date is today then run Proc s3 otherwise file is not modified today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc s3 config="/u/marti/.tks3.conf";
   create "/myBucket";
   put "/u/marti/project/test.txt" "/myBucket/test.txt";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 10:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657426#M196992</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-06-11T10:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657438#M196997</link>
      <description>&lt;P&gt;What do you get when you run the &lt;A href="https://documentation.sas.com/?activeCdc=pgmsascdc&amp;amp;cdcId=sasstudiocdc&amp;amp;cdcVersion=4.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1bfdwilgxkbs8n1raju65kd5340.htm&amp;amp;locale=en" target="_self"&gt;INFO&lt;/A&gt; statement?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657438#M196997</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-11T11:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657456#M197010</link>
      <description>&lt;P&gt;Doesn't list give you the information you need&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 11:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657456#M197010</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-06-11T11:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657482#M197015</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;proc s3 config="/u/marti/.tks3.conf";
   create "/myBucket";
   get "/u/marti/project/test.txt" "/myBucket/test.txt";
list "/myBucket";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sorry to get a file from S3 onto SAS (now used get statement). If I do the list. It is giving the info(modified date )in the log. How can I read that into sas to work with my logic.&lt;/P&gt;&lt;P&gt;ex: if modified date is today then get the file onto sas otherwise no.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 12:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657482#M197015</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-06-11T12:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657484#M197016</link>
      <description>&lt;P&gt;you can add the following lines&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc printto log="homeopath/status.txt";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc s3 step;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc printto;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;read the status from the status.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 12:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657484#M197016</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-06-11T12:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657568#M197058</link>
      <description>This will not work as I need to read a file in S3 bucket.&lt;BR /&gt;I can list all the files and modified date from S3 bucket into a dateset but how can I apply this logic in proc s3?&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jun 2020 15:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657568#M197058</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-06-11T15:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657571#M197061</link>
      <description>&lt;P&gt;As far as I know one cannot write an if then logic inside a proc step. You have to use two separate steps one to get status and one to read the file itself based on what you find.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 15:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657571#M197061</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-06-11T15:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657693#M197131</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;P&gt;Step 1: Momentarily redirect the log with proc PRINTTO&lt;/P&gt;
&lt;P&gt;Step 2: Run proc S3 with INFO statement (or LIST? which one gives you the date?)&lt;/P&gt;
&lt;P&gt;Step 3: Stop the redirection: run proc PRINTTO again&lt;/P&gt;
&lt;P&gt;Step 4: Run a data steps that analyses the log file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This data steps triggers a new proc S3 run if the date is as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 22:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/657693#M197131</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-11T22:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc s3 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/658064#M197213</link>
      <description>yes, thanks&lt;BR /&gt;It worked.&lt;BR /&gt;In Step4.&lt;BR /&gt;I have written a macro to read the dates and files from the log dateset (call symput) and if file and date matches then do proc S3 otherwise "file is not todays file".&lt;BR /&gt;Thanks for your Help .</description>
      <pubDate>Fri, 12 Jun 2020 13:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-s3-help/m-p/658064#M197213</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-06-12T13:48:43Z</dc:date>
    </item>
  </channel>
</rss>

