You will need to check the SAS DATA step (automatic variable) _ERROR_ -- if it has a non-zero condition then a prior INPUT (function or statement) detected an invalid data condition, depending of course on your INFORMAT being used.
Then, it is your decision how to proceed and decide to use the ABORT statement with the appropriate ERRORABEND/NOERRORABEND system option set -- possibly during the DATA step execution but also possibly at End-of-File condition maybe (after all input data has been read up).
Scott Barry
SBBWorks, Inc.
Recommended Google advance search argument this topic/post:
input data informat _error_ site:sas.com