<?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: Creating new variable with IF/THEN in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509296#M1757</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221595"&gt;@AMMAN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data  ClaimsByQuarter2;
set work.Claims;
if MOS = 'January'  then Quarter = '1';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 493px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24543iB4606E59C82DBEBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't figure out why I am getting on observation returned when I should have many that qualify.&amp;nbsp; Advice is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot attach the data set; its too large.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Post the log entery generated when that executes.&lt;/P&gt;
&lt;P&gt;It should have something about number of observations read and written to the output data set. If there is not indication of any read then you didn't start with a data set. If the number of observations read was 0 then the starting data set has no observations and likely have something that went wrong prior if you expect many records.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2018 19:42:13 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-31T19:42:13Z</dc:date>
    <item>
      <title>Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509279#M1751</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data  ClaimsByQuarter2;
set work.Claims;
if MOS = 'January'  then Quarter = '1';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 493px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24543iB4606E59C82DBEBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out why I am getting on observation returned when I should have many that qualify.&amp;nbsp; Advice is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot attach the data set; its too large.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509279#M1751</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-31T19:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509281#M1752</link>
      <description>if you comment it out do you get anything?</description>
      <pubDate>Wed, 31 Oct 2018 19:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509281#M1752</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-10-31T19:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509283#M1753</link>
      <description>&lt;P&gt;or leading blanks/ case sensitivity issue perhaps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;if strip(upcase(MOS))='JANUARY' then quarter='1';&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509283#M1753</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-31T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509284#M1754</link>
      <description>&lt;P&gt;Tried this.&amp;nbsp; Same result:&amp;nbsp; one line with missing values&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509284#M1754</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-31T19:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509286#M1755</link>
      <description>&lt;P&gt;lets debug&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;select distinct mos&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;from have;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know the above report&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509286#M1755</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-31T19:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509292#M1756</link>
      <description>so claims is empty.</description>
      <pubDate>Wed, 31 Oct 2018 19:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509292#M1756</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-10-31T19:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509296#M1757</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221595"&gt;@AMMAN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data  ClaimsByQuarter2;
set work.Claims;
if MOS = 'January'  then Quarter = '1';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 493px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24543iB4606E59C82DBEBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't figure out why I am getting on observation returned when I should have many that qualify.&amp;nbsp; Advice is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot attach the data set; its too large.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Post the log entery generated when that executes.&lt;/P&gt;
&lt;P&gt;It should have something about number of observations read and written to the output data set. If there is not indication of any read then you didn't start with a data set. If the number of observations read was 0 then the starting data set has no observations and likely have something that went wrong prior if you expect many records.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:42:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509296#M1757</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-31T19:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509305#M1758</link>
      <description>Attach the log. Note in your code that's shown, MOS is empty so of course it's empty. Usually this means your code error out somewhere and SAS just gives a partial result. Always read the log. If you can't attach the data, at least show a proc contents on the data set and a proc freq of the MOS values. If it's a SAS date for example that won't work.</description>
      <pubDate>Wed, 31 Oct 2018 20:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509305#M1758</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-31T20:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509319#M1760</link>
      <description>&lt;P&gt;Attached is the log.&amp;nbsp; Uninitialized&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 20:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509319#M1760</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2018-10-31T20:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new variable with IF/THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509321#M1761</link>
      <description>&lt;P&gt;So likely no variable by the name MOS in your input dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;verify&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc contents data=input;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 20:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Creating-new-variable-with-IF-THEN/m-p/509321#M1761</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-31T20:31:53Z</dc:date>
    </item>
  </channel>
</rss>

