<?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: %sysfunc in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/330305#M17452</link>
    <description>&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2017 20:31:29 GMT</pubDate>
    <dc:creator>Newph</dc:creator>
    <dc:date>2017-02-06T20:31:29Z</dc:date>
    <item>
      <title>%sysfunc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328883#M17349</link>
      <description>&lt;P&gt;I have a macro with a list of variable names that I am using as independent variables and would like to replace one the indep variables with some other one. So I initially have a macro name &amp;nbsp;oldm, and I would like to replace an oldvar in oldm with newvar and run a logit regression with the list of new variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data = mydata&amp;nbsp;order=internal descending ;&lt;BR /&gt;model &amp;amp;dep =%sysfunc(tranwrd(&amp;amp;oldm, oldvar, newvar));&lt;BR /&gt;/MAXITER=1000000;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I kept on geeting this&lt;/P&gt;&lt;P&gt;NOTE: The quoted string currently being processed has become more than 262 characters long. You&lt;BR /&gt;might have unbalanced quotation marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 21:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328883#M17349</guid>
      <dc:creator>Newph</dc:creator>
      <dc:date>2017-01-31T21:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: %sysfunc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328889#M17350</link>
      <description>&lt;P&gt;That sounds a lot like the last/second last example on this page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/seminars/sas_macros_introduction/" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/seminars/sas_macros_introduction/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 21:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328889#M17350</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-31T21:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: %sysfunc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328911#M17353</link>
      <description>&lt;P&gt;is there a way to code it in&amp;nbsp;sysfunc directly? any help would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 22:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328911#M17353</guid>
      <dc:creator>Newph</dc:creator>
      <dc:date>2017-01-31T22:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: %sysfunc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328918#M17354</link>
      <description>&lt;P&gt;This is a NOTE BTW, not a WARNING. You can ignore it, if your program works as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think there's a flaw in your logic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You shouldn't look at replacing the value using TRANWRD but on obtaining each word in turn. You can use %SCAN() for this instead.&lt;/P&gt;
&lt;P&gt;RIght now, you'd have to know what word to replace in TRANWRD, but if you know it why replace it and not use it directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example below shows you how to loop through the values in a list, which is what I think you're after. But I'm really guessing because you haven't provided enough information and your non-working code has some logic fails.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#p1n2i0ewaj1zian1ria5579z1zjh.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#p1n2i0ewaj1zian1ria5579z1zjh.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If all you want is TRANWRD to operate using SYSFUNC() then see the example below. Note that you have to have macro variables for the second and third parameter as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let string= This is my first test string;
%let oldvar = first;
%let newvar = second;

%put %sysfunc(tranwrd(&amp;amp;string, &amp;amp;oldvar, &amp;amp;newvar));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 22:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/328918#M17354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-31T22:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: %sysfunc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/330305#M17452</link>
      <description>&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 20:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sysfunc/m-p/330305#M17452</guid>
      <dc:creator>Newph</dc:creator>
      <dc:date>2017-02-06T20:31:29Z</dc:date>
    </item>
  </channel>
</rss>

