Hello, In order to detect problems with csv input files I count the number of columns in them (and compare them with the expected number), using the code:
data _null;
infile "&dir.test.csv";
input; call symputx("ncol_file1", countw(_infile_,","));
stop; run;
This works fine when all columns have data in row 1 (the data set is without column names). When a column does not have data in row 1 the resulting number of columns is without that column. Is there a way to count a column even when the first row (or several first rows) are without data?
Thank you!
... View more