<?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: Regarding If and then statement in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144020#M1398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;No i tried with other dataset i am not getting error even in the above codes when i will give run up to "moderate thinness" it will run. But i am getting only 3rd and 4th line of the codes is getting error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 06:22:49 GMT</pubDate>
    <dc:creator>anilgvdbm</dc:creator>
    <dc:date>2014-09-17T06:22:49Z</dc:date>
    <item>
      <title>Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144012#M1390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;when i run the belowed code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want.BMI_women;&lt;/P&gt;&lt;P&gt;set have.BMI_women;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 16.99&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 18.49&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Mild thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 24.99&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Normal range";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 29.99&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Overweight";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 34.99&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Obese class I";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 39.99&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Obese class II";&lt;/P&gt;&lt;P&gt;else if Women_BMI ge 40.00&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; bmi="Obese class III";run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting an error message like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;384&amp;nbsp; data nfhs_3.BMI_women;&lt;/P&gt;&lt;P&gt;385&amp;nbsp; set nfhs_3.BMI_women;&lt;/P&gt;&lt;P&gt;386&amp;nbsp; length bmi $20;&lt;/P&gt;&lt;P&gt;387&amp;nbsp; if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P&gt;388&amp;nbsp; else if Women_BMI le 16.99&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P&gt;389&amp;nbsp; else if Women_BMI le 18.49&amp;nbsp; then&amp;nbsp; bmi="Mild thinness";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: The name&amp;nbsp; bmi is not a valid SAS name.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;390&amp;nbsp; else if Women_BMI le 24.99&amp;nbsp; then&amp;nbsp; bmi="Normal range";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: The name&amp;nbsp; bmi is not a valid SAS name.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;391&amp;nbsp; else if Women_BMI le 29.99&amp;nbsp; then&amp;nbsp; bmi="Overweight";&lt;/P&gt;&lt;P&gt;392&amp;nbsp; else if Women_BMI le 34.99&amp;nbsp; then&amp;nbsp; bmi="Obese class I";&lt;/P&gt;&lt;P&gt;393&amp;nbsp; else if Women_BMI le 39.99&amp;nbsp; then&amp;nbsp; bmi="Obese class II";&lt;/P&gt;&lt;P&gt;394&amp;nbsp; else if Women_BMI ge 40.00&amp;nbsp; then&amp;nbsp; bmi="Obese class III";&lt;/P&gt;&lt;P&gt;395&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried a lot for this but i didnt get the solution please help me out in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 13:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144012#M1390</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-13T13:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144013#M1391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried your code and it work for me with no error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data BMI_women;&lt;/P&gt;&lt;P&gt;input Women_BMI ;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;20.22&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;34.33&lt;/P&gt;&lt;P&gt;50&lt;/P&gt;&lt;P&gt;-22.5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data BMI_women_new;&lt;/P&gt;&lt;P&gt;set BMI_women;&lt;/P&gt;&lt;P&gt;length bmi $25;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 16.99&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 18.49&amp;nbsp; then&amp;nbsp; bmi="Mild thinness";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 24.99&amp;nbsp; then&amp;nbsp; bmi="Normal range";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 29.99&amp;nbsp; then&amp;nbsp; bmi="Overweight";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 34.99&amp;nbsp; then&amp;nbsp; bmi="Obese class I";&lt;/P&gt;&lt;P&gt;else if Women_BMI le 39.99&amp;nbsp; then&amp;nbsp; bmi="Obese class II";&lt;/P&gt;&lt;P&gt;else if Women_BMI ge 40.00&amp;nbsp; then&amp;nbsp; bmi="Obese class III";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try run the code above and see if you will get the same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 14:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144013#M1391</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-13T14:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144014#M1392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code you've shown and the log don't match...the first references want.bmi_women and the log references nfhi_s.bmi_women.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're writing the data back to the same data set which can cause errors, try writing it to a new data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 16:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144014#M1392</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-09-13T16:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144015#M1393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only thing that I think that would produce a log like that would be if there are strange characters in your file so that what looks like "bmi" in the program either includes some hidden character or they are not actually the characters B, M and I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if you type program code into WORD it might convert your quotes and hyphens to some other character that it thinks looks better.&amp;nbsp; If you then try to run the program in SAS it will be confused by these non standard characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 20:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144015#M1393</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-13T20:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144016#M1394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom and Reeza ,&lt;/P&gt;&lt;P&gt;Thanks for comenting even i changed the dataset name and variables names but still i am getting same error. I am totaly confused about this i wrote this type of codes earlier also. Bur i am not able to find out the error. Please clarify me where i habe done mistake? this code i have to apply for many files i mean i habe to apply macros here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for your answers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 04:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144016#M1394</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-17T04:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144017#M1395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you paste in the actual characters from the SAS log?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 05:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144017#M1395</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-17T05:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144018#M1396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;27&amp;nbsp;&amp;nbsp; data nfhs_3.want;&lt;/P&gt;&lt;P&gt;28&amp;nbsp;&amp;nbsp; set nfhs_3.BMI_women;&lt;/P&gt;&lt;P&gt;29&amp;nbsp;&amp;nbsp; if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P&gt;30&amp;nbsp;&amp;nbsp; else if Women_BMI le 16.99&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P&gt;31&amp;nbsp;&amp;nbsp; else if Women_BMI le 18.49&amp;nbsp; then&amp;nbsp; bmi="Mild thinness";&lt;/P&gt;&lt;P&gt;ERROR: The name&amp;nbsp; bmi is not a valid SAS name.&lt;/P&gt;&lt;P&gt;32&amp;nbsp;&amp;nbsp; else if Women_BMI le 24.99&amp;nbsp; then&amp;nbsp; bmi="Normal range";&lt;/P&gt;&lt;P&gt;ERROR: The name&amp;nbsp; bmi is not a valid SAS name.&lt;/P&gt;&lt;P&gt;33&amp;nbsp;&amp;nbsp; else if Women_BMI le 29.99&amp;nbsp; then&amp;nbsp; bmi="Overweight";&lt;/P&gt;&lt;P&gt;34&amp;nbsp;&amp;nbsp; else if Women_BMI le 34.99&amp;nbsp; then&amp;nbsp; bmi="Obese class I";&lt;/P&gt;&lt;P&gt;35&amp;nbsp;&amp;nbsp; else if Women_BMI le 39.99&amp;nbsp; then&amp;nbsp; bmi="Obese class II";&lt;/P&gt;&lt;P&gt;36&amp;nbsp;&amp;nbsp; else if Women_BMI ge 40.00&amp;nbsp; then&amp;nbsp; bmi="Obese class III";&lt;/P&gt;&lt;P&gt;37&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set NFHS_3.WANT may be incomplete.&amp;nbsp; When this step was stopped there were 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; observations and 119 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.37 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 05:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144018#M1396</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-17T05:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144019#M1397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you run your code with other data sets (Any random created data set). Does you get the same Error?&lt;/P&gt;&lt;P&gt;Waiting for your answer...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144019#M1397</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-17T06:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144020#M1398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;No i tried with other dataset i am not getting error even in the above codes when i will give run up to "moderate thinness" it will run. But i am getting only 3rd and 4th line of the codes is getting error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144020#M1398</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-17T06:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144021#M1399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean that with your current data set if your code is as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data nfhs_3.want;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set nfhs_3.BMI_women;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;else if Women_BMI le 16.99&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;without the rest of the if-then conditions, your program complete successfully (with out error, i mean).&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Waiting for your answer...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144021#M1399</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-17T06:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144022#M1400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following error message might appear when you open a SAS data set with Base SAS that was created with SAS Enterprise Guide:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The problem occurs because the VALIDVARNAME=ANY system option is the default in SAS Enterprise Guide, but VALIDVARNAME=V7 is the default in Base SAS. This means that variable names containing special characters such as the hyphen character or other characters can be created with SAS Enterprise Guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome the problem, specify the following OPTIONS statement when you open these data sets with Base SAS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options validvarname=any;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144022#M1400</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2014-09-17T06:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144023#M1401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;post a proc contents from your input data set. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144023#M1401</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-09-17T10:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144024#M1402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daman,&lt;/P&gt;&lt;P&gt;its working but its creating 2 variables with the same name half of the values are in one variable and half of the values in another&amp;nbsp; variable. i attache screen shot for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144024#M1402</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-17T10:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144025#M1403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weel there must by a some weird character there. We cannot see it, but having two variables is telling there is a difference. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144025#M1403</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-17T10:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144026#M1404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are the screen shots?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144026#M1404</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2014-09-17T10:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144027#M1405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see in the screen shot the last 2 variables BMI_Status and BMI_status... so don't know why it has repeated 2 time with gaps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="7433" alt="" class="jiveImage" height="419" src="https://communities.sas.com/legacyfs/online/7433_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" width="946" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144027#M1405</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-17T10:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144028#M1406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have proved the variables are different. That is why you got the error and it did help to with using validvarname=all.&amp;nbsp; &lt;BR /&gt;The source code does have different names caused by a weird combination we do not see. Obviously you are using SAS-pc DMS V9 with a latin1 characterset.&lt;/P&gt;&lt;P&gt;This should not cause any issues of this kind. We cannot replay the error of copy/paste source code. Either you typed it or it did a correction.&lt;BR /&gt; The screenshot is hardly to see how the letters of the variables are. That is the interesting part is there something to see on the spelling of the variable.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 11:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144028#M1406</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-17T11:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144029#M1407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried a different method to create your variable?&amp;nbsp; Storing the values in PROC FORMAT is generally better practice in these situations.&amp;nbsp; Try the code below, I'd be surprised if this causes the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value bmi_fmt&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;low-16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Severe thinness'&lt;/P&gt;&lt;P&gt;16-&amp;lt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Moderate thinness'&lt;/P&gt;&lt;P&gt;17-&amp;lt;18.5&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Mild thinness'&lt;/P&gt;&lt;P&gt;18.5-&amp;lt;25&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Normal range'&lt;/P&gt;&lt;P&gt;25-&amp;lt;30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Overweight'&lt;/P&gt;&lt;P&gt;30-&amp;lt;35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Obese class I'&lt;/P&gt;&lt;P&gt;35-&amp;lt;40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Obese class II'&lt;/P&gt;&lt;P&gt;40-high&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Obese class III';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data nfhs_3.want;&lt;/P&gt;&lt;P&gt;set nfhs_3.BMI_women;&lt;/P&gt;&lt;P&gt;bmi = put(women_bmi, bmi_fmt.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 11:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144029#M1407</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2014-09-17T11:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144030#M1408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That view displays the variables labels not the variable names. post the output of a proc contents On your input and output datasets. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144030#M1408</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-09-17T13:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If and then statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144031#M1409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So there is nothing in the code that you have pasted that could generate the error you posted.&amp;nbsp; But perhaps the code you are running does not really look like what you posted.&amp;nbsp;&amp;nbsp; Try copying your code and modifying as I have done below and see if you still get the error messages.&amp;nbsp; If that makes the error message go away then perhaps the error messages are not about your code but are about your input data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3754&amp;nbsp; data want;&lt;/P&gt;&lt;P&gt;3755&amp;nbsp; *&amp;nbsp; set nfhs_3.BMI_women;&lt;/P&gt;&lt;P&gt;3756&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; Women_BMI le 16.00&amp;nbsp; then bmi="Severe thinness";&lt;/P&gt;&lt;P&gt;3757&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 16.99&amp;nbsp; then&amp;nbsp; bmi="Moderate thinness";&lt;/P&gt;&lt;P&gt;3758&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 18.49&amp;nbsp; then&amp;nbsp; bmi="Mild thinness";&lt;/P&gt;&lt;P&gt;3759&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 24.99&amp;nbsp; then&amp;nbsp; bmi="Normal range";&lt;/P&gt;&lt;P&gt;3760&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 29.99&amp;nbsp; then&amp;nbsp; bmi="Overweight";&lt;/P&gt;&lt;P&gt;3761&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 34.99&amp;nbsp; then&amp;nbsp; bmi="Obese class I";&lt;/P&gt;&lt;P&gt;3762&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI le 39.99&amp;nbsp; then&amp;nbsp; bmi="Obese class II";&lt;/P&gt;&lt;P&gt;3763&amp;nbsp;&amp;nbsp;&amp;nbsp; else if Women_BMI ge 40.00&amp;nbsp; then&amp;nbsp; bmi="Obese class III";&lt;/P&gt;&lt;P&gt;3764&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Variable Women_BMI is uninitialized.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.WANT has 1 observations and 2 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Can you re-type the program?&lt;/P&gt;&lt;P&gt;- Can you read the program as data and check the characters.&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'mycode.sas' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; list;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 14:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Regarding-If-and-then-statement/m-p/144031#M1409</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-17T14:10:47Z</dc:date>
    </item>
  </channel>
</rss>

