<?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: if then in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53528#M14786</link>
    <description>[pre]&lt;BR /&gt;
if _N_ = 1 or _N_ = 8 then do;&lt;BR /&gt;
 skills1=1;&lt;BR /&gt;
 skills2=1;&lt;BR /&gt;
 skills3=1;&lt;BR /&gt;
end;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Tue, 19 Apr 2011 17:12:16 GMT</pubDate>
    <dc:creator>Tim_SAS</dc:creator>
    <dc:date>2011-04-19T17:12:16Z</dc:date>
    <item>
      <title>if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53524#M14782</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I need help in changing the first and 8th observation of my data, while leaving the rest unchanged.&lt;BR /&gt;
using a simple &lt;BR /&gt;
if obs=1 then s=1 s2=1 s3=1;&lt;BR /&gt;
run;&lt;BR /&gt;
does not work</description>
      <pubDate>Tue, 19 Apr 2011 16:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53524#M14782</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-19T16:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53525#M14783</link>
      <description>It should be :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if _N_=1 or _N_=8 then s=1 s2=1 s3=1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Good luck!</description>
      <pubDate>Tue, 19 Apr 2011 16:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53525#M14783</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-04-19T16:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53526#M14784</link>
      <description>thanks but it gives me the following error:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Line generated by the invoked macro "MISQMATRIX".&lt;BR /&gt;
1     data QMatrix; set Q_MATRIX_WR; IF _N_=1 or _N_=8 THEN skills1=1 skills2=1 skills3=1; run;&lt;BR /&gt;
&lt;BR /&gt;
-------&lt;BR /&gt;
-------&lt;BR /&gt;
&lt;BR /&gt;
22&lt;BR /&gt;
22&lt;BR /&gt;
&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, ;, &amp;lt;, &amp;lt;=,&lt;BR /&gt;
              &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=,&lt;BR /&gt;
              |, ||, ~=.&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WORK.QMATRIX may be incomplete.  When this step was stopped there were 0&lt;BR /&gt;
         observations and 4 variables.&lt;BR /&gt;
WARNING: Data set WORK.QMATRIX was not replaced because this step was stopped.</description>
      <pubDate>Tue, 19 Apr 2011 17:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53526#M14784</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-19T17:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53527#M14785</link>
      <description>Sorry about that, you also need to use do;&lt;BR /&gt;
&lt;BR /&gt;
data QMatrix; &lt;BR /&gt;
set Q_MATRIX_WR; &lt;BR /&gt;
IF _N_=1 or _N_=8 THEN  do;&lt;BR /&gt;
skills1=1;&lt;BR /&gt;
skills2=1; &lt;BR /&gt;
skills3=1; &lt;BR /&gt;
end;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 19 Apr 2011 17:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53527#M14785</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-04-19T17:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53528#M14786</link>
      <description>[pre]&lt;BR /&gt;
if _N_ = 1 or _N_ = 8 then do;&lt;BR /&gt;
 skills1=1;&lt;BR /&gt;
 skills2=1;&lt;BR /&gt;
 skills3=1;&lt;BR /&gt;
end;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 19 Apr 2011 17:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53528#M14786</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2011-04-19T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53529#M14787</link>
      <description>Thank you Rick and Tim it WORKED!&lt;BR /&gt;
R.A.G.</description>
      <pubDate>Tue, 19 Apr 2011 17:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53529#M14787</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-19T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: if then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53530#M14788</link>
      <description>Or&lt;BR /&gt;
if _N_ in (1,8) then do;&lt;BR /&gt;
 skills1=1;&lt;BR /&gt;
 skills2=1;&lt;BR /&gt;
 skills3=1;&lt;BR /&gt;
end;</description>
      <pubDate>Wed, 20 Apr 2011 16:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then/m-p/53530#M14788</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2011-04-20T16:14:16Z</dc:date>
    </item>
  </channel>
</rss>

