Help using Base SAS procedures

Re: Scan messy data for DATE values

Reply
Trusted Advisor
Posts: 1,204

Re: Scan messy data for DATE values

Try this.

data test(drop=flag);

infile "j:\test.txt" truncover;

input i $char120. ;

i=upcase(i);

i = compress(i,',');

flag=findc(i,'$');

Tons=input(strip(substr(i,flag-7,5)),6.2);

Price=input(strip(substr(i,flag+1,6)),7.2);

if Tons=. then delete;

run;

Ask a Question
Discussion stats
  • 0 replies
  • 152 views
  • 1 like
  • 1 in conversation