You can execute operating system commands within SAS by using CALL SYSTEM. For example, the following program uses the "rsubmit" feature of PC SAS / CONNECT to create a personal directory named "mydir" in /sastemp5, write a file to that directory, remove the file, and delete the directory at the end of the program.
%let wrds = wrds.wharton.upenn.edu 4016;
options comamid=TCP remote=WRDS;
call system('mkdir /sastemp5/mydir');
libname mylib '/sastemp5/mydir';
where year(date) = 2004;
proc print data=mylib.temp noobs;
proc delete data=mylib.temp;
call system ('rm -R /sastemp5/mydir') ;
Please be courteous and clean up (PROC DELETE and RM) your files after your program is done.