Hello,
I am using SAS EG 8.1.
I have two SAS instances - "Local" and "SASApp" which is a SAS server (not sure I'm explaining it right) but runs a little faster.
My past projects I used Local and would proc export files to my Z drive with no problem!
Recently I started building my projects running on SASApp and now my proc export statements aren't working. If my program is set to SASApps then I get an error that the physical file does not exist. If I switch the program to Local then I get an error that my WORK.file doesn't exist. (Noticed it added .DATA at the end of the file name, not sure if that has anything to do with it.
Any tips on how I can get my file that was ran on SASApp to export to my local Z drive? Thanks!
I met with our admin and the Z drive was mapped. But what I learned was I had to replace "Z:" with the host name of the server.
So once I updated that and then followed it with the path name it worked! So instead of outfile="Z:\Commercial Operations\..." it now looks like:
outfile="\\host\hostname\Commercial Operations\OCE Output\TOP_PAY_DIST&ts..txt"
Thank you everyone for your advice and input!
Hi @LRogers
SASApp could be a remote server connection where the Z drive isn't mapped yet? I am not sure if you have SAS installed on a remote server with Windows server or Unix/Linux. If it's a Windows machine you can take help from admin team to see if they can map the drive on the server. Also, there are other options to make the shared drive available on Unix/Linux machine like samba share.
SAS Access to PC files provides native access to SAS installed on server from desktop machines. It is separately licensed and have to be installed at your site.
@Anand_V - I don't think SAS/ACCESS to PC Files is needed in this case as only pipe-delimited files are being created.
@SASKiwi - Right. I was suggesting that in-case data needs to be directly accessed from remote SAS Session.
I met with our admin and the Z drive was mapped. But what I learned was I had to replace "Z:" with the host name of the server.
So once I updated that and then followed it with the path name it worked! So instead of outfile="Z:\Commercial Operations\..." it now looks like:
outfile="\\host\hostname\Commercial Operations\OCE Output\TOP_PAY_DIST&ts..txt"
Thank you everyone for your advice and input!
Your Local EG connection is running on your PC and your PC is the one with the mapped Z drive - you can confirm this in Windows Explorer.
SASApp runs on a remote SAS server where no mapped Z drive exists, hence the PROC EXPORT won't work.
To get this working successfully, run all of the preceding code on Local - SAS on your PC - to create your WORK.FINAL_DIST_LIST dataset. Your PROC EXPORT should then work.
Show the entire log of the step that was supposed to create your Work.Final_Dist_list data set.
Go the log copy the text of the procedure code or data step with all the notes, warnings or errors.
Paste the text into a text box opened on the forum with the </> icon.
Your first problem is that the data set that is supposed to be exported does not exist as far as the SAS session running on the server is concerned.
Without details I do not know if the data set was supposed to be built in your "local" SAS or not. Regardless, that SAS session does not see the data set. If you did build it locally then the "work" library is not the same library that the server references.
Or if the code you show is from "local" it does not see the Work library on the server. The two file systems are different and do not share libraries without some moderately seriously work on your part and that of the SAS admin or whoever configures your SAS server.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: