do loop

#1
hi all:

I want to write a small macro program that loops through sequential yearly files but I'm having an issue given the naming conventions of the original files.

They are named: data01, data02, data03, .... , data15.

When I write a simple macro do loop to call in these datasets to perform a proc freq, SAS is looking for

data1, data2, data3, while all datasets with a non-leading zero are read in fine (data10, data11, data12).

Is there a way I can modify my macro to look for 01,02,03 instead of 1,2,3. I've already tried explicitly stating do j = 01 to 10 but no luck.

Thanks!