Hey all,

Newish to STATA - longtime SAS user - sorry for the basic question. I have a dataset of cases and controls. Trying to split them into two datasets based on the value of the variable casecontrol. It would be something like this in SAS:

data cases controls; set have;
if casecontrol=1 then output cases;
if casecontrol=2 then output controls;
run;

I guess I am confused since we dont have to specify datasets in STATA - so it seems like if I keep cases - then I lose the controls?

Am I missing something?

Thanks!

nick