<?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: A sas print procedure output of the work.level data set is listed below: in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514494#M2751</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  @reeza if you don't want to answer please won't reply to the question someone &lt;BR /&gt;    will answer in a hurry I didn't check the code. This is my code&lt;BR /&gt;data have;

  input name $ level;

  cards;

  Frank 1

  Joan 2

  Sui 2

  Jose 3

  Burt 4

  Kelly .

  Juan 1
;

  run;



  data want;

  set have;

  if level=. then exp="unknown";

  else if level=1 then exp="Low";

  else if level = 2 or 3 then exp="Medium";

  else  exp="High";

  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 19 Nov 2018 16:50:23 GMT</pubDate>
    <dc:creator>rajeshalwayswel</dc:creator>
    <dc:date>2018-11-19T16:50:23Z</dc:date>
    <item>
      <title>A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514481#M2747</link>
      <description>&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input name $ level;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Frank 1&lt;/P&gt;&lt;P&gt;Joan 2&lt;/P&gt;&lt;P&gt;Sui 2&lt;/P&gt;&lt;P&gt;Jose 3&lt;/P&gt;&lt;P&gt;Burt 4&lt;/P&gt;&lt;P&gt;Kelly .&lt;/P&gt;&lt;P&gt;Juan 1&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set work.levels;&lt;/P&gt;&lt;P&gt;if level=. then exp="unknown";&lt;/P&gt;&lt;P&gt;else if level=1 then exp="Low";&lt;/P&gt;&lt;P&gt;else if level = 2 or 3 then exp="Medium";&lt;/P&gt;&lt;P&gt;else&amp;nbsp; exp="High";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which of the following is correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A)Low,Medium,High&lt;/P&gt;&lt;P&gt;B)Low,Medium,High,Unknown&lt;/P&gt;&lt;P&gt;C)Low,Medium,High,Unknown and high&lt;/P&gt;&lt;P&gt;D)Low,Medium,High,Unknown, high, and (missing character values)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Answer : B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please suggest why it is B not C.. Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 16:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514481#M2747</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-11-19T16:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514485#M2748</link>
      <description>&lt;P&gt;change your code to below level = 3 is missing. becacuase there is no "high" assigned and change your dataset name in set statement to have instead of levels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;

set work.have;

if level=. then exp="unknown";

else if level=1 then exp="Low";

else if level = 2 or level = 3 then exp="Medium";

else  exp="High";

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 16:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514485#M2748</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-11-19T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514487#M2749</link>
      <description>&lt;P&gt;1. The code is wrong and would never run - it refers to the wrong data set&lt;/P&gt;
&lt;P&gt;2. What is the question that is being asked? That's not anywhere in the post.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Why not run it and check the answer?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This exact or very similar question has been asked before, if you search you'll likely find the answer to whatever the question is and the logic.&lt;STRONG&gt; None of the answers are correct as the code posted won't run and HIGH will never be assigned.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/174522"&gt;@rajeshalwayswel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;data have;&lt;/P&gt;
&lt;P&gt;input name $ level;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;Frank 1&lt;/P&gt;
&lt;P&gt;Joan 2&lt;/P&gt;
&lt;P&gt;Sui 2&lt;/P&gt;
&lt;P&gt;Jose 3&lt;/P&gt;
&lt;P&gt;Burt 4&lt;/P&gt;
&lt;P&gt;Kelly .&lt;/P&gt;
&lt;P&gt;Juan 1&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set work.levels;&lt;/P&gt;
&lt;P&gt;if level=. then exp="unknown";&lt;/P&gt;
&lt;P&gt;else if level=1 then exp="Low";&lt;/P&gt;
&lt;P&gt;else if level = 2 or 3 then exp="Medium";&lt;/P&gt;
&lt;P&gt;else&amp;nbsp; exp="High";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which of the following is correct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A)Low,Medium,High&lt;/P&gt;
&lt;P&gt;B)Low,Medium,High,Unknown&lt;/P&gt;
&lt;P&gt;C)Low,Medium,High,Unknown and high&lt;/P&gt;
&lt;P&gt;D)Low,Medium,High,Unknown, high, and (missing character values)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Answer : B&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone please suggest why it is B not C.. Many thanks in advance.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 16:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514487#M2749</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-19T16:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514494#M2751</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  @reeza if you don't want to answer please won't reply to the question someone &lt;BR /&gt;    will answer in a hurry I didn't check the code. This is my code&lt;BR /&gt;data have;

  input name $ level;

  cards;

  Frank 1

  Joan 2

  Sui 2

  Jose 3

  Burt 4

  Kelly .

  Juan 1
;

  run;



  data want;

  set have;

  if level=. then exp="unknown";

  else if level=1 then exp="Low";

  else if level = 2 or 3 then exp="Medium";

  else  exp="High";

  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 16:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514494#M2751</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-11-19T16:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514496#M2752</link>
      <description>Yes High is not assigned? Can you explain in detail please. Why High not assigned.</description>
      <pubDate>Mon, 19 Nov 2018 17:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514496#M2752</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-11-19T17:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514498#M2754</link>
      <description>&lt;P&gt;because you have "High" not "high" in your else statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt; &lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; level &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;2&lt;/SPAN&gt; or &lt;SPAN class="token number"&gt;3&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;exp&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Medium"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;change it to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt; &lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; level &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;2&lt;/SPAN&gt; or level = &lt;SPAN class="token number"&gt;3&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;exp&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Medium"&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;</description>
      <pubDate>Mon, 19 Nov 2018 17:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514498#M2754</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-11-19T17:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514499#M2755</link>
      <description>&lt;P&gt;Even with this correction, you have errors in the program that make it difficult to figure out what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get "unknown" but you can't get "Unknown" because that doesn't exist in your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get "High" but you can't get "high" because that doesn't exist in your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way you typed the program, you would actually get:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"unknown", "Low" and "Medium" which is not one of the choices you presented.&amp;nbsp; You can see that easily enough by testing your own program.&amp;nbsp; Type in the question correctly, and you can get a better answer.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 17:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514499#M2755</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-11-19T17:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: A sas print procedure output of the work.level data set is listed below:</title>
      <link>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514502#M2756</link>
      <description>&lt;P&gt;I'm happy to answer, &lt;STRONG&gt;but you do have to ask a question&lt;/STRONG&gt;. &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Where in your post is a question? You have the multiple choice answers but no actual question posted.&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Exact Question:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/IF-ELSE-IF-CONDITION/m-p/497308/highlight/true#M131766" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/IF-ELSE-IF-CONDITION/m-p/497308/highlight/true#M131766&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can only respond to what I see posted, the code is incorrect and would not run, not sure why it's a problem to say that when it's clearly true.&amp;nbsp;How am I supposed to know if that's part of the question or if it's a mistake you made? I can only see what you've posted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Support-Communities/How-to-ask-a-good-question-and-receive-a-fast-reply/ta-p/417192" target="_blank"&gt;https://communities.sas.com/t5/SAS-Support-Communities/How-to-ask-a-good-question-and-receive-a-fast-reply/ta-p/417192&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/174522"&gt;@rajeshalwayswel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  @reeza if you don't want to answer please won't reply to the question someone &lt;BR /&gt;    will answer in a hurry I didn't check the code. This is my code&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 17:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/A-sas-print-procedure-output-of-the-work-level-data-set-is/m-p/514502#M2756</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-19T17:10:15Z</dc:date>
    </item>
  </channel>
</rss>

