<?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: Tips on increasing processing efficiency in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555349#M33613</link>
    <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;on naming the months. On top of that, I see no resons to split the libraries, as the dataset names are unique anyway. Just one RAW library should suffice.&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2019 13:19:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-05-01T13:19:00Z</dc:date>
    <item>
      <title>Tips on increasing processing efficiency</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555300#M33607</link>
      <description>&lt;P&gt;Each month I will have to process raw payroll information and create an analysis dataset out of it for people within my compnay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my current thinking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I get the raw March 2020 data, I will break this out into smaller datasets based on the paymonth. So all January payments will be put into a SAS dataset called Jan_2020M03, all&amp;nbsp; February payments into Feb_2020M03 etc. The M03 allows me to identify which month the raw data has came in on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I will need to recreate my analysis dataset each month. To create the Jan_2020Analysis dataset I will need to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First read in the Jan_2020M01 dataset. I will then need to read in Jan_2020M02 dataset. From here I will need to overwrite information in the Jan_2020M01 information with information Jan_2020M02. I can do this with a unique payslip id. However, I will need to read in the Jan_2020M03 and potentially overwrite information in the Jan_2020M01 and Jan_2020M02. This will need to keep occurring until I have read in all the Jan_2020 datasets. Once this is done, I can then create my analysis dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some dynamic way to this. My folder structure is as follows;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;\\location\2020\2020M01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So within the above location I have 12 sas datasets Jan_2020M01...Feb_2020M01....Dec_2020M01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have 12 other folders such as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;\\location\2020\2020M02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So within the above location I have 12 sas datasets Jan_2020M02...Feb_2020M02....Dec_2020M02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need a way for SAS to only pick out the datasets I want. So when I want to recreate the January file pick out all the January datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any advise.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 08:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555300#M33607</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2019-05-01T08:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tips on increasing processing efficiency</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555346#M33611</link>
      <description>&lt;P&gt;Since you have a unique id, you can try the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data jan_2020analysis;
merge
  libm01.jan_2020m01
  libm02.jan_2020m02
  .....
  libm12.jan_2020m12
;
by payslip_id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Once you can verify that this works (the datasets are read in sequence, so any newer information for a particular payslip will automatically replace the older in the PDV), you can start to macrotize it. First of all, replace jan and 2020 with macro variables. Next, wrap the step in a macro and loop from 1 to 12 to create the month sequence:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;merge
%do i = 1 %to 12;
  libm%sysfunc(putn(&amp;amp;i.,z2.)).&amp;amp;month._&amp;amp;year.m%sysfunc(putn(&amp;amp;i.,z2.))
%end;
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;by using month and year as macro parameters, you can then call the macro repeatedly for months and years (eg from a dataset with call execute()).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555346#M33611</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-01T13:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Tips on increasing processing efficiency</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555347#M33612</link>
      <description>&lt;P&gt;Two comments to get things rolling ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Why do you need to split the data into months (only to recombine them at the end)?&amp;nbsp; Why not just keep one analysis data set, and use the next month's batch of data to update this master data set?&lt;/LI&gt;
&lt;LI&gt;Data set names should be different if you need to support an automated process.&amp;nbsp; For example, Jan_2020M03 should be named _2020_01_M03 to more easily support the sorting and looping that an automated approach might require.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 01 May 2019 13:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555347#M33612</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-01T13:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Tips on increasing processing efficiency</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555349#M33613</link>
      <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;on naming the months. On top of that, I see no resons to split the libraries, as the dataset names are unique anyway. Just one RAW library should suffice.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Tips-on-increasing-processing-efficiency/m-p/555349#M33613</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-01T13:19:00Z</dc:date>
    </item>
  </channel>
</rss>

