<?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: SAS Code reuse in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177863#M13644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can store the query in a macro - and if it uses the SAS Autocall facility the you can use this macro in any of your projects. &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1o5fkxq0gqdpcn1xs3ksdks69tf.htm" title="http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1o5fkxq0gqdpcn1xs3ksdks69tf.htm"&gt;SAS(R) 9.4 Macro Language: Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a view and store this view in a permanent pre-assigned SAS library - or directly in the data base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could store your SQL code in a separate .sas file and then use it via an %include statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general: If you want to build up some sort of reporting system then I would actually use EG for development/maintenance of such reports but I would store all productionised code in separate .sas files. You can always use such .sas files within your EG project either via directly opening them or via %include statements.&lt;/P&gt;&lt;P&gt;What you want to avoid is having multiple versions of almost the same in multiple complex EG project as this will become sooner or later a maintenance "nightmare".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jul 2014 22:11:05 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2014-07-13T22:11:05Z</dc:date>
    <item>
      <title>SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177861#M13642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very new to SAS and have only just started using SAS Enterprise guide&lt;/P&gt;&lt;P&gt;I work in a company where most of our external/financial reporting is prepared in Excel. We are working on a SAS based solution for some of our reporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that SAS is a statistical software but it also has capabilties such as getting data from datawarehouses which is quite helpful&lt;/P&gt;&lt;P&gt;We are trying to build Proc Sql queries for getting data from data repositories and aggregating the data into a reportable format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the troubles that we are facing is that Proc Sql code needs to copied over to a different project each time there is a new reporting requirement that is slightly different from the previous report&lt;/P&gt;&lt;P&gt;Is there a way of stroing these proc sql queries in a library of some sort? I know that SAS macros should be able to allow code reuse. But just wondering if there is anything else that will allow reuse?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope whatever I have written makes sense &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help from you guys will be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 21:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177861#M13642</guid>
      <dc:creator>yags</dc:creator>
      <dc:date>2014-07-13T21:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177862#M13643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two options that come to mind:&lt;/P&gt;&lt;P&gt;1. Make the query general and create views in your database that can be then queried directly. &lt;/P&gt;&lt;P&gt;2. Use %include to point to program and include it in your scripts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 22:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177862#M13643</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-07-13T22:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177863#M13644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can store the query in a macro - and if it uses the SAS Autocall facility the you can use this macro in any of your projects. &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1o5fkxq0gqdpcn1xs3ksdks69tf.htm" title="http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1o5fkxq0gqdpcn1xs3ksdks69tf.htm"&gt;SAS(R) 9.4 Macro Language: Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a view and store this view in a permanent pre-assigned SAS library - or directly in the data base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could store your SQL code in a separate .sas file and then use it via an %include statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general: If you want to build up some sort of reporting system then I would actually use EG for development/maintenance of such reports but I would store all productionised code in separate .sas files. You can always use such .sas files within your EG project either via directly opening them or via %include statements.&lt;/P&gt;&lt;P&gt;What you want to avoid is having multiple versions of almost the same in multiple complex EG project as this will become sooner or later a maintenance "nightmare".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 22:11:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177863#M13644</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-07-13T22:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177864#M13645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Eguide you may have a Server based approach with the SAS metadata and more.&lt;/P&gt;&lt;P&gt;Tools in that approach are metadata-based for building your queries that way.&amp;nbsp;&amp;nbsp; Build it as SP'-s and that building blocks will become central managed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you do not have that with SAS metadata, Eguide has a query builder to generate the (ansi SQL) queries. This works well with simple queries. the difficult&amp;nbsp; ones can become more cumbersome when you have exterenal DBMS-systems involved.&lt;BR /&gt;Organizing code in a way reuse is more easy is a classic ICT question.&lt;BR /&gt;- modular programming, Objected oriented, Service oriented &lt;/P&gt;&lt;P&gt;- Version management, release managemen, Develop-Test-UAT-Production (DTAP)&lt;/P&gt;&lt;P&gt;SAS is having many ways to code, question would make more sense as: how is your ICT being organized?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 05:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177864#M13645</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-14T05:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177865#M13646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to simply re-use the query definition among multiple projects, look at the Query Template feature.&amp;nbsp; This allows you to take a query you've defined and "register" it as a re-usable template that will then appear in your task list/menus.&amp;nbsp; This feature is the underpinning for building subqueries with EG, described in this post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2013/06/28/building-an-sql-subquery-in-sas-enterprise-guide/" title="http://blogs.sas.com/content/sasdummy/2013/06/28/building-an-sql-subquery-in-sas-enterprise-guide/"&gt; Building an SQL subquery in SAS Enterprise Guide - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 12:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177865#M13646</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-07-14T12:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code reuse</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177866#M13647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the replies&lt;/P&gt;&lt;P&gt;The options suggested look helpful indeed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned earlier in my post, I am very new to SAS and will have to go thorugh each option suggested one by one &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your responses very reassuring and are much appreciated&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 01:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Code-reuse/m-p/177866#M13647</guid>
      <dc:creator>yags</dc:creator>
      <dc:date>2014-07-15T01:13:55Z</dc:date>
    </item>
  </channel>
</rss>

