sas
sas copied to clipboard
using autoexec file with build
Can you use autoexec files with SAS.sublime-build? I have a file called autoexec.sas in the working directory, but when I run the build SAS is not reading it.
As written the package sets -SASINITIALFOLDER to the same dir as the submitted program. So if you've got \bibbity\bobbity\boo.sas open & you hit build, SAS should look for a \bibbity\bobbity\autoexec.sas to run first. Is that not the behavior you're seeing? Or is that what you're seeing & you'd rather it did something else?
This is not what I'm seeing. When I hit build, SAS does not look for an autoexec file in the same directory as the program I'm running. See directory listing and log file below.
Hi,
I'm also having the same issue where the autoexec.sas file is not being read from the current working directory.
Sorry to take so long to look at this. I confirm the behavior & it is a bug. I'm not sure why the SASINITFOLDER specification on the command line isn't working.
If I manually submit the very same command-line that sublime's python environment builds up in a cmd or powershell window it works fine. But for some reason when python shells out with that command everything works but sasinitfolder.
I'm afraid I'm stumped on this one. I'll leave this issue open in case inspiration strikes me (or anyone) but I fear this is not going to fixed.
Sorry.
If I'm reading this right, on windows that command-line option only affects where the file open & save dialog boxes start out:
Which is of course of no use for batch submitters like the users of this package.
Reading the linked doco on how SAS determines the current folder when SAS starts, I think this could be overcome by
- Adding the dir in which SAS.exe is found to your %PATH%, and
- Removing that dir from this packages' preferences (Preferences -> Package Settings -> SAS -> User settings.) (So--the setting should just be
"sas.exe")
I'd be interested to hear if this works for anyone, if anybody's still paying attention to this (am not in a good position to test it myself).