Create new folder with simple checks

/ Published in: SAS
Save to your folder(s)

Copy this code and paste it in your HTML
  1. data _null_;
  2. length ret $3 new_dir $50;
  3. new_dir = "folder_name";
  4. ret = dcreate(new_dir,"&out");
  5. if ret="" and not fileexist(cats("&out",new_dir)) then put "ERROR: New directory for output was not created.";
  6. run;

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.