'infile'에 해당되는 글 1건

  1. 2007.04.27 Text to SAS dataset
04.IT Knowledge/SAS2007. 4. 27. 11:40

%macro importData(filename);
data &filename;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile "c:\SyBase\Code\&filename..txt" delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=1 ;

format yyyymmdd $ 8. ;
format tname $ 24. ;
format cname $ 48. ;
format vname $ 400. ;
format cnt 18. ;

informat yyyymmdd $ 8. ;
informat tname $ 24. ;
informat cname $ 48. ;
informat vname $ 400. ;
informat cnt 18. ;


input
 yyyymmdd $
 tname $
 cname $
 vname $
 cnt
;       
if _ERROR_ then call symput('_EFIERR_',1);  /* set ERROR detection macro variable! */
run;
%mend;

%importData(table1);

********************************************
*
* Do your best!!
*
* Homepage : http://www.javarang.net
* Javarang Lee
*
********************************************

Posted by 아주 오래된 미래