<?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: Appending Daily dataset to monthly in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338603#M77140</link>
    <description>&lt;P&gt;hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THank you for the reply and the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont want to dlete the previuos monthly data, but i want to develope dataset for each month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EX: ab002_2017JAN, ab002_2017FEB, like wise for the past 24 months&lt;/P&gt;&lt;P&gt;Please suggest&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2017 22:46:24 GMT</pubDate>
    <dc:creator>SAS_INFO</dc:creator>
    <dc:date>2017-03-06T22:46:24Z</dc:date>
    <item>
      <title>Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338353#M77033</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to creat monthly datasets appending daily datasets for the past 2 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest macros to do the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;aruna&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 05:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338353#M77033</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-06T05:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338355#M77035</link>
      <description>&lt;P&gt;What name convention do you have or want to the daily/monthly datasets ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 05:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338355#M77035</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-06T05:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338358#M77037</link>
      <description>&lt;P&gt;the name convention are as follows&lt;/P&gt;&lt;P&gt;ab002_20170303&lt;/P&gt;&lt;P&gt;ab002_20170304&lt;/P&gt;&lt;P&gt;ab002_20170305&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i want teh monthly dataset as AB002_17JAN,AB002_17FEB etc.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AB002_17JAN should have all the daily datasets appended&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 05:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338358#M77037</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-06T05:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338390#M77051</link>
      <description>&lt;P&gt;Its always a good idea to post some test data in the form of a datastep. &amp;nbsp;You don't need macro:&lt;/P&gt;
&lt;PRE&gt;data ab002_20170303;
  a=1;
run;
data ab002_20170304;
  a=2;
run;
data ab002_20170305;
  a=3;
run;

data _null_;
  do i="201703";
    outfile=cats('ab002_17',put(month(input(cats(i,'01'),yymmdd10.)),month3.));
    call execute('data '||strip(outfile)||'; set ab002_'||strip(i)||':; run;');
  end;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 09:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338390#M77051</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-06T09:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338403#M77057</link>
      <description>&lt;P&gt;Next macro program deletes previous monthly dataset and appends all monthly existing datasets:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro cre_monthly(prefix,yymm);
    proc datasets lib=work nolist; delete &amp;amp;prefix.&amp;amp;yymm; run;

    %do i=1 %to 31;
       %if %length(&amp;amp;i) = 1 %then %let i=0&amp;amp;i;
       %let dsn = &amp;amp;prefix.&amp;amp;yymm.&amp;amp;i;
       %if %sysfunc(exist(&amp;amp;dsn)) %then %do;
           proc append base=&amp;amp;prefix&amp;amp;yymm  data=&amp;amp;dsn;
           run;
       %end;
    %end;
%mend cre_monthly;
%cre_monthly(ab002_,201703);  /* usage example */&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 10:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338403#M77057</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-06T10:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338404#M77058</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ab002_20170303 ab002_20170403;
  a=1;
run;
data ab002_20170304 ab002_20170404;
  a=2;
run;
data ab002_20170305 ab002_20170405;
  a=3;
run;

proc sql;
create table have as
 select memname,input(scan(memname,-1,'_'),yymmdd10.) as date format=yymmdd10.
  from dictionary.members 
   where libname='WORK' and calculated date is not missing
    order by 2;
quit;

data _null_;
 set have;
 by date groupformat;
 format date yymon7.;
 if first.date then call execute(cat('data ',scan(memname,1,'_'),'_',put(date,yymon7.),';set'));
 call execute(memname);
 if last.date then call execute(';run;');
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 10:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338404#M77058</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-06T10:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338603#M77140</link>
      <description>&lt;P&gt;hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THank you for the reply and the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont want to dlete the previuos monthly data, but i want to develope dataset for each month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EX: ab002_2017JAN, ab002_2017FEB, like wise for the past 24 months&lt;/P&gt;&lt;P&gt;Please suggest&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 22:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338603#M77140</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-06T22:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338627#M77151</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32726"&gt;@SAS_INFO&lt;/a&gt;&amp;nbsp;wrote: &amp;nbsp;&lt;STRONG&gt;i dont want to dlete the previuos monthly data,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that if you append same daily dataset &lt;STRONG&gt;more than once&lt;/STRONG&gt; - you will have &lt;STRONG&gt;duplicates&lt;/STRONG&gt; in your monthly agregated dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have tha daily_date as variable inside the daily dataset, then you can do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data &amp;lt;monthly_dataset&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set &amp;lt;monthly_dataset&amp;gt; (where=(date ne &amp;lt;daily_date&amp;gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;daily&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;instead the proc append;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 00:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338627#M77151</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-07T00:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338630#M77152</link>
      <description>&lt;P&gt;Hi Shmuel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i get flat files, every day, and by excuting my code i generate sas datasets as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ab002_20170207&lt;/P&gt;
&lt;P&gt;ab003_20170207&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;ab013_20170207&lt;/P&gt;
&lt;P&gt;I get 13 files every day , now , i have 2 things to do&lt;/P&gt;
&lt;P&gt;1.I need to append it monthl wise , for the past 24 months&lt;/P&gt;
&lt;P&gt;2. I need to write code that does this for the ongoing( for ongoing i guessthe following code works)&lt;/P&gt;
&lt;P&gt;proc append base=ab002_2017JAN&lt;STRONG&gt; data&lt;/STRONG&gt;=ab002_&amp;amp;tdate;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;amp;tdate is the macro that has everydays date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plz correct me if am wrong&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 01:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338630#M77152</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-07T01:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338634#M77156</link>
      <description>&lt;P&gt;You are correct, just pay attention:&lt;/P&gt;
