if (input(substr(dat,1,2),8.) > 12
then error = 'Y';
if error = 'Y' then abort;
put 'ERROR:Error in the date field.Correct the date field in the source data';
I forced values where month is greater than 12 and day is greater than 31.The process did not stop (abort).It processed further.
First, I encourage you to enhance your data validation by converting the character date-string to a SAS numeric DATE variable where SAS will validate the data more accurately during the INPUT function processing, the test the _ERROR_ variable for non-zero before you do some exception action.
For your particular post/query, you will want to read the specific OS companion guide about how ABORT works in your particular OS, also considering such OPTIONS as ERRORABEND/NOERRORABEND.