I have a dataset that needs cleaning.
I have a field with A,B,C,D..... intermingled with 1,2,3,4....
Example: IA1234576BBX
These are invalid rows for the data, as only 1,2,3,4.... should be the value.
What is the best function to delete these rows.
Best would be to flag them so I can set a flag identifying them as invalid.
SAS EG 7.1.5
TIA Jay
I would suggest using the FINDC function to check if there are any alphabetic characters in the field. e.g.:
error_flag=findc(testvar,,'A')>0;
I would suggest using the FINDC function to check if there are any alphabetic characters in the field. e.g.:
error_flag=findc(testvar,,'A')>0;
Thank you, nice to have that error_flag for future processing...
Thanks again... J
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.