@ronakagrawal wrote:
I am really getting confused to referencing as I am using a virtual machine and not the actual environment. I guess it will be different for SAS Enterprise Guide.
EG will be similar to SAS Studio. Both are thin clients that are usually accessing SAS on a Server and you'll still have the same issues accessing files, so encountering this now isn't a bad thing.
Basically, you need to first import the data once you have your file reference. The reference only creates a shortcut link to the file, which you then need to import it first, to create a SAS data set.
You can find tutorials on
video.sas.com
Your question is likely most closely related to this video:
http://video.sas.com/detail/videos/how-to-tutorials/video/4573016758001/creating-a-sas-table-from-a-csv-file?autoStart=true
Specific answers to your question:
Does a file name cars should be already present in the library before running this command OR it is created on the fly?
It does not need to exist, this is because filename references can also be used as output files. So if you were to export a data set to a text file, you could first create a file reference, but the file doesn't have to pre-exist.
As someone else mentioned, FILENAME and LIBNAME statements are different.
FILENAME references a file.
A LIBNAME references a folder, usually with SAS data sets.
It can also reference files, specifically files such as XLSX or a database.
... View more