<?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 %Sysfunc function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318460#M69770</link>
    <description>&lt;P&gt;%sysfunc -&amp;nbsp;why this function we use?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2016 06:19:05 GMT</pubDate>
    <dc:creator>Tap222</dc:creator>
    <dc:date>2016-12-13T06:19:05Z</dc:date>
    <item>
      <title>%Sysfunc function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318460#M69770</link>
      <description>&lt;P&gt;%sysfunc -&amp;nbsp;why this function we use?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 06:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318460#M69770</guid>
      <dc:creator>Tap222</dc:creator>
      <dc:date>2016-12-13T06:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318462#M69771</link>
      <description>&lt;P&gt;Documentation:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Execute SAS functions or user-written functions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Logic:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How does SAS macro processing know if text you type is a string&amp;nbsp;or a function? Wrapping it with SYSFUNC tells the processor that you want to evaluate that function, not treat it as a string.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let my_func = substr(Awesome, 1, 2);
%let my_func_executed = %sysfunc(substr(Awesome, 1, 3));

%put &amp;amp;my_func;
%put &amp;amp;my_func_executed;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Results:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;54 %let my_func = substr(Awesome, 1, 2);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;55 %let my_func_executed = %sysfunc(substr(Awesome, 1, 3));&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;56&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;57 %put &amp;amp;my_func;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;substr(Awesome, 1, 2)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;58 %put &amp;amp;my_func_executed;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Awe&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Dec 2016 06:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318462#M69771</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-13T06:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: %Sysfunc function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318570#M69811</link>
      <description>&lt;P&gt;Macro language contains just a handful of functions.&amp;nbsp; DATA steps, on the other hand, contain hundreds of functions.&amp;nbsp; %SYSFUNC was invented so that you could tell macro language to use a DATA step function.&amp;nbsp; That way, the macro language would not have to reprogram all those DATA step functions into a macro language version.&amp;nbsp; Most DATA step functions (not all) can be called using %SYSFUNC.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sysfunc-function/m-p/318570#M69811</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-12-13T14:14:29Z</dc:date>
    </item>
  </channel>
</rss>

