<?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: How to avoid deleting the entire data set when making a new variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687082#M24502</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data HW4set;
Set HW4set;
If 1 = p1p then Correct=correct+1;
If 1 = p2p then Correct=correct+1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Without the set statement, the data step doesn't know and doesn't care that there was a previous data set named HW4set. &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 00:47:55 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-28T00:47:55Z</dc:date>
    <item>
      <title>How to avoid deleting the entire data set when making a new variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687080#M24500</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm having trouble with making a new variable that will count the 'correct' answers in the first 17 questions on a survey. Whenever I use this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data HW4set;
If 1 = p1p then Correct=correct+1;
If 1 = p2p then Correct=correct+1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It just deletes all the data from the set. It turns the set from this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Diana___0-1601253013600.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49847i30A9A8A9A9B4C65B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Diana___0-1601253013600.png" alt="Diana___0-1601253013600.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Diana___1-1601253071683.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49848iD7958626814B5CE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Diana___1-1601253071683.png" alt="Diana___1-1601253071683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which I don't understand, it hasn't worked with various attempts, and it won't even make a variable that is constant such as:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA HW4set;
Always6=6;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It just erases the data set again, even though I got it straight from an example. There are no errors displayed either, it only says that p1p and p2p are uninitialized.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 00:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687080#M24500</guid>
      <dc:creator>Diana__</dc:creator>
      <dc:date>2020-09-28T00:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid deleting the entire data set when making a new variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687081#M24501</link>
      <description>&lt;P&gt;Your program doesn't read any data, just writes data out. I suspect you need to do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA HW4set;
set Mylib.Hw4;
Always6=6;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 00:47:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687081#M24501</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-09-28T00:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid deleting the entire data set when making a new variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687082#M24502</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data HW4set;
Set HW4set;
If 1 = p1p then Correct=correct+1;
If 1 = p2p then Correct=correct+1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Without the set statement, the data step doesn't know and doesn't care that there was a previous data set named HW4set. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 00:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-avoid-deleting-the-entire-data-set-when-making-a-new/m-p/687082#M24502</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-28T00:47:55Z</dc:date>
    </item>
  </channel>
</rss>

