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

Add _SASPROGRAMDIR macro variable #1264

Open
smorrisj opened this issue Nov 4, 2024 · 3 comments
Open

Add _SASPROGRAMDIR macro variable #1264

smorrisj opened this issue Nov 4, 2024 · 3 comments
Labels
feature request New feature or request

Comments

@smorrisj
Copy link
Contributor

smorrisj commented Nov 4, 2024

Is your feature request related to a problem? Please describe.
Request to add _SASPROGRAMDIR macro variable to our existing set.

Describe the solution you'd like
When a user sas file is executed, we'd like to have access to the directory that the file is running in, via a macro variable named _SASPROGRAMDIR. If the path to my sas file is /test/myfile.sas, then I would expect _SASPROGRAMDIR to have the value /test. This would be super useful in having the ability to use relative links.

@scnwwu scnwwu added the feature request New feature or request label Nov 5, 2024
@cjdinger
Copy link
Member

cjdinger commented Nov 5, 2024

I saw this referenced in another issue, but also a macro var that identifies the client app would be useful. We have customers who want to adapt their programs to be aware that they are running in VS Code.

EG does this:

GLOBAL _CLIENTAPP 'SAS Enterprise Guide'
GLOBAL _CLIENTAPPABBREV EG

@snlwih
Copy link
Collaborator

snlwih commented Nov 7, 2024

When these macro variables get implemented, we should try to address #762 (add appname when starting a SAS server connection) at the same time. Btw. that entry also talks about generating macro variables to represent both product name and clientapp version number, similar how that is done in SAS Studio.

@engmtcdrm
Copy link
Contributor

I saw this referenced in another issue, but also a macro var that identifies the client app would be useful. We have customers who want to adapt their programs to be aware that they are running in VS Code.

EG does this:

GLOBAL _CLIENTAPP 'SAS Enterprise Guide'
GLOBAL _CLIENTAPPABBREV EG

This could be implemented by prepending macro variable declarations in the autoexec object of the payload prior to calling the Viya REST call to start the job. Should be pretty easy to do that plus merge any user autoexec entries as well. Probably could do something similar for this _SASPROGAMDIR too.

There are two spots where you can specify autoexec lines when starting up a Compute session/job. I'm not sure which one is being used in the code.
https://developer.sas.com/rest-apis/compute/createSession
https://developer.sas.com/rest-apis/compute/createJob

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

No branches or pull requests

5 participants