<?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: IS MISSING caused 0 observations in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8490#M378</link>
    <description>Both of these examples are erroneous. It is not such syntax like "sex is missing". SAS generates the following error:&lt;BR /&gt;
[pre] &lt;BR /&gt;
23         IF sex is missing;&lt;BR /&gt;
                  __&lt;BR /&gt;
                  388&lt;BR /&gt;
                  76&lt;BR /&gt;
ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;
&lt;BR /&gt;
ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH&lt;BR /&gt;
SPR</description>
    <pubDate>Tue, 07 Jun 2011 17:21:56 GMT</pubDate>
    <dc:creator>SPR</dc:creator>
    <dc:date>2011-06-07T17:21:56Z</dc:date>
    <item>
      <title>IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8486#M374</link>
      <description>Hi folks,&lt;BR /&gt;
&lt;BR /&gt;
I used DATA step to manipulate data. The first method lead to 0 observations, while the second one works fine. Why in this case the 'IS MISSING' statement is wrong?&lt;BR /&gt;
&lt;BR /&gt;
DATA work.driver;&lt;BR /&gt;
    SET user.driver;&lt;BR /&gt;
    IF sex='X' or sex is missing THEN sex='M';&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DATA work.driver;&lt;BR /&gt;
    SET user.driver;&lt;BR /&gt;
    IF sex='X' or MISSING(sex) THEN sex='M';&lt;BR /&gt;
RUN;</description>
      <pubDate>Tue, 07 Jun 2011 15:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8486#M374</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-06-07T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8487#M375</link>
      <description>Hello Bncoxuk,&lt;BR /&gt;
&lt;BR /&gt;
There is an error in your IF statement. Correct version is like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
IF sex='X' or sex ='' THEN sex='M';&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 07 Jun 2011 15:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8487#M375</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-06-07T15:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8488#M376</link>
      <description>Can you please tell why the addition of an option causes the problem? So the 2nd one is wrong, as compared to the 1st one. &lt;BR /&gt;
&lt;BR /&gt;
DATA work.driver;&lt;BR /&gt;
SET user.driver;&lt;BR /&gt;
IF sex is missing;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA work.driver;&lt;BR /&gt;
SET user.driver;&lt;BR /&gt;
IF sex='X' or sex is missing;&lt;BR /&gt;
RUN;</description>
      <pubDate>Tue, 07 Jun 2011 15:45:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8488#M376</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-06-07T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8489#M377</link>
      <description>In the SASLOG, I expect you also got these messages with the illegal syntax, so SAS stopped processing and you will get no observations:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;
&lt;BR /&gt;
ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;
&lt;BR /&gt;
7    RUN;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 07 Jun 2011 17:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8489#M377</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-07T17:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8490#M378</link>
      <description>Both of these examples are erroneous. It is not such syntax like "sex is missing". SAS generates the following error:&lt;BR /&gt;
[pre] &lt;BR /&gt;
23         IF sex is missing;&lt;BR /&gt;
                  __&lt;BR /&gt;
                  388&lt;BR /&gt;
                  76&lt;BR /&gt;
ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;
&lt;BR /&gt;
ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 07 Jun 2011 17:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8490#M378</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-06-07T17:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8491#M379</link>
      <description>Thanks SPR.&lt;BR /&gt;
&lt;BR /&gt;
But can I know why the 'WHERE sex is missing' works?,  but 'IF sex is missing' is wrong?</description>
      <pubDate>Tue, 07 Jun 2011 17:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8491#M379</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-06-07T17:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: IS MISSING caused 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8492#M380</link>
      <description>Basically, the WHERE statement syntax is different than the IF statement syntax - see DOC link.&lt;BR /&gt;
&lt;BR /&gt;
Syntax of WHERE Expression&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000999255.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000999255.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 07 Jun 2011 17:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IS-MISSING-caused-0-observations/m-p/8492#M380</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-07T17:59:27Z</dc:date>
    </item>
  </channel>
</rss>

