<?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 Getting the error message &amp;quot;no observations in data set&amp;quot; and I have no idea why in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532169#M145793</link>
    <description>&lt;P&gt;I'm doing a simulation exercise in my class and I have the codes for it and everything was running smoothly until I tried to run the last code I wrote. This is what I've done so far:&amp;nbsp;&lt;/P&gt;&lt;P&gt;data samples;&lt;BR /&gt;do samp = 1 to 10;&lt;BR /&gt;do t = 1 to 100;&lt;BR /&gt;u = rannor(1996)*5;&lt;BR /&gt;x = 100 + 3*rannor(6991);&lt;BR /&gt;y = 10 + 0.5*x + u;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc corr;&lt;BR /&gt;where samp=1;&lt;BR /&gt;var x y u;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=samples outest=bvalues outseb;&lt;BR /&gt;by samp;&lt;BR /&gt;model y = x;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=bvalues;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had no issues running any of these codes until I tried to run this code next:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one two;&lt;BR /&gt;set bvalues;&lt;BR /&gt;if_type_='PARMS' then output one;&lt;BR /&gt;else if_type_='SEB' then output two;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=one;&lt;BR /&gt;proc print data=two;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I got this error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one two;&lt;BR /&gt;43 set bvalues;&lt;BR /&gt;44 if_type_='PARMS' then output one;&lt;BR /&gt;----&lt;BR /&gt;388&lt;BR /&gt;202&lt;BR /&gt;45 else if_type_='SEB' then output two;&lt;BR /&gt;---- ----&lt;BR /&gt;160 388&lt;BR /&gt;202&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;/P&gt;&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR 160-185: No matching IF-THEN clause.&lt;/P&gt;&lt;P&gt;46 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ONE may be incomplete. When this step was stopped there were 0 observations and 9 variables.&lt;BR /&gt;WARNING: Data set WORK.ONE was not replaced because this step was stopped.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;NOTE: No observations in data set WORK.ONE.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No observations in data set WORK.TWO.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here? I'm running the code exactly as directed in my assignment. I don't know how I'm messing up. Thanks guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 19:24:49 GMT</pubDate>
    <dc:creator>khalillx</dc:creator>
    <dc:date>2019-02-01T19:24:49Z</dc:date>
    <item>
      <title>Getting the error message "no observations in data set" and I have no idea why</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532169#M145793</link>
      <description>&lt;P&gt;I'm doing a simulation exercise in my class and I have the codes for it and everything was running smoothly until I tried to run the last code I wrote. This is what I've done so far:&amp;nbsp;&lt;/P&gt;&lt;P&gt;data samples;&lt;BR /&gt;do samp = 1 to 10;&lt;BR /&gt;do t = 1 to 100;&lt;BR /&gt;u = rannor(1996)*5;&lt;BR /&gt;x = 100 + 3*rannor(6991);&lt;BR /&gt;y = 10 + 0.5*x + u;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc corr;&lt;BR /&gt;where samp=1;&lt;BR /&gt;var x y u;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=samples outest=bvalues outseb;&lt;BR /&gt;by samp;&lt;BR /&gt;model y = x;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=bvalues;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had no issues running any of these codes until I tried to run this code next:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one two;&lt;BR /&gt;set bvalues;&lt;BR /&gt;if_type_='PARMS' then output one;&lt;BR /&gt;else if_type_='SEB' then output two;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=one;&lt;BR /&gt;proc print data=two;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I got this error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one two;&lt;BR /&gt;43 set bvalues;&lt;BR /&gt;44 if_type_='PARMS' then output one;&lt;BR /&gt;----&lt;BR /&gt;388&lt;BR /&gt;202&lt;BR /&gt;45 else if_type_='SEB' then output two;&lt;BR /&gt;---- ----&lt;BR /&gt;160 388&lt;BR /&gt;202&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;/P&gt;&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR 160-185: No matching IF-THEN clause.&lt;/P&gt;&lt;P&gt;46 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ONE may be incomplete. When this step was stopped there were 0 observations and 9 variables.&lt;BR /&gt;WARNING: Data set WORK.ONE was not replaced because this step was stopped.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;NOTE: No observations in data set WORK.ONE.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No observations in data set WORK.TWO.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here? I'm running the code exactly as directed in my assignment. I don't know how I'm messing up. Thanks guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 19:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532169#M145793</guid>
      <dc:creator>khalillx</dc:creator>
      <dc:date>2019-02-01T19:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the error message "no observations in data set" and I have no idea why</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532170#M145794</link>
      <description>&lt;P&gt;Just a typo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you should leave a blank between if and _type_&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see the correction--&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _type_='PARMS' then output one;
else if _type_='SEB' then output two;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if_type_&amp;nbsp; &amp;nbsp;as one word&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 19:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532170#M145794</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-02-01T19:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the error message "no observations in data set" and I have no idea why</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532175#M145795</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to be able to understand the log, which is great in SAS. Most of the errors in SAS shows with a bigger picture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your example, SAS is showing you on which line the error is encountered, and sometime you will have the solution withing the log info. Here it says IF-THEN, which means your IF-THEN statement is not properly defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;44 if_type_='PARMS' then output one;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;----&lt;/FONT&gt;&lt;BR /&gt;388&lt;BR /&gt;202&lt;BR /&gt;45 else if_type_='SEB' then output two;&lt;BR /&gt;---- ----&lt;BR /&gt;160 388&lt;BR /&gt;202&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;/P&gt;
&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;
&lt;P&gt;ERROR 160-185: &lt;FONT color="#339966"&gt;No matching IF-THEN clause&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 19:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532175#M145795</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-02-01T19:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the error message "no observations in data set" and I have no idea why</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532188#M145801</link>
      <description>&lt;P&gt;Please post code and especially log text into a code box opened using the forum's {I} icon. As you can see when you paste into the main message window that the code and log entries get reformatted by the forum software moving the underscore characters that indicate where issues occur.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 20:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532188#M145801</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-01T20:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the error message "no observations in data set" and I have no idea why</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532202#M145808</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one two;
set bvalues;
if _type_='PARMS' then output one;
else if _type_='SEB' then output two;
run;
proc print data=one;
proc print data=two;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Feb 2019 21:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-error-message-quot-no-observations-in-data-set-quot/m-p/532202#M145808</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-02-01T21:17:02Z</dc:date>
    </item>
  </channel>
</rss>

