Hi Im using the following code to import a large data set, it imports and the header etc is correct but I just have a problem with my second column width- it comes in truncated so Im missing half of it.So the second part of the code-importing the imp part. I cant seem to find anything to format it to $32. I would prefer to not list all the column headings as the file is quite big so would be scrolling for far to long in the sas code. I would even change all columns to format $32.- is there some alteratation with * that allows the format of all columns to be changed? I have tried a simple proc import, its just the first 20 lines wouldnt be as long as the end lines so they become truncated and would preferably not want to increase this using guessing rows as it seems to be very slow and its a long dataset so guessing rows needs to be incredibly large. Thanks in advance! %let location=U:\abc\efg\hij\; %macro imp; %do i =29 %to 29; data _NULL_; call symput('imp', compress("'"||"&location."||"firsthalf"||'.txt'||" ' ")); call symput('header', compress("'"||"&location."||'header.txt'||" ' ")); run; quit; data _null_; infile &header. delimiter = ' ' pad TRUNCOVER DSD lrecl=900000 obs=1; file 'invar.sas'; length thisvar $32797; do i=1 to 900000; input thisvar @; if not missing(thisvar) then put thisvar "$"; end; run; data pairs&i; %let _EFIERR_ = 0; infile &imp. delimiter = ' ' MISSOVER DSD lrecl=900000 firstobs=2 ; input %inc 'invar.sas'; ; if _ERROR_ then call symputx('_EFIERR_',1); run; %end; %mend imp; %imp;
... View more