<?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 Shared Code - Best Practices in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Shared-Code-Best-Practices/m-p/4642#M1884</link>
    <description>I am new to SAS and intend to use SAS to generate some complex analyses on multiple datasets.  A significant portion of the analyses is the same for each dataset.  I'm looking for some guidance on how best to implement these analyses so that code is shared rather than copied.&lt;BR /&gt;
&lt;BR /&gt;
Can someone direct me to a resource (book, document, etc) that can help me?</description>
    <pubDate>Tue, 11 Sep 2007 12:42:55 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-09-11T12:42:55Z</dc:date>
    <item>
      <title>Shared Code - Best Practices</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Shared-Code-Best-Practices/m-p/4642#M1884</link>
      <description>I am new to SAS and intend to use SAS to generate some complex analyses on multiple datasets.  A significant portion of the analyses is the same for each dataset.  I'm looking for some guidance on how best to implement these analyses so that code is shared rather than copied.&lt;BR /&gt;
&lt;BR /&gt;
Can someone direct me to a resource (book, document, etc) that can help me?</description>
      <pubDate>Tue, 11 Sep 2007 12:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Shared-Code-Best-Practices/m-p/4642#M1884</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-11T12:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Code - Best Practices</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Shared-Code-Best-Practices/m-p/4643#M1885</link>
      <description>Hi:&lt;BR /&gt;
  If you refer to these user-group presentations&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi23/Coders/p81.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi23/Coders/p81.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi31/014-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/014-31.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/006-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/006-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi27/p021-27.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi27/p021-27.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
you will see that a lot of folks use the SAS Macro Facility as part of their source code management system.&lt;BR /&gt;
 &lt;BR /&gt;
In order to effectively use the SAS macro facility, you should&lt;BR /&gt;
1) have a working SAS program&lt;BR /&gt;
2) convert that program to use macro variables (i.e. change the program to use a few macro variables like dataset name)&lt;BR /&gt;
3) convert the program with generic macro variables into a MACRO program and&lt;BR /&gt;
   add any conditional macro programming logic at this point  (if it's the last day of the month, then also generate and execute the month-end report code).&lt;BR /&gt;
4) have a system of organized folders, directories and file names where the data and programs live&lt;BR /&gt;
 &lt;BR /&gt;
The SAS documentation has extensive material on the use of the SAS Macro Facility and there are many books by users published by SAS Press on the topic.&lt;BR /&gt;
&lt;BR /&gt;
Your use of the SAS Macro facility can be as simple or as complex as you need. But the key is to first have a working SAS program before you try to convert it to use SAS macro processing.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 11 Sep 2007 13:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Shared-Code-Best-Practices/m-p/4643#M1885</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-11T13:38:07Z</dc:date>
    </item>
  </channel>
</rss>

