<?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 Macro issue and how to permanently change values of a variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39541#M8022</link>
    <description>I have written a macro to split a large dataset into several states datasets but getting an error message for OR (Oregon) state as it is a boolean operator but working fine for NE(Nebraska) state.&lt;BR /&gt;
I tried %quote but it did not work.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%quote(&amp;amp;state)=%str(OR)&lt;BR /&gt;
&lt;BR /&gt;
Any suggestion would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Also I used Proc format and value to change the values of a variable in the main datasets but the values are unchanged in the states datasets.&lt;BR /&gt;
What should I use to change the values permanently?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
    <pubDate>Tue, 29 Mar 2011 03:53:56 GMT</pubDate>
    <dc:creator>excelsas</dc:creator>
    <dc:date>2011-03-29T03:53:56Z</dc:date>
    <item>
      <title>Macro issue and how to permanently change values of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39541#M8022</link>
      <description>I have written a macro to split a large dataset into several states datasets but getting an error message for OR (Oregon) state as it is a boolean operator but working fine for NE(Nebraska) state.&lt;BR /&gt;
I tried %quote but it did not work.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%quote(&amp;amp;state)=%str(OR)&lt;BR /&gt;
&lt;BR /&gt;
Any suggestion would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Also I used Proc format and value to change the values of a variable in the main datasets but the values are unchanged in the states datasets.&lt;BR /&gt;
What should I use to change the values permanently?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Tue, 29 Mar 2011 03:53:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39541#M8022</guid>
      <dc:creator>excelsas</dc:creator>
      <dc:date>2011-03-29T03:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro issue and how to permanently change values of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39542#M8023</link>
      <description>Have you used %superq() ?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Tue, 29 Mar 2011 07:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39542#M8023</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-29T07:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Macro issue and how to permanently change values of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39543#M8024</link>
      <description>Within macros, I often have to use the double quote like this:&lt;BR /&gt;
&lt;BR /&gt;
"&amp;amp;State."="OR"&lt;BR /&gt;
&lt;BR /&gt;
I know there are sometimes issues with the variables have extraneous characters, but if the domain is known, this might work.</description>
      <pubDate>Tue, 29 Mar 2011 11:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39543#M8024</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-03-29T11:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro issue and how to permanently change values of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39544#M8025</link>
      <description>%quote(...) with %str(..) works -- also a technique I sometimes use is to simply append a period/dot character in the expression to remove the resemblence of a Boolean operator, such as shown below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro x(state);&lt;BR /&gt;
%if  %quote(&amp;amp;state) = %str(OR) %then %put yep;&lt;BR /&gt;
%else %put nope;&lt;BR /&gt;
%Mend x;&lt;BR /&gt;
%x(NE);&lt;BR /&gt;
&lt;BR /&gt;
%macro x(state);&lt;BR /&gt;
%if  .&amp;amp;state = .OR %then %put yep;&lt;BR /&gt;
%else %put nope;&lt;BR /&gt;
%Mend x;&lt;BR /&gt;
%x(OR);</description>
      <pubDate>Tue, 29 Mar 2011 13:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue-and-how-to-permanently-change-values-of-a-variable/m-p/39544#M8025</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-03-29T13:18:12Z</dc:date>
    </item>
  </channel>
</rss>

