You can test that the set exists as mentioned by @Kurt_Bremser by running code like this:
Proc contents data=sashelp.cars;
run;
which will give a description of the data set and variables it exists or the log would show a data set does not exist error.
Many practice or training examples of code use some of the data sets supplied in the SASHELP library, so you might look in that library for versions of the data set before worrying about "importing" them.