<?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: tRUE OR fALSE? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110315#M22888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you have found, most functions just don't exist in macro language.&amp;nbsp; That's why %sysfunc was invented, to allow other functions to be called by macro language.&amp;nbsp; Also note, if your objective is to strip leading and trailing blanks from a macro variable, you don't need a function to do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let a = &amp;amp;a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The %let statement will ignore the leading and trailing blanks to the right of the equal sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2012 19:03:54 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-10-29T19:03:54Z</dc:date>
    <item>
      <title>tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110310#M22883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scan&lt;/STRONG&gt; is a macro function but &lt;STRONG&gt;Trim&lt;/STRONG&gt; is not so is the difference in its usage!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;%let thisvar&lt;STRONG&gt;=%scan&lt;/STRONG&gt;(&amp;amp;varnames,&amp;amp;ii,%str( ));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A name="a000400972"&gt;&lt;/A&gt;%let x=%sysfunc(&lt;STRONG&gt;trim&lt;/STRONG&gt;(%sysfunc(left(&amp;amp;num))));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 17:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110310#M22883</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-10-29T17:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110311#M22884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what your question is.&amp;nbsp; scan is not a macro function, but %scan is.&amp;nbsp; %sysfunc is a macro function that lets us use SAS functions.&amp;nbsp; In your example, you asked about trim, but not about the similar 'left'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, you could replace the two with %sysfunc(strip(whatever))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 18:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110311#M22884</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-29T18:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110312#M22885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;My question was why we could not go for:&lt;/P&gt;&lt;P&gt;%trim instead of&amp;nbsp; %sysfunc(&lt;STRONG&gt;trim(whatever) as we did for %scan???&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A name="a000400972"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 18:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110312#M22885</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-10-29T18:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110313#M22886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art already answered your question. Remember that macro code it just a tool to automate the generation of text that SAS can interpret as code. Trying to think of it as a real programming language will probably get you in trouble.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 18:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110313#M22886</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-29T18:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110314#M22887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, How is Sandy doing in your area?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 18:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110314#M22887</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-10-29T18:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110315#M22888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you have found, most functions just don't exist in macro language.&amp;nbsp; That's why %sysfunc was invented, to allow other functions to be called by macro language.&amp;nbsp; Also note, if your objective is to strip leading and trailing blanks from a macro variable, you don't need a function to do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let a = &amp;amp;a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The %let statement will ignore the leading and trailing blanks to the right of the equal sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 19:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110315#M22888</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-10-29T19:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: tRUE OR fALSE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110316#M22889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are already some built-in macro function, include TRIM and LEFT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let x=%trim(%left(whatever));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 03:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/tRUE-OR-fALSE/m-p/110316#M22889</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-10-30T03:31:34Z</dc:date>
    </item>
  </channel>
</rss>

