I am importing a tab-delimited file in SAS, but there is a possible number of extra tab characters in some of the data lines. In order to verify whether all lines have the same number of tab delimiters, I want to count the number of tab character in each data line. How do I achieve that in SAS? For ordinary characters (for example ";" or "|", the code below works fine, but I don't know how to refer to the tab character, since '09'x does not work inside the count() function:
DATA output_file;
drop inrecord;
INFILE "input_file"
LRECL=1000
dlm=';'
MISSOVER
DSD
;
length inrecord $1000;
input @1 inrecord $1000.;
dlm_count = count(inrecord,';');
RUN;