BookmarkSubscribeRSS Feed

[Macro 디렉토로] 공백이 포함된 디렉토리명을 매크로에서 처리하기

Started ‎06-15-2020 by
Modified ‎06-15-2020 by
Views 108

* 공백이 포함된 디렉토리명을 매크로에서 처리하기;

* 큰따옴표 2개로 처리;

 

option mprint mlogic;

 

%LET MYDIR0 = H:\SASDATA\02. BACK;

%LET MYDIR = &MYDIR0\RateMonth201805*.txt;

 

%PUT &MYDIR;

 

%macro DATA_READ(BAS_MON);

  filename DIRLIST pipe "dir ""&MYDIR"" /b";

 

  data dirlist ;

       infile dirlist lrecl=200 truncover;

       input file_name $100.;

  run;

%mend;

%DATA_READ(201805);

 

 

( Blank / Space / directory path )

 

* 출처 : http://cafe.daum.net/statsas/3F8j/376

Version history
Last update:
‎06-15-2020 02:56 AM
Updated by:
Contributors

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Article Labels
Article Tags