Hello! I have a question about importing CSV file into SAS. I have more than 300 csv file with identical variables. However, the maximum length for each variable in different file is different. Moreover, I have some extremely large records that has been beyond the length limitation of Excel. So the record is split into 2 rows. To solve these two problems, I added TERMSTR=CRLF and LRECL=32767 (for each file, the number of the observation is less than 30000). My code is following below. However, when I run the code, the log shows that 0 records were read from the infile. What should I do to solve this problems? Is it required to use a format statement to indicate the variable names, type or length? I also consider to use proc import to import CSV file. I can replace lrecl = 32767 with guessingrows = 32767. How about TERMSTR=CRLF? what should I replace this code with? data b04a;
infile 'F:\B04a.csv'
delimiter=","
missover
firstobs=2
TERMSTR=CRLF
lrecl = 32767;
run; NOTE: The infile 'F:\B04a.csv' is: Filename=F:\B04a.csv, RECFM=V,LRECL=32767,File Size (bytes)=51416983, Last Modified=22Sep2018:19:59:59, Create Time=22Sep2018:19:59:58 NOTE: 0 records were read from the infile 'F:\B04a.csv'. NOTE: The data set WORK.B04A has 1 observations and 0 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.00 seconds
... View more