Hi:
You may not need SAS macro processing at all. For example, if you read the documentation on the DCREATE function,
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a002986745.htm
you will discover that you can create a directory without using SAS Macro processing at all. Using the DCREATE approach, you could create your numbered folders using a simple DO loop, much like you show in your first DATA step program.
If you really, really want a SAS Macro approach, then you should read up a bit more on SAS Macro processing. This is a very good paper on the subject:
http://www2.sas.com/proceedings/sugi28/056-28.pdf
The program below illlustrates how to create the folders ZZ1, ZZ2 and ZZ3 in the c:\temp\ directory.
cynthia
[pre]
data _null_;
do i = 1 to 3;
DirectoryName = catt('zz',put(i,1.0));
NewDirectory=dcreate(DirectoryName,'c:\temp\');
putlog newdirectory= directoryname=;
end;
run;
[pre]