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
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"
Thanks for any help.
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
So, assume I just need some permissions set up there to be able to write from the new server.
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.
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.
Yup, going to have to. That or at least get someone else to do it next time 🙂
Just saw your post. Maybe this macro (page 2) could be helpful to you?
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.