Depending your preference, look for functions FEXIST or FILEEXIST. Depend on your code steam, You may need to implement MACRO langugage to branch out your SAS code based on the outcome of these two functions.
Catch up on SAS Innovate 2026
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.