<?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: How to hide SAS macro source code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773372#M245678</link>
    <description>Chris,&lt;BR /&gt;Once I used &lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;  call execute('%secure(B)');&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;SAS runs into endless .&lt;BR /&gt;Whether I have to use "%nrstr(%secure(B))" to invoke a macro  or not .&lt;BR /&gt;Whether is that too clumsy ?&lt;BR /&gt;&lt;BR /&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; . Hope SAS could offer a simple solution .</description>
    <pubDate>Mon, 11 Oct 2021 11:48:21 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-10-11T11:48:21Z</dc:date>
    <item>
      <title>How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773087#M245532</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I read a lot differently on the topic "how to hide SAS macro source code".&amp;nbsp;Examples can be found &lt;A href="https://support.sas.com/kb/23/210.html" target="_self"&gt;here,&lt;/A&gt;&amp;nbsp;or &lt;A href="https://amadeus.co.uk/tips/how-to-keep-secret-code-secret/" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;Every article recommends using the SECURE clause. However, I can still show the source code by doing the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO COMPMAC1(PARAMETER) / STORE SECURE;
	DATA TEST;
		VAR="&amp;amp;PARAMETER ";
	RUN;
	PROC PRINT DATA=TEST;
	RUN;
%MEND;

OPTIONS MPRINT ;

DATA _NULL_;
	MACRO='%COMPMAC1(AMADEUS);';
	CALL EXECUTE(MACRO);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked the log and found it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-10-08 233246.png" style="width: 718px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64527iA5B5800825A5E5AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-10-08 233246.png" alt="Screenshot 2021-10-08 233246.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So my question is &lt;STRONG&gt;how to effectively hide SAS macro source code&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 04:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773087#M245532</guid>
      <dc:creator>NguyenThanhTra</dc:creator>
      <dc:date>2021-10-09T04:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773119#M245541</link>
      <description>&lt;P&gt;What your log is showing is NOT the macro code. It is the SAS code that the macro generated.&amp;nbsp; Two different things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To stop SAS from showing the code that a macro is generating turn off the MPRINT option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the real question is WHY would you want to hide your source code?&amp;nbsp; What problem does that solve?&amp;nbsp; I cannot think of any.&amp;nbsp; But it does introduce a lot of potential problems because now no one can tell if what the macro is doing is what they actually need or want to happen.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 18:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773119#M245541</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-08T18:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773121#M245542</link>
      <description>&lt;P&gt;Simple,&amp;nbsp;You can find the answer &lt;A href="https://www.pharmasug.org/proceedings/2021/AP/PharmaSUG-2021-AP-008.pdf" target="_self"&gt;here&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;There are, however, a number of macros that&amp;nbsp;are unique to the company, which &lt;STRONG&gt;required many hours to create and perfect&lt;/STRONG&gt; so that they can run either&lt;BR /&gt;for a number of situations/studies or are built for a very specific process. These macros are held close to the chest and &lt;STRONG&gt;generally are not shared with all clients&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 08 Oct 2021 18:34:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773121#M245542</guid>
      <dc:creator>NguyenThanhTra</dc:creator>
      <dc:date>2021-10-08T18:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773168#M245562</link>
      <description>&lt;P&gt;Have you considered using &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0sjezyl65z1cpn1b6mqfo8115h2.htm" target="_blank" rel="noopener"&gt;compiled macros&lt;/A&gt; and just distributing the compiled version? You can distribute the compiled macro without source code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect you will need to be very careful to ensure your macro only contains dynamic macro variable values that get resolved only at run time and not at compile time.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 22:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773168#M245562</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-08T22:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773184#M245574</link>
      <description>&lt;P&gt;To hide SAS code, add&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;options nomprint;&lt;/FONT&gt;&amp;nbsp; as the first line.&lt;/P&gt;
