BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
titan31
Quartz | Level 8

Hi,

 

I'm currently going through a project in order to migrate out SAS environment from Windows to Linux (and distributed VA).

 

I'm hitting an issue atm, and said I might as well post it here, as I try to fix it. 

 

We've got jobs setup that export out to a shared network drive, and when I run those in Windows, it's fine.

 

However,when I run it in Linux, it gives me this, 

 

Temporary file for XLSX file can not be created -> /sas/sasconf/Lev1/SASApp/\\layafsp2\IT\MIS\Public\Craig\/User_Audit.$$1.
Make sure the path name is correct and that you have write permission.

 

Anyone know why it's defaulting to /sas/sasconf/Lev1/SASApp to output the file to, when that's not in the code (below is proc export part)

 

proc export data=users_grps
dbms=XLSX
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"

replace;
run;

 

Thanks for any help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"

Unix does not use \ as a path separator.  

View solution in original post

9 REPLIES 9
data_null__
Jade | Level 19
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"

Unix does not use \ as a path separator.  

titan31
Quartz | Level 8

Well, that's going to be a pain to change every job that exports out to use / instead. Still get an error, but I think it's this 

 

http://support.sas.com/kb/60/745.html

 

So, assume I just need some permissions set up there to be able to write from the new server. 

data_null__
Jade | Level 19

I could be that just switching \ to / will not be adequate.  I think you need to log on to UNIX and figure out the path seem like you are guessing at this point.

 

It could be the location is not known to UNX server at all, not mounted.

 

 

titan31
Quartz | Level 8

Yup, I've realised that now. Got a good 100 something jobs to change. Going to be some painful work

data_null__
Jade | Level 19

Change your point of view.  Use a SAS program to process your 100 programs.  I may take the same about of time to learn the techniques you need and code it as it would to do it by hand but think of what you will gain.

titan31
Quartz | Level 8

It's not all changing the one location to another exact location. Different jobs have different locations outputted, so it'd be messy to code it an If statement, and as it is, I'd need to go through every job to see what folder files are being saved to anyway, so might as well just do it manually at that point. 

 

Even if it was possible for me to do that, I'd have no idea where to start in writing code to modify a load of DI jobs. 

SASKiwi
PROC Star

Given the pain of changing hard-coded file paths in 100 programs, you might like to consider a better approach in the future. How about setting up some macro variables for commonly used paths and store these in a SAS autoexec program so they are available to all of your SAS programs? That will make future maintenance a lot easier.

titan31
Quartz | Level 8

Yup, going to have to. That or at least get someone else to do it next time 🙂

jpprovost
Quartz | Level 8

@titan31 wrote:

Yup, going to have to. That or at least get someone else to do it next time 🙂


 

Hi there,

 

Just saw your post. Maybe this macro (page 2) could be helpful to you?

 

https://support.sas.com/resources/papers/proceedings17/1363-2017.pdf 

 

Thanks!

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 2643 views
  • 2 likes
  • 4 in conversation