<?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 After sub setting a dataset with a data step how do I subsequently return to the full dataset? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/737953#M28838</link>
    <description>&lt;P&gt;At times I use data steps to subset my full database. When I then try to return to the full database with a proc corr, the database is still a subset even though there is no where statement to subset it. This happened even when I pasted the un subsetted code into a new program without the preceding data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;*Standardizing the CVD and risk factors;
*Low FSVV cohort: FSVV2 &amp;lt; 567.2738 for multiple regression;
data Projects.source;
set Projects.source;
Where FSVV2 &amp;lt; 567.2738;
CVD2017ms=CVD2017m/282.8077 - 2.05765;
.&lt;BR /&gt;.&lt;BR /&gt;.
run; quit;
Subsequently a new program: 
libname Projects "/home/u43393119/Projects";

proc sort data=Projects.source;
	by weighted_no;
run; quit;

*Table 1 Low FSVV multiple regression: subsetting code removed;
proc corr data=Projects.source fisher ;
*Where FSVV2 &amp;lt; 567.2738;
*Where FSVV2 &amp;lt; 567.2738 or CVD2017m2 le 292.96526;
var CVD2017m2 LDLC17 FSVV FSVV2 pmeat17KC 
.
.
.
with CVD2017m;
run; quit;&lt;/PRE&gt;
&lt;P&gt;I use SAS on Demand for Academics. SAS 9.4.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the fix?&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 15:51:35 GMT</pubDate>
    <dc:creator>dkcundiffMD</dc:creator>
    <dc:date>2021-04-29T15:51:35Z</dc:date>
    <item>
      <title>After sub setting a dataset with a data step how do I subsequently return to the full dataset?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/737953#M28838</link>
      <description>&lt;P&gt;At times I use data steps to subset my full database. When I then try to return to the full database with a proc corr, the database is still a subset even though there is no where statement to subset it. This happened even when I pasted the un subsetted code into a new program without the preceding data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;*Standardizing the CVD and risk factors;
*Low FSVV cohort: FSVV2 &amp;lt; 567.2738 for multiple regression;
data Projects.source;
set Projects.source;
Where FSVV2 &amp;lt; 567.2738;
CVD2017ms=CVD2017m/282.8077 - 2.05765;
.&lt;BR /&gt;.&lt;BR /&gt;.
run; quit;
Subsequently a new program: 
libname Projects "/home/u43393119/Projects";

proc sort data=Projects.source;
	by weighted_no;
run; quit;

*Table 1 Low FSVV multiple regression: subsetting code removed;
proc corr data=Projects.source fisher ;
*Where FSVV2 &amp;lt; 567.2738;
*Where FSVV2 &amp;lt; 567.2738 or CVD2017m2 le 292.96526;
var CVD2017m2 LDLC17 FSVV FSVV2 pmeat17KC 
.
.
.
with CVD2017m;
run; quit;&lt;/PRE&gt;
&lt;P&gt;I use SAS on Demand for Academics. SAS 9.4.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the fix?&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 15:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/737953#M28838</guid>
      <dc:creator>dkcundiffMD</dc:creator>
      <dc:date>2021-04-29T15:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: After sub setting a dataset with a data step how do I subsequently return to the full dataset?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/737955#M28839</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Projects.source;
set Projects.source;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;You have the input data set and the output data set name set as the same. So that replaces your original data set source with the filtered data set, so SAS overwrites your original file. &lt;BR /&gt;&lt;BR /&gt;You should probably drop the library and use the WORK library instead. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data source;
set projects.source;
....

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;You will have to recreate your original data set.&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/292162"&gt;@dkcundiffMD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;At times I use data steps to subset my full database. When I then try to return to the full database with a proc corr, the database is still a subset even though there is no where statement to subset it. This happened even when I pasted the un subsetted code into a new program without the preceding data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;*Standardizing the CVD and risk factors;
*Low FSVV cohort: FSVV2 &amp;lt; 567.2738 for multiple regression;
data Projects.source;
set Projects.source;
Where FSVV2 &amp;lt; 567.2738;
CVD2017ms=CVD2017m/282.8077 - 2.05765;
.&lt;BR /&gt;.&lt;BR /&gt;.
run; quit;
Subsequently a new program: 
libname Projects "/home/u43393119/Projects";

proc sort data=Projects.source;
	by weighted_no;
run; quit;

*Table 1 Low FSVV multiple regression: subsetting code removed;
proc corr data=Projects.source fisher ;
*Where FSVV2 &amp;lt; 567.2738;
*Where FSVV2 &amp;lt; 567.2738 or CVD2017m2 le 292.96526;
var CVD2017m2 LDLC17 FSVV FSVV2 pmeat17KC 
.
.
.
with CVD2017m;
run; quit;&lt;/PRE&gt;
&lt;P&gt;I use SAS on Demand for Academics. SAS 9.4.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the fix?&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 16:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/737955#M28839</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-29T16:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: After sub setting a dataset with a data step how do I subsequently return to the full dataset?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/738021#M28855</link>
      <description>That was it!&lt;BR /&gt;Thanks very much for your help.</description>
      <pubDate>Thu, 29 Apr 2021 20:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/After-sub-setting-a-dataset-with-a-data-step-how-do-I/m-p/738021#M28855</guid>
      <dc:creator>dkcundiffMD</dc:creator>
      <dc:date>2021-04-29T20:41:09Z</dc:date>
    </item>
  </channel>
</rss>