&lt;P&gt;Don't forget to restore to option to its previous status at the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 04:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773184#M245574</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-09T04:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773185#M245575</link>
      <description>&lt;P&gt;Compiling macros into the mstore as secure will prevent anyone to access your macro source code or get any macro execution information written to the SAS log (mprint, symbolgen, mlogic). It doesn't prevent users from seeing the SAS code the macro generates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Option NOSOURCE would prevent SAS to write the generated SAS code to the SAS Log BUT.... when using the macro with call execute() then the SAS code first gets generated and only executed when the data step ended - and for this reason option nosource set within the macro executes too late (timing).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could think about ways to obfuscate things a bit further (adding complexity though) but I can't think about a real solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's may-be worth to contact SAS Tech Support asking if there is a way (I doubt it but who knows).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 04:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773185#M245575</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-09T04:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773187#M245577</link>
      <description>&lt;P&gt;Also, I changed your thread title as your misunderstanding what option SECURE does is not the same as the option being&amp;nbsp;useless.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 04:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773187#M245577</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-09T04:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773212#M245593</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/362339"&gt;@NguyenThanhTra&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If your code involves data steps only you can consider using compiled data step programs. Further details can be had here&amp;nbsp; &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_014/engsas7bdat/n1h8ok8rj6uzqkn18tpnp1lb4lp9.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_014/engsas7bdat/n1h8ok8rj6uzqkn18tpnp1lb4lp9.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 12:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773212#M245593</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-10-09T12:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773262#M245615</link>
      <description>options nosource nosource2 nomprint nomlogic nosymbolgen;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro x;&lt;BR /&gt;data x;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;&lt;BR /&gt;%x</description>
      <pubDate>Sun, 10 Oct 2021 10:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773262#M245615</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-10T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773299#M245635</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;The challenge is that the the OP would provide your macro X precompiled and doesn't want the user to be able to see the SAS code it generates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The OP has no control over option settings outside of the macro ....and if the user uses the macro via call execute() then any option set within the macro come "too late".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 01:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773299#M245635</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-11T01:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773307#M245640</link>
      <description>&lt;P&gt;The OP doesn't mention call execute, but good call&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Here's a (not very satisfactory) few lines to add at the top of the secure macro to avoid anything being shown in the log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro secure(val)/secure;
  %local opt;
  %let opt=%sysfunc(getoption(mprint)) %sysfunc(getoption(mlogic)) %sysfunc(getoption(symbolgen)) %sysfunc(getoption(source)) %sysfunc(getoption(source2));
  %if &amp;amp;opt ne NOMPRINT NOMLOGIC NOSYMBOLGEN NOSOURCE NOSOURCE2 %then %do;
    options nomprint nomlogic nosymbolgen nosource nosource2;   
    %secure(&amp;amp;val)
    %return;
  %end;
  data T;
    X="&amp;amp;val";
    putlog "This data step was generated from a secure macro with value &amp;amp;val..";
  run;      
  options &amp;amp;opt. ; 
%mend secure;

options mprint mlogic symbolgen source source2;
%secure(A)

options mprint mlogic symbolgen source source2;
data _null_;
  call execute('%nrstr(%secure(B))');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with this displayed in the log:&lt;/P&gt;
&lt;PRE&gt;44         %secure(A)

This data step was generated from a secure macro with value A.
NOTE: The data set WORK.T has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds

47         data _null_;
48           call execute('%nrstr(%secure(B))');
49         run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
     

NOTE: CALL EXECUTE generated line.
1         + %secure(B)

This data step was generated from a secure macro with value B.
NOTE: The data set WORK.T has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;I am sure there is a lot of room to improve this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 03:59:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773307#M245640</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-11T03:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code (SECURE clause is useless now)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773317#M245644</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/362339"&gt;@NguyenThanhTra&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Simple,&amp;nbsp;You can find the answer &lt;A href="https://www.pharmasug.org/proceedings/2021/AP/PharmaSUG-2021-AP-008.pdf" target="_self"&gt;here&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;There are, however, a number of macros that&amp;nbsp;are unique to the company, which &lt;STRONG&gt;required many hours to create and perfect&lt;/STRONG&gt; so that they can run either&lt;BR /&gt;for a number of situations/studies or are built for a very specific process. These macros are held close to the chest and &lt;STRONG&gt;generally are not shared with all clients&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would make sure you run any process you apply this idea to with your CONTRACTS people for each client. The wording of your contract with the client might very well prohibit such obfuscation.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 06:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773317#M245644</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-11T06:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773372#M245678</link>
      <description>Chris,&lt;BR /&gt;Once I used &lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;  call execute('%secure(B)');&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;SAS runs into endless .&lt;BR /&gt;Whether I have to use "%nrstr(%secure(B))" to invoke a macro  or not .&lt;BR /&gt;Whether is that too clumsy ?&lt;BR /&gt;&lt;BR /&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; . Hope SAS could offer a simple solution .</description>
      <pubDate>Mon, 11 Oct 2021 11:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773372#M245678</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-11T11:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773394#M245690</link>
      <description>&lt;P&gt;I've never been in the business of hiding macro code (or SAS code), but depending on what the macro is doing, I guess DOSUBL might help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within a DOSUBL block, you can use PROC PRINTTO to turn off the log in the side session, and that should prevent any code or messages from being shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not advocating this, as I'm a big fan of automated log scanning so the idea of turning off the log chills me to the core of my bones.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it's a helpful benefit of DOSUBL that the timing works out, even when called by CALL EXECUTE.&amp;nbsp; Depending on the level of code hiding needed, you might not need to completely turn off the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro secure(val)/secure;
  %let rc=%sysfunc(dosubl(%nrstr(
  proc printto log="NUL" ;
  run ;

  data T;
    X="&amp;amp;val";
    putlog "This data step was generated from a secure macro with value &amp;amp;val..";
  run;      
  ))) ;
