<?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: Compiling SAS programs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123222#M259921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I had a chance to implement the solution you proposed this week. It is consistent with what I was looking for. However, I have run into a few small hiccups along the way. Some of my students, to whom I am distributing the sasmacr file, are unable to read it. SAS is giving them a message like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;“&lt;SPAN style="color: #0070c0;"&gt;ERROR: File&lt;BR /&gt;TMP3.SASMACR.CATALOG was created for a different operating system&lt;/SPAN&gt;”. And&lt;BR /&gt;“&lt;SPAN style="color: #0070c0;"&gt;An error occurred attempting to initialize a SAS&lt;BR /&gt;desktop object from class sashelp.sasdesk.catmodel&lt;/SPAN&gt;.” &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;How do I resolve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Cristian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2012 13:59:49 GMT</pubDate>
    <dc:creator>crisgugiu</dc:creator>
    <dc:date>2012-09-28T13:59:49Z</dc:date>
    <item>
      <title>Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123220#M259919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to know if there is a way to distribute a SAS program without&lt;BR /&gt;actually sharing the code with others. Basically, I want to preserve the&lt;BR /&gt;proprietary knowledge of a method I developed until I have a chance to&lt;/P&gt;&lt;P&gt;publish it in a journal. I though I heard or read somewhere that you can&lt;/P&gt;&lt;P&gt;compile a SAS program. Can someone provide me with a little guidance&lt;/P&gt;&lt;P&gt;(and snippet of code) on how to do this. My program is written in the SAS&lt;/P&gt;&lt;P&gt;macro language, so basically users only need to provide the name of&lt;/P&gt;&lt;P&gt;a SAS file and the program will produce the analysis for them.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2012 16:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123220#M259919</guid>
      <dc:creator>crisgugiu</dc:creator>
      <dc:date>2012-09-16T16:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123221#M259920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="123849" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 08:10:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123221#M259920</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-09-17T08:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123222#M259921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I had a chance to implement the solution you proposed this week. It is consistent with what I was looking for. However, I have run into a few small hiccups along the way. Some of my students, to whom I am distributing the sasmacr file, are unable to read it. SAS is giving them a message like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;“&lt;SPAN style="color: #0070c0;"&gt;ERROR: File&lt;BR /&gt;TMP3.SASMACR.CATALOG was created for a different operating system&lt;/SPAN&gt;”. And&lt;BR /&gt;“&lt;SPAN style="color: #0070c0;"&gt;An error occurred attempting to initialize a SAS&lt;BR /&gt;desktop object from class sashelp.sasdesk.catmodel&lt;/SPAN&gt;.” &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;How do I resolve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; line-height: 115%; font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Cristian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 13:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123222#M259921</guid>
      <dc:creator>crisgugiu</dc:creator>
      <dc:date>2012-09-28T13:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123223#M259922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stored compiled macro procedures are not executable on operating systems different from where they were compiled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my guess is you have some students trying to run on a different OS than the one in which you compiled the code. Check what OS the students with errors are using.&amp;nbsp; Then you may have to re-compile the macro library on that OS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 17:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123223#M259922</guid>
      <dc:creator>LarryWorley</dc:creator>
      <dc:date>2012-09-28T17:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123224#M259923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Larry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By different OS do you mean 64-bit versus 32-bit? Or Windows 7 versus another version? What about SAS versions? My students either have 9.13, 9.2, or 9.3 on their PCs. Do I need to compile on different versions of SAS as well as OS? If so, has SAS not come up with another solution for distributing programs that protects intellectual rights?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 18:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123224#M259923</guid>
      <dc:creator>crisgugiu</dc:creator>
      <dc:date>2012-09-28T18:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123225#M259924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cristian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is snippet i found in the SAS 9.2 Macro Language Reference,&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001328775.htm"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001328775.htm&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot move a stored compiled macro to another operating system. You can, however, move the macro source code to another operating system where you can then compile and store it. You might need to recompile these macros if you use them in a different release of SAS. For more information, see your host companion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can tell from that statement, the institute is not very specific about what they mean.&amp;nbsp; I would expect difference between 32-bit and 64-bit OSs and am less inclined to expect differences between the different 32-bit windows os.&amp;nbsp; Also&amp;nbsp; I do not expect difference between the different flavors of SAS9.x, but still a possibility.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest looking for patterns of differences of your students' OS(including 32 vs 64bit) and SAS version to what you compiled the macros&amp;nbsp; I expect you will be able to detect the relevant differences.&amp;nbsp; Then hopefully you would find one system configuration you need to re-compile on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also check with SAS Tech support.&amp;nbsp; Using the site, &lt;A href="http://support.sas.com/ctx/supportform//createForm"&gt;http://support.sas.com/ctx/supportform//createForm&lt;/A&gt;, you can do that either on line or by telephone.&amp;nbsp; They might be able to be more specific about the system incapatibilities but I suspect they will send you done the same path I am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0" style="WIDTH: 100%;"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 19:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123225#M259924</guid>
      <dc:creator>LarryWorley</dc:creator>
      <dc:date>2012-09-28T19:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123226#M259925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Larry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using the SAS macro library for a couple of weeks. A few small headaches along the way, but I've been able to resolve them. However, I ran into a problem tonight that I would like a little help with. Now that I know how to securely compile my code, I am trying to secure more programs so that I can distribute them to my students. Recently, I was working with the following code. In order to keep my program short, I am referring my source code, which is located in separate files. The problem with this is that students will have a different file/folder structure on their computers. Hence, the code fails. I know that I can simply paste the actual code inside the macros. However, since I am trying to build a library of macros, over time, sorting through all the pages of code will be cumbersome. Do you have any suggestions for resolving this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Let Loc1=E:\Ohio State University\Teaching\Introduction to Educational Measurement\Fall 2012\;&lt;/P&gt;&lt;P&gt;options mstored sasmstore=mylib;&lt;BR /&gt;libname mylib "&amp;amp;Loc1\Secure macros\32-bit OS";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro DiscreteCI(DS=,Var=,alpha=,popN=)/store secure; /* This macro is encrypted */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods html close;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods listing;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS nodate NONUMBER nonotes nosource errors=0 NOPRINTMSGLIST linesize=102 pagesize=62; * Abbreviate size of log file ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Include "&amp;amp;Loc1\Secure macros\Source macro code\Median CI for a single discrete variable.sas" ;&amp;nbsp; /* Run external SAS code */&lt;BR /&gt;%mend DiscreteCI;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro ContinuousCI(DS=,Var=,alpha=,popN=)/store secure; /* This macro is encrypted */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods html close;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods listing;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS nodate NONUMBER nonotes nosource errors=0 NOPRINTMSGLIST linesize=102 pagesize=62; * Abbreviate size of log file ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Include "&amp;amp;Loc1\Secure macros\Source macro code\Median CI for a single continuous variable.sas" ;&amp;nbsp; /* Run external SAS code */&lt;BR /&gt;%mend ContinuousCI;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 03:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123226#M259925</guid>
      <dc:creator>crisgugiu</dc:creator>
      <dc:date>2012-10-19T03:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123227#M259926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not understand what you are saving by using %INC statements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also why is it defining a macro named &lt;STRONG&gt;c&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;ontinuousci&lt;/STRONG&gt; but storing the code in a file named "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Median CI for a single continuous variable.sas"&lt;/SPAN&gt;?&amp;nbsp; That just sounds like an invitation to generate mistakes caused by confusion. But since the thread starts off with looking for a method to hide the code then perhaps confusion is what is wanted?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 03:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123227#M259926</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-19T03:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123228#M259927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to use the %Inc statements to save space in the program that generated the SAS macro library. Some of the programs I wrote are several pages long. One is close to 30 pages long. I was not tying to be deceptive with my names. I developed a way for constructing nonparametric CI on the median for continuous data. SAS actually also can do this using Proc Univariate. However, our search algorithm for the order statistics are different. My method occassionally produces a tighter CI than existing methods. Hence, I called the macro ContinuousCI, so as to distinguish it from the DiscreteCI method. I derived the formula for constructing a nonparametric CI on discrete, including ordinal, data. Thus, I called the macro DiscreteCI. No one has ever derived a solution for this problem. Hence, my interest in protecting the source code until I publish the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if there a solution to the %INC problem or do I have not choice but to include that source code in the program that creates the SAS macro library?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 14:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123228#M259927</guid>
      <dc:creator>crisgugiu</dc:creator>
      <dc:date>2012-10-19T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123229#M259928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this how you compile the macros for yourself or is this the code you are handing out to your students?&lt;/P&gt;&lt;P&gt;If this is the code you're handing out: Using an %include won't protect your code as students will be able to directly access the code via the file path. Or simply use "options source2;" and it shows up in the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way is to pre-compile the code as secure macros and distribute the macro catalog. And as we know: It must be compiled for the OS SAS is running under.&lt;/P&gt;&lt;P&gt;The easiest way for you would be if all your students would run your stuff in the same environment so you would simply have to maintain a single macro store accessible to everyone. Not sure how your Uni is organised but it might be worth to investigate such a setting. Another option is SAS on Demand to have this common environment. I'm not sure how it exactly works and if it's an option for you, but it's sure worth to consider &lt;A href="http://www.sas.com/govedu/edu/programs/od_academics.html" title="http://www.sas.com/govedu/edu/programs/od_academics.html"&gt;http://www.sas.com/govedu/edu/programs/od_academics.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 01:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123229#M259928</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-10-20T01:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123230#M259929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the goal is to make the compilation easy then you can just use a single %INCLUDE statement.&lt;/P&gt;&lt;P&gt;Say your macros are in the directory C:\macros then you just need to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "c:\macros\*.sas" ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 02:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123230#M259929</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-20T02:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling SAS programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123231#M259930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;crisgugiu,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;The macro store is the most effective way to store your code and hide the code.&amp;nbsp; However, if you want to save the code, you can do what I do so when I ship updates, I send over one sas7bcat file isntead of a zipped file of the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to store SAS code to a catalog.&amp;nbsp; You can either store each data step in a SAS catalog (big pain), or you can load an entire program to a SAS catalog.&amp;nbsp; Unlike storing SAS Macros to the macro catalog where the Macro catalog is set as a libref, set the catalog as a fileref (i.e., filename fileref "path").&amp;nbsp; There are two ways to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Write the program to the file:&lt;OL&gt;&lt;LI&gt;libname catlib "path-to-catalog";&lt;BR /&gt;filename catfile catalog "catlib.project";&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; file catfile(filename.source);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "data newdata;";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "&amp;nbsp;&amp;nbsp;&amp;nbsp; set olddata;";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "&amp;nbsp; * some more datasteps;";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "run;";&lt;BR /&gt;run;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;But, since I'm lazy and it's not as simple to test programs that way and make adjustments:&lt;OL&gt;&lt;LI&gt;&lt;P&gt;libname catlib "path-to-catalog";&lt;/P&gt;&lt;P&gt;filename catfile catalog "catlib.project";&lt;BR /&gt;filename includes "my include library"; /* it's already set up, but for clarity, I've included it here */&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file catfile(filename.source);&amp;nbsp;&amp;nbsp;&amp;nbsp; /* note the ".source" - need that so it can be used in an include */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile includes(filename.sas);&amp;nbsp; /* note - the ".sas" is needed where the OS requires it to work */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put _infile_;&lt;BR /&gt;run;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the second step, filename should be the same for both the input and output so when you include it in code later on, your code doesn't break.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you know, I get a listing of all the files in the include library first, then use a macro to loop through the list and build my source catalog.&amp;nbsp; Later, when you use the catalog, do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname catlib "path-to-catalog";&lt;/P&gt;&lt;P&gt;filename catfile catalog "catlib.project";&lt;/P&gt;&lt;P&gt;%include catfile(filename);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can prevent the actual source code from being viewed in the process by creating a macro that stores the current options, sets options nosource nosource2;, then re-stores the options to what they were.&amp;nbsp; If you want to go to the trouble.&lt;/P&gt;&lt;P class="action-menu ab_ctl"&gt;&lt;A class="clickable-dropdown-arrow ab_button" data-ved="0CCwQ7B0wAA" href="#" id="am-b0"&gt;#&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 18:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compiling-SAS-programs/m-p/123231#M259930</guid>
      <dc:creator>pflickner</dc:creator>
      <dc:date>2013-11-07T18:21:54Z</dc:date>
    </item>
  </channel>
</rss>

