<?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: batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245251#M45744</link>
    <description>Thank you, ballardw. I will give it a try later.</description>
    <pubDate>Thu, 21 Jan 2016 18:38:50 GMT</pubDate>
    <dc:creator>fengyuwuzu</dc:creator>
    <dc:date>2016-01-21T18:38:50Z</dc:date>
    <item>
      <title>batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014.csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245228#M45732</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to use the code belwo to batch process files with names like 201501.csv, 201502.csv,.. etc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I have 12 files, whose names are named by months, like xxxx-Jan2014.csv, xxxx-Feb2014.csv, ... xxxx-Dec2014.csv.&lt;/P&gt;
&lt;P&gt;Is there a way to use the similar code below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro run_me;
%let n=1;

%do %while (&amp;amp;n &amp;lt;= 9);
%let filein = xxxx20150&amp;amp;n..csv;

data output&amp;amp;n;
infile &amp;amp;filein;
&amp;lt;data step--&amp;gt;
run;

%let n=%eval(&amp;amp;n+1);
%end;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jan 2016 16:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245228#M45732</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-01-21T16:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014</title>
      <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245234#M45736</link>
      <description>&lt;P&gt;Yes, but you have to process over a list of values, rather than a range of numbers.&amp;nbsp; You might call the macro like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%run_me (month_list=Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an article that tells you how to do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/publishing/2015/01/30/sas-authors-tip-getting-the-macro-language-to-perform-a-do-loop-over-a-list-of-values/" target="_blank"&gt;http://blogs.sas.com/content/publishing/2015/01/30/sas-authors-tip-getting-the-macro-language-to-perform-a-do-loop-over-a-list-of-values/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 17:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245234#M45736</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-01-21T17:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014</title>
      <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245237#M45737</link>
      <description>&lt;P&gt;Or you could step over months numerically and generate the part of the file name:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let monnum=1;
%let year=2014;
%let name = %sysfunc(putn(%sysfunc(mdy(&amp;amp;monnum,1,&amp;amp;year)),MONYY7.));
%put &amp;amp;name;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have a do loop on MONNUM (or use &amp;amp;i where I used &amp;amp;monnum) you create the name part for a series.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 17:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245237#M45737</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-21T17:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014</title>
      <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245250#M45743</link>
      <description>This works! Thank you, Astounding!</description>
      <pubDate>Thu, 21 Jan 2016 18:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245250#M45743</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-01-21T18:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: batch process data files with monthly contionout file names (like xxxx-Jan2014.csv, xxxx-Feb2014</title>
      <link>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245251#M45744</link>
      <description>Thank you, ballardw. I will give it a try later.</description>
      <pubDate>Thu, 21 Jan 2016 18:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/batch-process-data-files-with-monthly-contionout-file-names-like/m-p/245251#M45744</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-01-21T18:38:50Z</dc:date>
    </item>
  </channel>
</rss>