%mend secure;

data _null_;
  call execute('%secure(Q)');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 12:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773394#M245690</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-10-11T12:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773403#M245694</link>
      <description>&lt;P&gt;Great Idea. Use PROC PRINTTO to suppress print code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%macro secure(val)/secure;
 filename x DUMMY;
 proc printto log=x new;run;


  data T;
    X="&amp;amp;val";
    putlog "This data step was generated from a secure macro with value &amp;amp;val..";
  run;      
proc print data=sashelp.class;run;

proc printto;run; 
%mend secure;

options MPRINT MLOGIC SYMBOLGEN SOURCE SOURCE2;
data _null_;
  call execute('%secure(Q)');
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Oct 2021 11:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773403#M245694</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-14T11:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773415#M245700</link>
      <description>&lt;P&gt;I think Ksharp's answer is correct, highly effective, and simple.&lt;/P&gt;&lt;P&gt;One more question, could you please explain to me how this part works?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename x temp;
proc printto log=x new;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Oct 2021 15:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773415#M245700</guid>
      <dc:creator>NguyenThanhTra</dc:creator>
      <dc:date>2021-10-11T15:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773505#M245739</link>
      <description>&lt;P&gt;The&amp;nbsp;&amp;nbsp;&lt;EM&gt;temp&lt;/EM&gt;&amp;nbsp; device points to a temporary file that disappears with the SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This file is deleted when the SAS session ends cleanly or when the fileref is changed/cleared.&lt;/P&gt;
&lt;P&gt;Cunning users could find it in the WORK library with a name starting with #LN while the program is running, or if the SAS session fails.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should direct the log to the null device rather than to a temp file in my opinion.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename X 'nul'      ;   * DOS syntax;
filename X '/dev/null';   * Unix syntax;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 22:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773505#M245739</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-11T22:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773520#M245746</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/362339"&gt;@NguyenThanhTra&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure in which environment you are testing but in mine the timing challenge still exists. The generated SAS code gets fully printed to the SAS log. It's only when this code executes that any Proc Printto or Options will take effect and though too late to suppress printing to the SAS log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1634003401303.png" style="width: 898px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64595i0A1D8C57EA60BC03/image-dimensions/898x423?v=v2" width="898" height="423" role="button" title="Patrick_0-1634003401303.png" alt="Patrick_0-1634003401303.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 01:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773520#M245746</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-12T01:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773590#M245772</link>
      <description>&lt;BR /&gt;"filename x temp;"   create a temp file named X .&lt;BR /&gt;&lt;BR /&gt;"proc printto log=x new;run;"  redirect LOG into the temp file X .&lt;BR /&gt;&lt;BR /&gt;But I think you should give this credit to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; . who is genius to take this idea.</description>
      <pubDate>Tue, 12 Oct 2021 11:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773590#M245772</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-12T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide SAS macro source code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773591#M245773</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;But it doesn't work with call execute() as it comes too late. Else &lt;EM&gt;option nosource&lt;/EM&gt; would do the job as well.&lt;/P&gt;
&lt;P&gt;See the sample code and log I've posted and prove me wrong.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-hide-SAS-macro-source-code/m-p/773591#M245773</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-12T11:58:08Z</dc:date>
    </item>
  </channel>
</rss>

