Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using autoexec file with build #35

Open
cara499 opened this issue Nov 21, 2017 · 5 comments
Open

using autoexec file with build #35

cara499 opened this issue Nov 21, 2017 · 5 comments
Assignees
Labels

Comments

@cara499
Copy link

cara499 commented Nov 21, 2017

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.

@rpardee
Copy link
Owner

rpardee commented Nov 21, 2017

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?

@cara499
Copy link
Author

cara499 commented Nov 21, 2017

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.

dirlist

log

@apatel9437
Copy link

Hi,

I'm also having the same issue where the autoexec.sas file is not being read from the current working directory.

@rpardee rpardee self-assigned this Oct 23, 2018
@rpardee rpardee added the bug label Oct 23, 2018
@rpardee
Copy link
Owner

rpardee commented Oct 23, 2018

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.

@rpardee
Copy link
Owner

rpardee commented Sep 5, 2022

If I'm reading this right, on windows that command-line option only affects where the file open & save dialog boxes start out:
image
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants