data Projects.source;
set Projects.source;
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.
You should probably drop the library and use the WORK library instead.
data source;
set projects.source;
....
run;
You will have to recreate your original data set.
@dkcundiffMD wrote:
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.
*Standardizing the CVD and risk factors;
*Low FSVV cohort: FSVV2 < 567.2738 for multiple regression;
data Projects.source;
set Projects.source;
Where FSVV2 < 567.2738;
CVD2017ms=CVD2017m/282.8077 - 2.05765;
.
.
.
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 < 567.2738;
*Where FSVV2 < 567.2738 or CVD2017m2 le 292.96526;
var CVD2017m2 LDLC17 FSVV FSVV2 pmeat17KC
.
.
.
with CVD2017m;
run; quit;
I use SAS on Demand for Academics. SAS 9.4.
What is the fix?
Thanks.