<?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: ERROR 180-322 and no results after recoding a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672636#M202163</link>
    <description>&lt;P&gt;Okay thank you so much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does the data step work? I know that I have to have data and then set below that. What to do I put after each of these?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 17:45:20 GMT</pubDate>
    <dc:creator>sgallen</dc:creator>
    <dc:date>2020-07-27T17:45:20Z</dc:date>
    <item>
      <title>ERROR 180-322 and no results after recoding a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672630#M202161</link>
      <description>&lt;P&gt;Hi, I am extremely new to SAS and am struggling to resolve this error message. I am trying to run summary stats using proc means on a data set and categorizing the columns by country and year (this part works on its own). Now I am trying to recode the variables I selected and continue to get an error code. I have attached my code and the error statements below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data="/folders/myfolders/PMA/pma.sas7bdat";
class COUNTRY YEAR;
var HASWATER;
var HASWTROUT2HR HASELECTRC HASELECOUT2HR HANDWASHNUM RUNWTRPRES SOAPPRES SHARPDISP 
;
WATER= .;
IF (HASWATER=0) THEN (WATER=0);
IF (HASWATER=1) THEN (WATER=1);
IF (HASWATER=98) THEN (WATER=.);
Title 'Summary Stats by Country';

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt; 73         proc means data="/folders/myfolders/PMA/pma.sas7bdat";
 NOTE: Data file _TEMP1.PMA.DATA is in a format that is native to another host, or the file encoding does not match the session 
       encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce 
       performance.
 74         class COUNTRY YEAR;
 75         var HASWATER;
 76         var HASWTROUT2HR HASELECTRC HASELECOUT2HR HANDWASHNUM RUNWTRPRES SOAPPRES SHARPDISP
 77         ;
 78         WATER= .;
            _____
            180
 79         IF (HASWATER=0) THEN (WATER=0);
            __
            180
 80         IF (HASWATER=1) THEN (WATER=1);
            __
            180
 81         IF (HASWATER=98) THEN (WATER=.);
            __
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 82         Title 'Summary Stats by Country';
 83         
 84         run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Jul 2020 17:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672630#M202161</guid>
      <dc:creator>sgallen</dc:creator>
      <dc:date>2020-07-27T17:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322 and no results after recoding a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672633#M202162</link>
      <description>&lt;PRE class="language-sas"&gt;&lt;CODE&gt;WATER= .;
IF (HASWATER=0) THEN (WATER=0);
IF (HASWATER=1) THEN (WATER=1);
IF (HASWATER=98) THEN (WATER=.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are DATA step commands. You cannot use them in PROC MEANS. You probably want a DATA step with these command BEFORE running PROC MEANS.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 17:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672633#M202162</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-27T17:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322 and no results after recoding a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672636#M202163</link>
      <description>&lt;P&gt;Okay thank you so much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does the data step work? I know that I have to have data and then set below that. What to do I put after each of these?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 17:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672636#M202163</guid>
      <dc:creator>sgallen</dc:creator>
      <dc:date>2020-07-27T17:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322 and no results after recoding a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672647#M202165</link>
      <description>&lt;P&gt;Example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
    set yourdatasetname;
    WATER= .;
    IF HASWATER=0 THEN WATER=0;
    else IF HASWATER=1 THEN WATER=1;
    else IF HASWATER=98 THEN WATER=.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Jul 2020 18:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-and-no-results-after-recoding-a-variable/m-p/672647#M202165</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-27T18:13:32Z</dc:date>
    </item>
  </channel>
</rss>

