BookmarkSubscribeRSS Feed
Michael_W
Calcite | Level 5

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
SASKiwi
PROC Star

The SAS FEXIST function doesn't require OS command line access.

Tom
Super User Tom
Super User

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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 480 views
  • 0 likes
  • 3 in conversation