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.
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"
Unix does not use \ as a path separator.
outfile="\\layafsp2\IT\MIS\Private\SAS External Files\Automated Jobs\Monthly\User_Audit.xlsx"
Unix does not use \ as a path separator.
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.
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.
Yup, I've realised that now. Got a good 100 something jobs to change. Going to be some painful work
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.
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 🙂
@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!
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.