<?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: Macro to import a daily csv file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384170#M91694</link>
    <description>&lt;P&gt;You can create a macro variable that contains today's date in a proper format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let today=%sysfunc(today(),yymmdd10.);
%put &amp;amp;today;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the date is part of the filename, you can then build the filename with the use of the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2017 06:57:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-07-31T06:57:41Z</dc:date>
    <item>
      <title>Macro to import a daily csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384168#M91693</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am faily new to Macro and been a SAS user but not indepth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to automate a step to import a daily CSV file into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I write a macro or sas step to import the file with today's date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greatly appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Maggie&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 06:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384168#M91693</guid>
      <dc:creator>Timbim</dc:creator>
      <dc:date>2017-07-31T06:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to import a daily csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384170#M91694</link>
      <description>&lt;P&gt;You can create a macro variable that contains today's date in a proper format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let today=%sysfunc(today(),yymmdd10.);
%put &amp;amp;today;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the date is part of the filename, you can then build the filename with the use of the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 06:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384170#M91694</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-31T06:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to import a daily csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384177#M91698</link>
      <description>&lt;P&gt;The search bar can be used to find topics similar to what you are looking for, this kind of question gets asked at least once a week. In this case, you would need to provide more information such as - what is happening to the file before its gets to SAS, i.e. where is the file stored, is it overwriting a previous file (i.e. same name), or does it have differing names. &amp;nbsp;Is the data cumulative? &amp;nbsp;Is teh data exactly the same structurally? &amp;nbsp;It could just be as simple as having a program run daily which does this:&lt;/P&gt;
&lt;PRE&gt;data in_data;
  infile "&amp;lt;path to files&amp;gt;/The_data_file_%sysfunc(today(),date9.).csv" dlm=",";
  input a $ b $;
run;

proc append base=master data=in_data;
run;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Jul 2017 08:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-import-a-daily-csv-file/m-p/384177#M91698</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-31T08:23:49Z</dc:date>
    </item>
  </channel>
</rss>

