I am currently wanting to save a sas dataset into my own drive as a csv file. And I have to do this every month for my department. Therefore, wondering if there is any sas code that can help to create a new folder in my drive automatically??
I have the below script... (part of it...)
%Let dir = K:\\int\Collaborate\PI\;
%Let folder_name = abc_folder; ---> This is the extra folder that I am referring to. I am wanting to create this folder every month, however I am wanting to utilise sas to help me create this extra folder automatically instead of having to get someone (while i am away for annual leave) to go into our network drive to create this folder manually so that just by a press of button they can run the script and that's all it does.
You can use the X command to create directories on your system (using operating system commands, such as MKDIR) or you can use the DCREATE function from within a SAS program. Either the SAS companion for your operating system (in the documentation) will have examples or you can open a track with Tech Support for more help about automatic directory creation using a program.
Or you could create an operating system script or command file and execute your SAS program (your .SAS file) from within that script (such as a .BAT or .CMD file). Again, the SAS Companion for your operating system will have examples of how to submit a batch SAS program from within an operating system script or command file.