<?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: IF THEN on numeric variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506719#M1391</link>
    <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; Salary &lt;SPAN class="token operator"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;570&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;000&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;THEN&lt;/SPAN&gt; Salary &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;73&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;000&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;btw, you are missing set statement to read your input dataset&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Oct 2018 03:59:11 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-10-23T03:59:11Z</dc:date>
    <item>
      <title>IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506718#M1390</link>
      <description>&lt;P&gt;I need to update one observation that was a data entry error.&amp;nbsp; I am trying to use an IF/THEN statement, but I'm having no luck.&amp;nbsp;&amp;nbsp; I can't figure out what is wrong.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.New_Teachers;
if Salary &amp;gt; $570,000 THEN Salary = $73,000;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This results in the following errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 390-185: Expecting an relational or arithmetic operator.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset is attached.&amp;nbsp; Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 03:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506718#M1390</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-23T03:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506719#M1391</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; Salary &lt;SPAN class="token operator"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;570&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;000&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;THEN&lt;/SPAN&gt; Salary &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;73&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;000&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;btw, you are missing set statement to read your input dataset&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 03:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506719#M1391</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-23T03:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506874#M1410</link>
      <description>&lt;P&gt;For future questions, please copy the CODE along with the error or other messages from the log and paste into a code box opened using the forum's {I} menu icon such as:&lt;/P&gt;
&lt;PRE&gt;122  data work.New_Teachers;
123  if Salary &amp;gt; $570,000 THEN Salary = $73,000;
                 -
                 390
                 76
ERROR 390-185: Expecting an relational or arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.

124  run;

&lt;/PRE&gt;
&lt;P&gt;The code box is important as the messages get reformatted by the forum software. Note that in the box above that there is an _ character under the $. That underscored indicates the position that SAS found something unexpected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case a non-numeric value $.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There can be a lot of information in the log and learning how to read and interpret is important.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 15:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506874#M1410</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-23T15:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506926#M1422</link>
      <description>&lt;P&gt;Thanks for the feedback.&amp;nbsp; I will recreate and resend&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 16:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506926#M1422</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-23T16:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506936#M1423</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1                                                          The SAS System                      Tuesday, October 23, 2018 05:32:00 PM

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='REPLACE';
4          %LET _CLIENTPROCESSFLOWNAME='5020';
5          %LET _CLIENTPROJECTPATH='C:\Users\amman\OneDrive\Desktop\Data Cleanse.egp';
6          %LET _CLIENTPROJECTPATHHOST='DESKTOP-39HS716';
7          %LET _CLIENTPROJECTNAME='Data Cleanse.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGHTML TEMP;
15         ODS HTML(ID=EGHTML) FILE=EGHTML
16             ENCODING='utf-8'
17             STYLE=HTMLBlue
18             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
19             NOGTITLE
20             NOGFOOTNOTE
21             GPATH=&amp;amp;sasworklocation
22         ;
NOTE: Writing HTML(EGHTML) Body file: EGHTML
23         
24         GOPTIONS ACCESSIBLE;
25         
26         data work.New_Teachers;
27         if Salary &amp;gt; $570,000 THEN Salary = $73,000;
                       _
                       390
                       76
ERROR 390-185: Expecting an relational or arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.

28         run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NEW_TEACHERS may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              423.84k
      OS Memory           17064.00k
      Timestamp           10/23/2018 05:33:21 PM
      Step Count                        2  Switch Count  1
      Page Faults                       0
      Page Reclaims                     101
      Page Swaps                        0
      Voluntary Context Switches        5
      Involuntary Context Switches      0
      Block Input Operations            0
      Block Output Operations           160
      

29         
30         GOPTIONS NOACCESSIBLE;
2                                                          The SAS System                      Tuesday, October 23, 2018 05:32:00 PM

31         %LET _CLIENTTASKLABEL=;
32         %LET _CLIENTPROCESSFLOWNAME=;
33         %LET _CLIENTPROJECTPATH=;
34         %LET _CLIENTPROJECTPATHHOST=;
35         %LET _CLIENTPROJECTNAME=;
36         %LET _SASPROGRAMFILE=;
37         %LET _SASPROGRAMFILEHOST=;
38         
39         ;*';*";*/;quit;run;
40         ODS _ALL_ CLOSE;
41         
42         
43         QUIT; RUN;
44         &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the log in its entirety.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 17:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506936#M1423</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-23T17:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN on numeric variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506973#M1424</link>
      <description>&lt;P&gt;Your feedback pointed me in the right direction.&amp;nbsp; I removed the $ and , and reran.&amp;nbsp; It worked.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 18:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-on-numeric-variable/m-p/506973#M1424</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-23T18:25:22Z</dc:date>
    </item>
  </channel>
</rss>

