Hi, I have used the following code and macro to import mutliple csv files: %let path = C:\; filename folder "&path\ndakota0711"; libname c 'C:\Temp'; options validmemname=extend; data county_list; length Line 8 county_code $20; list = dopen('folder'); do Line = 1 to dnum(List); County_code = trim(dread(List,Line)); output; end; drop List Line; run; data nd0711; set county_list end=final; call symputx(cats('County_Code', _N_), trim(County_Code)); call symputx(cats('Name', _N_), trim(nliteral(substr(County_Code,1,min(32, length(County_Code)-4))))); if final then call symputx(trim('Total'), _N_); run; %macro loop; %do i = 1 %to &Total; proc import datafile="&path\ndakota0711\&&County_Code&i" out=c.&&name&i dbms=csv replace; getnames=yes; run; %end; %mend loop; %loop However, observations of the first variable "From" in all imported data sets are all trimmed or truncated (I have attached a screenshot of the output file). Can anyone help me with this.
... View more