04-10-2015 04:03 AM
im working in SAS EG and want my programm to export excel files in local, but when i affect path to output statement in the proc export it display the following error:
ERROR: Physical file does not exist, /SAS92/config/Lev1/SASApp/C:\Documents and Settings\louzia\Bureau\12032015 projet TDB prepaid
This is what my server looks like:
04-10-2015 04:09 AM
Your SAS (behind EG) is not local, it is installed on a remote UNIX server. Either use the EG export wizard (which can write to your local disk), or write the file to your UNIX home directory and copy it from there to your local disk (eg with WinSCP).
04-10-2015 04:32 AM
Knew that one was coming
Some things about the UNIX filesystem:
The character separating directories is the forward slash, not the backward slash as in Windows
(Usage of the backslash in Windows comes from the fact that its ancestor CP/M had no directory hierarchy, but used the forward slash for commandline parameters; when Gates&Allen grafted the hierarchical filesystem to DOS 2, they used the backslash, instead of making DOS compatible with existing systems that had a hierarchical FS)
There are no drive designators, all file resources are "mounted" into a single tree
The tree starts with root (/); everything else is in subdirectories
A path starting with / originates from root and is called an absolute path; a path not starting with a / is called relative and denotes a path starting in the current working directory of the process. This is the reason why you see your "C:\Documents and Settings\...." appended to the working directory of the SAS workspace server.
As a big help, an environment variable ($HOME) is provided which contains the absolute path to your home directory.
So, to create a file in your home directory, use (as an example)
file "$HOME/file.csv" file_options;
You will then find this file in the Files section of your SASApp server in the server list in EG (you may have to refresh). Some file types can be transferred in EG by adding to the project and then exporting to the local disk.
My preferred method is to use WinSCP to do file transfers, as I can transfer anything and have total control over the process.
Edit: directories instead of characters (see bold print)