<?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: Automating Data Pulls Based on Data Name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185980#M35250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the data is created on working days :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let rundate=%sysfunc(intnx(WEEKDAY,%sysfunc(today()),-1),date9.);&lt;/P&gt;&lt;P&gt;%put &amp;amp;rundate;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2014 09:49:21 GMT</pubDate>
    <dc:creator>Loko</dc:creator>
    <dc:date>2014-10-16T09:49:21Z</dc:date>
    <item>
      <title>Automating Data Pulls Based on Data Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185978#M35248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The company I work for has a system that pulls in prices overnight and places them in a particular library. I've been working on automating regressions based on this data, but need to automate which date the regression pulls in order to make it work without daily updating. My beginning data step is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.regression;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set prod_stg.prices_transpose_22sep2014;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The files will always be found in the prod_stg library and the data will always begin with prices_transpose_ followed by most recent date in date9 format. For example, data for today would be in prod_stg.prices_transpose_15oct2014. Does anyone know how to automate the date at the end of the data file to pull back the most recent data set? It also would need to be able to go back more than one day if data was missing (weekends, holidays, ect.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 20:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185978#M35248</guid>
      <dc:creator>dangoebel</dc:creator>
      <dc:date>2014-10-15T20:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Data Pulls Based on Data Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185979#M35249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%let lastdat=;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select memname into :lastdat from dictionary.tables where&lt;/P&gt;&lt;P&gt;upcase(libname) = 'PROD_STG' and upcase(memname) like 'PRICES_TRANSPOSE_%'&lt;/P&gt;&lt;P&gt;order by input(scan(memname,-1,'_'),date.) desc;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.regression;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set prod_stg.&amp;amp;lastdat;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 06:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185979#M35249</guid>
      <dc:creator>Vladislaff</dc:creator>
      <dc:date>2014-10-16T06:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Data Pulls Based on Data Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185980#M35250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the data is created on working days :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let rundate=%sysfunc(intnx(WEEKDAY,%sysfunc(today()),-1),date9.);&lt;/P&gt;&lt;P&gt;%put &amp;amp;rundate;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 09:49:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automating-Data-Pulls-Based-on-Data-Name/m-p/185980#M35250</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2014-10-16T09:49:21Z</dc:date>
    </item>
  </channel>
</rss>

