- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 10-28-2021 03:04 PM
(805 views)
I am looking for a way to verify that a PC file (e.g. test.csv) exists before I attempt to read it into my process through a data step. The obstacle is that I am not able to use the FILEEXISTS function as the my company has disabled users' ability to use CMD line operations (per corporate policy). I am hoping that someone else has an alternative method to accomplish the same objective.
Thank you in advance for your consideration.
Michael
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The SAS FEXIST function doesn't require OS command line access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Why would FILEEXISTS() not work because of the NOXCMD option?
It seems to work for me.
1 %put %sysfunc(getoption(xcmd)); NOXCMD 2 %put %sysfunc(fileexist(~/autoexec.sas)); 1