SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LRogers
Obsidian | Level 7

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!

SAS example local v SASApps.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
LRogers
Obsidian | Level 7

@AnandVyas 

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!

View solution in original post

6 REPLIES 6
AnandVyas
Ammonite | Level 13

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.

SASKiwi
PROC Star

@AnandVyas  - I don't think SAS/ACCESS to PC Files is needed in this case as only pipe-delimited files are being created.

AnandVyas
Ammonite | Level 13

@SASKiwi - Right. I was suggesting that in-case data needs to be directly accessed from remote SAS Session.

LRogers
Obsidian | Level 7

@AnandVyas 

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!

SASKiwi
PROC Star

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.

ballardw
Super User

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.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 4182 views
  • 0 likes
  • 4 in conversation