Yes you can, using a single DATA step, however you must list each of the 10 SAS data sets on the DATA statement for the SAS DATA step.
Explore SAS documentation and using the MDY function (within the DATA step) to assign a SAS DATE (numeric type) variable in the DO loop, incrementing the year-portion of your SAS variable via the MDY function. Apply a SAS FORMAT statement to your SAS variable.
I'm not sure what you mean by using a do loop to create the data sets.
There are 2 ways to create data set with a DATA step program:
1) read "raw" data using INFILE/INPUT to create your output data set
2) read an existing SAS dataset using a SET statement (you can also read a DBMS file with the right SAS/Access product)
If you are reading data with a SET statement and you want to output to differently numbered datasets based on a value, such as YEAR,
you don't really need a do loop to accomplish this task:
data sale93 sale94 ;
if year = 1993 then output sale93;
else if year = 1994 then output sale94;
proc print data=sale93;
title '1993 Sales';
proc print data=sale94;
title '1994 Sales';
If, for example, the data had the possibility of 1990-1999, but some years were not in the data and you wanted to programmatically run a data step
program for each year, then the way to accomplish that might best be in a macro program.