<?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 Regular expressions applied to macros variables in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17893#M3578</link>
    <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I would like to validate that a macro variable contents a numeric value.&lt;BR /&gt;
&lt;BR /&gt;
I can do that with regular expresion in a data step but I do not know the way to do it with a macro variable.&lt;BR /&gt;
&lt;BR /&gt;
%let var = 123;&lt;BR /&gt;
%is_numeric(var);&lt;BR /&gt;
&lt;BR /&gt;
is_numeric should return true&lt;BR /&gt;
&lt;BR /&gt;
%let var = abc;&lt;BR /&gt;
%is_numeric(var);&lt;BR /&gt;
&lt;BR /&gt;
is_numeric should return false.&lt;BR /&gt;
&lt;BR /&gt;
Could somebody help me??&lt;BR /&gt;
&lt;BR /&gt;
Thanks!!&lt;BR /&gt;
sincerely, Juanvte.</description>
    <pubDate>Tue, 17 Nov 2009 11:32:46 GMT</pubDate>
    <dc:creator>JuanVte</dc:creator>
    <dc:date>2009-11-17T11:32:46Z</dc:date>
    <item>
      <title>Regular expressions applied to macros variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17893#M3578</link>
      <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I would like to validate that a macro variable contents a numeric value.&lt;BR /&gt;
&lt;BR /&gt;
I can do that with regular expresion in a data step but I do not know the way to do it with a macro variable.&lt;BR /&gt;
&lt;BR /&gt;
%let var = 123;&lt;BR /&gt;
%is_numeric(var);&lt;BR /&gt;
&lt;BR /&gt;
is_numeric should return true&lt;BR /&gt;
&lt;BR /&gt;
%let var = abc;&lt;BR /&gt;
%is_numeric(var);&lt;BR /&gt;
&lt;BR /&gt;
is_numeric should return false.&lt;BR /&gt;
&lt;BR /&gt;
Could somebody help me??&lt;BR /&gt;
&lt;BR /&gt;
Thanks!!&lt;BR /&gt;
sincerely, Juanvte.</description>
      <pubDate>Tue, 17 Nov 2009 11:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17893#M3578</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2009-11-17T11:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions applied to macros variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17894#M3579</link>
      <description>Hi Juanvte,&lt;BR /&gt;
&lt;BR /&gt;
Hope I understood.&lt;BR /&gt;
&lt;BR /&gt;
If it is correct, you can get it by SCAN &amp;amp; INDEX function.&lt;BR /&gt;
&lt;BR /&gt;
In the INDEX, you search for (0123456789) if its falls then its numeric.&lt;BR /&gt;
&lt;BR /&gt;
Please correct, if it is falls.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
S E N T H I L</description>
      <pubDate>Tue, 17 Nov 2009 11:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17894#M3579</guid>
      <dc:creator>S_E_N_T_H_I_L</dc:creator>
      <dc:date>2009-11-17T11:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions applied to macros variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17895#M3580</link>
      <description>Also, check the ANYxxxx functions which came about with SAS 9, such as ANYDIGIT.  With macro language, you also must use %SYSFUNC along with the call function.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary, Using Functions and CALL Routines&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001281551.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001281551.htm&lt;/A&gt;</description>
      <pubDate>Tue, 17 Nov 2009 14:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Regular-expressions-applied-to-macros-variables/m-p/17895#M3580</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-17T14:06:57Z</dc:date>
    </item>
  </channel>
</rss>

