Hi,
I have a database with a variable "stage" with the following values: 1, 2, 1A, 1B, 2A, 2B.
I am trying to trim my data by finding all the people where the variable "stage" = 1B and delete them from the dataset.
I tried using this code:
data = allpeople_no1B;
set library.allpeople;
if stage = 1B then delete;
run;
However, SAS won't recognize 1B as a value of the variable stage even though it is in the dataset. I think it has something to do with the fact that there is letter ("B") because when I run the same code with 1, like this:
data = allpeople_no1B;
set library.allpeople;
if stage = 1 then delete;
run;
it works fine.
How can I get SAS to recognize "1B"?
thanks,
kungfupanda
I have a database with a variable "stage" with the following values: 1, 2, 1A, 1B, 2A, 2B.
I am trying to trim my data by finding all the people where the variable "stage" = 1B and delete them from the dataset.
I tried using this code:
data = allpeople_no1B;
set library.allpeople;
if stage = 1B then delete;
run;
However, SAS won't recognize 1B as a value of the variable stage even though it is in the dataset. I think it has something to do with the fact that there is letter ("B") because when I run the same code with 1, like this:
data = allpeople_no1B;
set library.allpeople;
if stage = 1 then delete;
run;
it works fine.
How can I get SAS to recognize "1B"?
thanks,
kungfupanda