Hi @elisehoo1
In Viya, the autoexec is stored as part of the compute context. To modify it you need to log onto SASEnvironment Manager as an administrator, select Contexts, View Compute Contexts. Choose the relevant compute context (eg for SAS Studio, or Job Execution Service), click the edit icon, then click the "Advanced" tab.
You can now enter autoexec statements and any startup options.
To help automate this process, we (Analytium SAS Apps team) built a tool that makes use of the Viya REST APIs to modify compute contexts. The benefit of this approach is that you can keep your source configuration in GIT and deploy on demand. The documentation for that is available here: https://cli.sasjs.io/context
If you don't have the administrator rights, you could also configure your jobs to include an autoexec as "precode". If you are using SASjs to compile your jobs / services / tests, you can do this via the initProgram setting. More info:
https://github.com/sascommunities/sas-global-forum-2021/blob/main/papers/1135-2021_Scaffolding-SAS-Projects/README.pdf
https://cli.sasjs.io/compile
Example repository: https://gitpod.io/#github.com/sasjs/template_jobs
Video: https://www.youtube.com/watch?v=KKfUHTngSFo
... View more