* 라이브러리 구문에서 새로운 폴더를 지정하여서 사용하기 위하여는
* SAS 9.3이전에 DOS 명령어로 폴더를 생성 한 후에 라이브러리 사용;
* SAS9.3에는 dlcreatedir옵션을 지원하여서 LIBNAME구문에서 존재하지 않는 폴더를 직접 지정하여서 사용;
* [SAS9.3] dlcreatedir 옵션을 사용하여서 LIBNAME구문에서 존재하지 않는 폴더 직접 생성;
options dlcreatedir;
libname newdir "f:\back\test1";
* newdir 라이브러리 폴더 위치 확인(SAS 이전 버젼에서 사용가능);
%let BACK = %sysfunc(pathname(newdir));
%put &BACK;
* 라이브러리 삭제를 하여도 생성된 폴더는 존재;
libname newdir clear;
* nodlcreatedir옵션(기본값) : 에서는 LIBNAME에 존재하지 않는 폴더 위치 지정시 에러;
options nodlcreatedir;
libname newdir "f:\back\test2";
* [참고] [DOS] 폴더 생성, 이름 변경 하기;
* : http://cafe.daum.net/statsas/3F8j/64;
* [예제] SAS WORK 에 폴더 생성하여서 사용하기-SAS종료시 자동으로 삭제됨;
%let outdir=%sysfunc(getoption(work));
/* create a results folder in the WORK area, with images subfolder */
options dlcreatedir;
libname res "&outdir./results";
libname img "&outdir./results/images";
/* clear the librefs - don't need them */
libname res clear;
libname img clear;
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.