Is there a way to check if a variable will change the INPUT process in SAS? Or, alternatively, if you can get the message "NOTE: Invalid argument"?
data _null_; format test2 date9.; input test ; test2=INPUT(PUT(test,8.),yymmdd8.); if _error_ =1 then do; _error_=0; test2=INPUT(PUT(test-1,8.),yymmdd8.); end; put test2=; cards; 20270229 run;
source share