<?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: Variable creation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569359#M160448</link>
    <description>&lt;P&gt;For your first question: "if" is a data step statement and works only inside a data step; the "run;" right before your if's constitutes a "step boundary", meaning the previous step is finished and you need to start a new one. Or if you did not want the previous step to finish yet, remove that run.&lt;/P&gt;
&lt;P&gt;I recommend that you work through the free online Programming 1 course, where such issues are covered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post code using the "little running man" icon.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 08:30:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-06-27T08:30:40Z</dc:date>
    <item>
      <title>Variable creation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569354#M160444</link>
      <description>&lt;P&gt;{Urgent} I am fairly new to SAS and have two questions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I am trying to run this code. Would I need to run the &lt;EM&gt;data temp;set EHdata.ARCHdata;&amp;nbsp;&lt;/EM&gt;line with the other code I've written everytime&amp;gt; Because, when I do not, I get this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot (1).png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30589iFE19E7CD3B81B70B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1).png" alt="Screenshot (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, I am trying to create this new variable ANCComplication using categorical variables that already exist in my dataset. Here is the code I've written:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot (2).png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30590i537854B2618C14BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (2).png" alt="Screenshot (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when I run a proc freq of ANCComplication, I get this:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot (3).png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30591i44B979BDBC89D242/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (3).png" alt="Screenshot (3).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know what I am doing wrong for both of these problems! Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 07:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569354#M160444</guid>
      <dc:creator>Sasy9873</dc:creator>
      <dc:date>2019-06-27T07:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Variable creation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569355#M160445</link>
      <description>&lt;P&gt;Hi and welcome to the SAS Communities &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please post your code using the little running man instead of posting it as images? Makes it much easier to provide a usable answer.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 07:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569355#M160445</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-27T07:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variable creation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569359#M160448</link>
      <description>&lt;P&gt;For your first question: "if" is a data step statement and works only inside a data step; the "run;" right before your if's constitutes a "step boundary", meaning the previous step is finished and you need to start a new one. Or if you did not want the previous step to finish yet, remove that run.&lt;/P&gt;
&lt;P&gt;I recommend that you work through the free online Programming 1 course, where such issues are covered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post code using the "little running man" icon.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 08:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-creation/m-p/569359#M160448</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-27T08:30:40Z</dc:date>
    </item>
  </channel>
</rss>