&lt;P&gt;first time you run proc append with base=monthly_datset the file will be created.&lt;/P&gt;
&lt;P&gt;next days will be appended to the existing monthly_dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case of some failure in the middle of appending, and you rerun same date again,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you mught have duplicates. See my previous post.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 01:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338634#M77156</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-07T01:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338687#M77183</link>
      <description>&lt;P&gt;hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GOPTIONS ACCESSIBLE;&lt;/P&gt;&lt;P&gt;24 %macro cre_monthly(prefix,yyyymm);&lt;/P&gt;&lt;P&gt;25 proc datasets lib=eag_rep nolist; &amp;amp;prefix.&amp;amp;yymm; run;&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;27 %do i=1 %to 31;&lt;/P&gt;&lt;P&gt;28 %if %length(&amp;amp;i) = 1 %then %let i=0&amp;amp;i;&lt;/P&gt;&lt;P&gt;29 %let dsn = &amp;amp;prefix.&amp;amp;yyyymm.&amp;amp;i;&lt;/P&gt;&lt;P&gt;30 %if %sysfunc(exist(&amp;amp;dsn)) %then %do;&lt;/P&gt;&lt;P&gt;31 proc append base=eag_rep.et002_2017FEB data=&amp;amp;dsn;&lt;/P&gt;&lt;P&gt;32 run;&lt;/P&gt;&lt;P&gt;33 %end;&lt;/P&gt;&lt;P&gt;34 %end;&lt;/P&gt;&lt;P&gt;35 %mend cre_monthly;&lt;/P&gt;&lt;P&gt;36 %cre_monthly(et002_,201702); /* usage example */&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference YYMM not resolved.&lt;/P&gt;&lt;P&gt;NOTE: Enter RUN; to continue or QUIT; to end the procedure.&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "YYMM".&lt;/P&gt;&lt;P&gt;36 et002_&amp;amp;&lt;/P&gt;&lt;P&gt;______&lt;/P&gt;&lt;P&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;NOTE: Statements not processed because of errors noted above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;but the output dataset appended only till 20170209 , not after that also i got the above error.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 06:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338687#M77183</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-07T06:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338740#M77199</link>
      <description>&lt;P&gt;You should choose argument (macro variable) name - is it yymm or yyyymm - you should be consistent.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 10:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/338740#M77199</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-07T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/339867#M77581</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally i have developed a macro that helps me to append daily&amp;nbsp;datasets &amp;nbsp;to monthly datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks to Shmuel...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;combine&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;data eag_rep.AB003_2015dec;&lt;/P&gt;&lt;P&gt;set&lt;/P&gt;&lt;P&gt;%do i=&lt;STRONG&gt;1&lt;/STRONG&gt; %to &lt;STRONG&gt;31&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;%if %length(&amp;amp;i) = &lt;STRONG&gt;1&lt;/STRONG&gt; %then %let i=0&amp;amp;i;&lt;/P&gt;&lt;P&gt;eag_rep.AB003_201512&amp;amp;i&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;%mend&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;%&lt;STRONG&gt;&lt;EM&gt;combine&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 03:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/339867#M77581</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-10T03:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/339939#M77617</link>
      <description>&lt;P&gt;Sorry, that doesn't look like a solution at all. &amp;nbsp;What happens in Febuary where there is either 28 or 29 days depending on leap year? &amp;nbsp;Basically you will need to change this code for each month/year. &amp;nbsp;Where as the code I provided, or using inbuilt lists is generic and does not require updating - don't be blinded by "needs" to use macro - it does absolutely nothing that Base SAS cannot do, other the obfuscate and complicate.&lt;/P&gt;
&lt;PRE&gt;data eag_rep.AB003_2015dec;
  set eag_rep.AB003_201512:;
run;&lt;/PRE&gt;
&lt;P&gt;Of course your whole system would be far more robust, easier to maintain and code with if you dropped putting "data" in table names/variable names, and put it in the data part of a dataset e.g:&lt;/P&gt;
&lt;PRE&gt;data eag_rep.ab003;
  set eag_rep.ab003_2015: indsname=inds;  /* Get all data for year 2015 */
  filedate=input(tranwrd(inds,"ab003_",""),yymmdd10.);
run;&lt;/PRE&gt;
&lt;P&gt;You would then have a large file with all your data in, be able to by group on filedate, be able to add new data merely by appending to that one dataset, and all still having the option to split the data up later on if you really need to. &amp;nbsp;Simple.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 09:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/339939#M77617</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-10T09:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/340030#M77665</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32726"&gt;@SAS_INFO&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;is right, you forget to check if the daily file realy exists:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro combine;
data eag_rep.AB003_2015dec;
set
%do i=1 %to 31;
    %if %length(&amp;amp;i) = 1 %then %let i=0&amp;amp;i;
    %if %sysfunc(exist(eag_rep.AB003_201512&amp;amp;i)) %then %do;
        eag_rep.AB003_201512&amp;amp;i
    %end;
%end;
;
run;
%mend;
%combine;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 16:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/340030#M77665</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-10T16:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Daily dataset to monthly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/340283#M77751</link>
      <description>&lt;P&gt;Thanks for the code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the files to be month wise, let me check and let u know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 00:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-Daily-dataset-to-monthly/m-p/340283#M77751</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-03-13T00:11:54Z</dc:date>
    </item>
  </channel>
</rss>

