<?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: Whats wrong with this code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354663#M82992</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select (srefmon);
when (1) output wave5sipp;
when (2) output wave6sipp;
otherwise;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 29 Apr 2017 03:04:28 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-04-29T03:04:28Z</dc:date>
    <item>
      <title>Whats wrong with this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354653#M82986</link>
      <description>&lt;P&gt;&lt;BR /&gt;proc sort data = waves;&lt;BR /&gt;by ssuid eentaid epppnum srefmon;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data&lt;BR /&gt;wave5sipp&lt;BR /&gt;(rename = (tage=tage1&lt;BR /&gt;tptotinc=ptotinc1&lt;BR /&gt;srefmon=srefmon1 ))&lt;BR /&gt;wave6sipp&lt;BR /&gt;(rename =(tage=tage2&lt;BR /&gt;tptotinc=ptotinc2&lt;BR /&gt;srefmon=srefmon2 ));&lt;BR /&gt;set waves;&lt;BR /&gt;select (srefmon);&lt;BR /&gt;when (1) output wave5sipp;&lt;BR /&gt;when (2) output wave6sipp;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Unsatisfied WHEN clause and no OTHERWISE clause at line 2120 column 5.&lt;BR /&gt;SSUID=019128000932 SWAVE=5 SREFMON=3 RHCALMN=5 SHHADID=11 TFIPSST=22&lt;BR /&gt;THOTHINC=0 RFID=3 RFNKIDS=0 RFOKLT18=0 EENTAID=11 EPPPNUM=101 ESEX=2 ERACE=1&lt;BR /&gt;EORIGIN=2 TAGE=47 ERRP=6 EMS=4 ETYPMOM=-1 ETYPDAD=-1 TPEARN=2800&lt;BR /&gt;TPTOTINC=2800 RENROLL=3 EEDUCATE=37 EJBHRS1=40 _ERROR_=1 _N_=5&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 5 observations read from the data set WORK.WAVES.&lt;BR /&gt;WARNING: The data set WORK.WAVE5SIPP may be incomplete. When this step was&lt;BR /&gt;stopped there were 2 observations and 25 variables.&lt;BR /&gt;WARNING: Data set WORK.WAVE5SIPP was not replaced because this step was&lt;BR /&gt;stopped.&lt;BR /&gt;WARNING: The data set WORK.WAVE6SIPP may be incomplete. When this step was&lt;BR /&gt;stopped there were 2 observations and 25 variables.&lt;BR /&gt;WARNING: Data set WORK.WAVE6SIPP was not replaced because this step was&lt;BR /&gt;stopped.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 01:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354653#M82986</guid>
      <dc:creator>Mike7</dc:creator>
      <dc:date>2017-04-29T01:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354660#M82990</link>
      <description>&lt;P&gt;add an otherwise; clause&amp;nbsp;to your select statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ref:&amp;nbsp;&lt;SPAN&gt;Null statements that are used in OTHERWISE statements prevent SAS from issuing an error message when all WHEN conditions are false.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 02:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354660#M82990</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-29T02:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354663#M82992</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select (srefmon);
when (1) output wave5sipp;
when (2) output wave6sipp;
otherwise;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Apr 2017 03:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354663#M82992</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-04-29T03:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354666#M82993</link>
      <description>&lt;P&gt;&lt;SPAN&gt;What do you want your code to do when SREFMON=3 in the 5th record? Currently this is causing your error, because it's not included in your SELECT statement, but you should deal with it explicitly IMO. If you had used IF/THEN it would not have errored but would have set the value to missing. It's good to note the difference between these methods of recoding data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PS. In real life, make sure that you can post your errors because they may contain confidential information. Since this is homework I assume there's no issue with your data here.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Unsatisfied WHEN clause and no OTHERWISE clause at line 2120 column 5&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SSUID=019128000932 SWAVE=5 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;SREFMON=3&lt;/STRONG&gt;&lt;/FONT&gt; RHCALMN=5 SHHADID=11 TFIPSST=22&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THOTHINC=0 RFID=3 RFNKIDS=0 RFOKLT18=0 EENTAID=11 EPPPNUM=101 ESEX=2 ERACE=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EORIGIN=2 TAGE=47 ERRP=6 EMS=4 ETYPMOM=-1 ETYPDAD=-1 TPEARN=2800&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TPTOTINC=2800 RENROLL=3 EEDUCATE=37 EJBHRS1=40 _ERROR_=1 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;_N_=5&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/140223"&gt;@Mike7&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;proc sort data = waves;&lt;BR /&gt;by ssuid eentaid epppnum srefmon;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data&lt;BR /&gt;wave5sipp&lt;BR /&gt;(rename = (tage=tage1&lt;BR /&gt;tptotinc=ptotinc1&lt;BR /&gt;srefmon=srefmon1 ))&lt;BR /&gt;wave6sipp&lt;BR /&gt;(rename =(tage=tage2&lt;BR /&gt;tptotinc=ptotinc2&lt;BR /&gt;srefmon=srefmon2 ));&lt;BR /&gt;set waves;&lt;BR /&gt;select (srefmon);&lt;BR /&gt;when (1) output wave5sipp;&lt;BR /&gt;when (2) output wave6sipp;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;log message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Unsatisfied WHEN clause and no OTHERWISE clause at line 2120 column 5.&lt;BR /&gt;SSUID=019128000932 SWAVE=5 SREFMON=3 RHCALMN=5 SHHADID=11 TFIPSST=22&lt;BR /&gt;THOTHINC=0 RFID=3 RFNKIDS=0 RFOKLT18=0 EENTAID=11 EPPPNUM=101 ESEX=2 ERACE=1&lt;BR /&gt;EORIGIN=2 TAGE=47 ERRP=6 EMS=4 ETYPMOM=-1 ETYPDAD=-1 TPEARN=2800&lt;BR /&gt;TPTOTINC=2800 RENROLL=3 EEDUCATE=37 EJBHRS1=40 _ERROR_=1 _N_=5&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 5 observations read from the data set WORK.WAVES.&lt;BR /&gt;WARNING: The data set WORK.WAVE5SIPP may be incomplete. When this step was&lt;BR /&gt;stopped there were 2 observations and 25 variables.&lt;BR /&gt;WARNING: Data set WORK.WAVE5SIPP was not replaced because this step was&lt;BR /&gt;stopped.&lt;BR /&gt;WARNING: The data set WORK.WAVE6SIPP may be incomplete. When this step was&lt;BR /&gt;stopped there were 2 observations and 25 variables.&lt;BR /&gt;WARNING: Data set WORK.WAVE6SIPP was not replaced because this step was&lt;BR /&gt;stopped.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 03:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Whats-wrong-with-this-code/m-p/354666#M82993</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-29T03:12:14Z</dc:date>
    </item>
  </channel>
</rss>

