Hello,
I'm currently trying to access an external file .dat file on my MAC using INFILE, and it keeps coming up as the 'physical file does not exist'. Below is my syntax. I've put it in my Users folder, my desktop, documents, etc. I've tried two ways:
infile '\\client\c$\pilot.dat';
and
infile '//users/bebe/pilot.dat';
I'm not sure what the correct syntax path is. Having a lot of trouble trying to do this without using datalines. I've also tried csv files as well that definitely didn't work.
First thing: Underneath the hood of your Mac works a genuine UNIX system, so forget to use the backslash as anything else than a VERY special character.
UNIX's have no drive designators, just one filesystem starting at root; everything is mounted somewhere in there.
Your path to the file should start with a single slash (aka root), and directories need to be separated with slashes. Everything is case sensitive, so if your file is stored as Pilot.dat, pilot.dat won't find it.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.