<?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 generate a series of datasets in a loop and concatenate them in a single dataset in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717643#M27536</link>
    <description>&lt;P&gt;dear SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a source dataset FIL1 containing values of vaiables which names sart with ORB, DrK and NGS, and other vaiables related with year (Jahr) and month (Monat).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the mean of all ORB, DrK and NGS for each of the following periods per year :&lt;/P&gt;&lt;P&gt;- mean of the values for the period from all the months from month = 1 to &amp;amp;Monat_max.&lt;/P&gt;&lt;P&gt;- for instance, if Monat_max = 3, I want to calculate the mean values for the 3 periods:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;month 1, in a FIL2_1 dataset&lt;/LI&gt;&lt;LI&gt;month 1 + 2, in a FIL3_2 dataset&lt;/LI&gt;&lt;LI&gt;month 1+2+3. in a FIL3_3 dataset&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Afterwards, I want to set all produced datasets in a single one FIL3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following but I cannot make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Dashboard_Primaerdaten &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; marktregion_bt nlbez_bt mbrbez_bt filbez_bt FILHB_BT jahr monat ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=FIL1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* new ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; FIL3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _null_;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; FIL3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i &amp;lt;= &amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;Monat_max.&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; execute (cats(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'proc means data=FIL1 Mean nway;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;class marktregion_bt nlbez_bt mbrbez_bt filbez_bt FILHB_BT jahr / descending ;&lt;/P&gt;&lt;P&gt;var ORB: NGS: DrK:;&lt;/P&gt;&lt;P&gt;where Monat &amp;lt;=i;&lt;/P&gt;&lt;P&gt;output out=FIL3_i Mean=;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;run;'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Monat = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;99&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;||i;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;i=i+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; execute (cats(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'data FIL3; set FIL3 FIL3_i; run;'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should I proceed? maybe my idea of the method is false...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 16:42:53 GMT</pubDate>
    <dc:creator>PierreYvesILY</dc:creator>
    <dc:date>2021-02-08T16:42:53Z</dc:date>
    <item>
      <title>generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717643#M27536</link>
      <description>&lt;P&gt;dear SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a source dataset FIL1 containing values of vaiables which names sart with ORB, DrK and NGS, and other vaiables related with year (Jahr) and month (Monat).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the mean of all ORB, DrK and NGS for each of the following periods per year :&lt;/P&gt;&lt;P&gt;- mean of the values for the period from all the months from month = 1 to &amp;amp;Monat_max.&lt;/P&gt;&lt;P&gt;- for instance, if Monat_max = 3, I want to calculate the mean values for the 3 periods:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;month 1, in a FIL2_1 dataset&lt;/LI&gt;&lt;LI&gt;month 1 + 2, in a FIL3_2 dataset&lt;/LI&gt;&lt;LI&gt;month 1+2+3. in a FIL3_3 dataset&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Afterwards, I want to set all produced datasets in a single one FIL3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following but I cannot make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Dashboard_Primaerdaten &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; marktregion_bt nlbez_bt mbrbez_bt filbez_bt FILHB_BT jahr monat ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=FIL1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* new ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; FIL3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _null_;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; FIL3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i &amp;lt;= &amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;Monat_max.&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; execute (cats(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'proc means data=FIL1 Mean nway;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;class marktregion_bt nlbez_bt mbrbez_bt filbez_bt FILHB_BT jahr / descending ;&lt;/P&gt;&lt;P&gt;var ORB: NGS: DrK:;&lt;/P&gt;&lt;P&gt;where Monat &amp;lt;=i;&lt;/P&gt;&lt;P&gt;output out=FIL3_i Mean=;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;run;'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Monat = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;99&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;||i;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;i=i+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; execute (cats(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'data FIL3; set FIL3 FIL3_i; run;'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should I proceed? maybe my idea of the method is false...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 16:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717643#M27536</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2021-02-08T16:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717647#M27538</link>
      <description>&lt;P&gt;So, in my terminology, it sounds like you want a "year-to-date" calculation, given the values for 12 months.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although it might be a bit of typing, I would use a multilabel format, and then you only need one dataset and you won't have to recombine the multiple data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* UNTESTED CODE */
proc format;
     value ytd (multilabel) 1='Jan' 1,2='Feb' 1,2,3='Mar' ... ; 
     /* I'm lazy, you type the rest */
run;

proc summary data=have;
    class month/mlf;
    var yourvariable;
    output out=want mean=;
    format month ytd.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Feb 2021 16:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717647#M27538</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-08T16:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717678#M27540</link>
      <description>And if you're doing moving averages and have SAS/ETS licensed PROC EXPAND may be a better solution. &lt;BR /&gt;&lt;BR /&gt;FYI - each call of your macro creates a data set called FIL3_i - put i is fixed. So each data set output has the same name and isn't dynamic and therefore you're left with only the last data set, you don't have one for each call execute. You need to put that statement more dynamically so that the I carries the variable value of I but at present SAS is treating your I as text or an unknown variable. I would assume you're getting errors unless you have a variable named I in your data set FIL1?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;There are typically two ways of aggregating data as you go, one is to append at the end of each loop and the second is to save all the outputs and stack them at the end. This example demonstrates the approach of adding it in during the loop: &lt;A href="https://gist.github.com/statgeek/353374a5d8ea4f0c89ce5d80a47f4a4c" target="_blank"&gt;https://gist.github.com/statgeek/353374a5d8ea4f0c89ce5d80a47f4a4c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To add them all after, once you have the I issue sorted out you can do the following, using the colon operator:&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set FIL3_: ;&lt;BR /&gt;run;</description>
      <pubDate>Mon, 08 Feb 2021 17:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/717678#M27540</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-08T17:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718231#M27577</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the answer. I used the recommanded&amp;nbsp;method and get good results.&lt;/P&gt;&lt;P&gt;I Encounter nevertheless the following Problem:&lt;/P&gt;&lt;P&gt;* Berechnung der monatlichen Durchschnitte, MR Ebene ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=MR1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; marktregion_bt jahr monat/&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mlf&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=MR3 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; monat &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;ytd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the source dataset (MR1), the variable Jahr is numeric. In the result dataset, the Format has changed and the Jahr variable is Character. This is a major Problem for the operations coming next. Why is the Format of Jahr turned from numeric to Character? How can I avoid or correct this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 13:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718231#M27577</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2021-02-10T13:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718236#M27578</link>
      <description>&lt;P&gt;Are you talking about format types, or variable types?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Formats are numeric if you program them to be numeric. Formats are character if you program them to be character. How are you programming it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, show us the log of the relevant parts of your program (with nothing chopped out, in the order that it appears in the log, unchanged). Please post the log as text by pasting it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. &lt;STRONG&gt;DO NOT SKIP THIS STEP.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 13:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718236#M27578</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-10T13:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718239#M27579</link>
      <description>&lt;P&gt;this is the Code:&lt;/P&gt;&lt;P&gt;* Berechnung der monatlichen Summen, MR Ebene ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=Dashboard_Primaerdaten &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; marktregion_bt jahr monat ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=MR1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR2 (&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=Monat);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; monat &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#008080"&gt;ytd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Monat_2 = cats(jahr,monat,&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#800080"&gt;'Somme'&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Berechnung der monatlichen Durchschnitte, MR Ebene ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=MR1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; marktregion_bt jahr monat/&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;mlf&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=MR3 &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;mean&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; monat &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#008080"&gt;ytd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR3 (&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=Monat);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Monat_2 = cats(jahr,monat,&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#800080"&gt;'Moy'&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Berechnung der jährlichen Summen, MR Ebene ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=Dashboard_Primaerdaten &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;nway&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; marktregion_bt jahr;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ORB: NGS: DrK: ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=MR4 &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Monat_2 = cats(jahr,&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#800080"&gt;'Jahr'&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Zusammenlegung der Datasets, MR Ebene ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR (&lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=_TYPE_ _FREQ_); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; STUFE $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#008080"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt; STRUKNNZ $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#008080"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; MR2 MR3 MR4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;STUFE = &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#800080"&gt;'MR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;struknnz = &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#800080"&gt;'MRX'&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;||MARKTREGION_BT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="1" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt;=mr; &lt;/FONT&gt;&lt;FONT face="Courier New" size="1" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; struknnz; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="1" color="#000080"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                         09:05 Wednesday, February 10, 2021

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Programm';
4          %LET _CLIENTPROCESSFLOWNAME='Prozessfluss';
5          %LET _CLIENTPROJECTPATH='/pkkrp/200_Entwicklung/10_PYI/Entw_DashBoard_v14_3_2021.egp';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='Entw_DashBoard_v14_3_2021.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASBIHome/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         * Berechnung der monatlichen Summen, MR Ebene ;
27         proc summary data=Dashboard_Primaerdaten nway;
28         class marktregion_bt jahr monat ;
29         var  ORB: NGS: DrK: ;
30         output out=MR1 sum=;
31         run;

NOTE: There were 33430 observations read from the data set WORK.DASHBOARD_PRIMAERDATEN.
NOTE: The data set WORK.MR1 has 390 observations and 21 variables.
NOTE: Compressing data set WORK.MR1 decreased size by 0.00 percent. 
      Compressed is 2 pages; un-compressed would require 2 pages.
NOTE: PROCEDURE SUMMARY used (Total process time):
      real time           0.14 seconds
      cpu time            0.07 seconds
      

32         data MR2 (drop=Monat);
33         set MR1;
34         format monat ytd.;
35         Monat_2 = cats(jahr,monat,'Somme');
36         run;

NOTE: There were 390 observations read from the data set WORK.MR1.
NOTE: The data set WORK.MR2 has 390 observations and 21 variables.
NOTE: Compressing data set WORK.MR2 decreased size by 33.33 percent. 
      Compressed is 2 pages; un-compressed would require 3 pages.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.02 seconds
      

37         
2                                                          The SAS System                         09:05 Wednesday, February 10, 2021

38         * Berechnung der monatlichen Durchschnitte, MR Ebene ;
39         proc summary data=MR1 nway;
40             class marktregion_bt jahr monat/mlf;
41             var ORB: NGS: DrK: ;
42             output out=MR3 mean=;
43             format monat ytd. ;
44         run;

NOTE: There were 390 observations read from the data set WORK.MR1.
NOTE: The data set WORK.MR3 has 516 observations and 21 variables.
NOTE: Compressing data set WORK.MR3 increased size by 50.00 percent. 
      Compressed is 3 pages; un-compressed would require 2 pages.
NOTE: PROCEDURE SUMMARY used (Total process time):
      real time           0.04 seconds
      cpu time            0.05 seconds
      

45         data MR3 (drop=Monat);
46         set MR3;
47         Monat_2 = cats(jahr,monat,'Moy');
48         run;

NOTE: There were 516 observations read from the data set WORK.MR3.
NOTE: The data set WORK.MR3 has 516 observations and 21 variables.
NOTE: Compressing data set WORK.MR3 decreased size by 25.00 percent. 
      Compressed is 3 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

49         
50         * Berechnung der jährlichen Summen, MR Ebene ;
51         proc summary data=Dashboard_Primaerdaten nway;
52         class marktregion_bt jahr;
53         var  ORB: NGS: DrK: ;
54         output out=MR4 sum=;
55         run;

NOTE: There were 33430 observations read from the data set WORK.DASHBOARD_PRIMAERDATEN.
NOTE: The data set WORK.MR4 has 45 observations and 20 variables.
NOTE: Compressing data set WORK.MR4 increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE SUMMARY used (Total process time):
      real time           0.03 seconds
      cpu time            0.06 seconds
      

56         data MR4;
57         set MR4;
58         Monat_2 = cats(jahr,'Jahr');
59         run;

NOTE: There were 45 observations read from the data set WORK.MR4.
NOTE: The data set WORK.MR4 has 45 observations and 21 variables.
NOTE: Compressing data set WORK.MR4 increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
3                                                          The SAS System                         09:05 Wednesday, February 10, 2021

      real time           0.00 seconds
      cpu time            0.00 seconds
      

60         
61         * Zusammenlegung der Datasets, MR Ebene ;
62         data MR (drop=_TYPE_ _FREQ_);
63         length STUFE $9 STRUKNNZ $8;
64         set MR2 MR3 MR4;
ERROR: Variable JAHR has been defined as both character and numeric.
65         STUFE = 'MR';
66         struknnz = 'MRX'||MARKTREGION_BT;
67         run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.MR may be incomplete.  When this step was stopped there were 0 observations and 21 variables.
WARNING: Data set WORK.MR was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

68         proc sort data=mr; by struknnz; run;

NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

69         
70         GOPTIONS NOACCESSIBLE;
71         %LET _CLIENTTASKLABEL=;
72         %LET _CLIENTPROCESSFLOWNAME=;
73         %LET _CLIENTPROJECTPATH=;
74         %LET _CLIENTPROJECTPATHHOST=;
75         %LET _CLIENTPROJECTNAME=;
76         %LET _SASPROGRAMFILE=;
77         %LET _SASPROGRAMFILEHOST=;
78         
79         ;*';*";*/;quit;run;
80         ODS _ALL_ CLOSE;
81         
82         
83         QUIT; RUN;
84         &lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718239#M27579</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2021-02-10T14:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718243#M27581</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=MR1 nway;
    class marktregion_bt jahr;
    class monat/mlf;
    var ORB: NGS: DrK: ;
    output out=MR3 mean=;
    format monat ytd. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718243#M27581</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-10T14:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718244#M27582</link>
      <description>&lt;P&gt;as format definition I taped:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;* Neues Format für die Berechnung der Durchschnitte für n Monate ;
proc format;
value ytd (multilabel) 
1							='Jan'
1,2							='Feb' 
1,2,3						='Mar'
1,2,3,4						='Apr'
1,2,3,4,5					='Mai'
1,2,3,4,5,6					='Jun'
1,2,3,4,5,6,7				='Jul'
1,2,3,4,5,6,7,8				='Aug'
1,2,3,4,5,6,7,8,9			='Sep'
1,2,3,4,5,6,7,8,9,10		='Oct'
1,2,3,4,5,6,7,8,9,10,11		='Nov'
1,2,3,4,5,6,7,8,9,10,11,12	='Dec'
; 
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718244#M27582</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2021-02-10T14:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: generate a series of datasets in a loop and concatenate them in a single dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718248#M27583</link>
      <description>&lt;P&gt;thanks a lot, it solved the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't know that it was allowed to use more that one 'class'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx again, and have a nice day&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;PY&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-a-series-of-datasets-in-a-loop-and-concatenate-them-in/m-p/718248#M27583</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2021-02-10T14:23:44Z</dc:date>
    </item>
  </channel>
</rss>

