I need some help, While executing the below code in the SAS Studio environment, %let outpath=G:\Data\CXV\PGMSs\Test; %put &outpath is ;
data shorts1; set sashelp.cars; run; proc export data=shorts1 outfile="&outpath/shorts.csv" dbms=csv replace; run;
I was getting the below error:
ERROR: Physical file does not exist, D:\SAS\Config\Lev1\SASApp1-u8/&outpath/shorts.csv. The files has been created in the config folder. So can you help us in knowing the reason how it has been created.
Either way once the operating system sees that SAS is using a RELATIVE pathname so it tries the create a file under the current working directory, which appears to be on that disk/sharename that is mounted as the D drive.
Please check if the path specified in the macro assignment actually exists. Please note the path should exist on the machine where the code is being executed. If the code is being executed on the server, then the: G:\" refers to the G driver on the server. The code is syntactically correct and will go wrong if the path is incorrect. I have tested your code and it works. Please post the output of the following