1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-09 07:20:05 +00:00

fix: macros are available Sessions with SASAUTOS

This commit is contained in:
Saad Jutt
2022-03-06 01:57:14 +05:00
parent 5ba7661a83
commit 95843fa4c7
7 changed files with 41 additions and 6 deletions

View File

@@ -13,7 +13,8 @@ import {
extractHeaders,
generateFileUploadSasCode,
getTmpFilesFolderPath,
HTTPHeaders
HTTPHeaders,
sasJSCoreMacros
} from '../../utils'
export interface ExecutionVars {
@@ -104,6 +105,8 @@ export class ExecutionController {
`
program = `
options insert=(SASAUTOS="${sasJSCoreMacros}");
/* runtime vars */
${varStatments}
filename _webout "${weboutPath}" mod;

View File

@@ -67,7 +67,10 @@ export class SessionController {
// the autoexec file is executed on SAS startup
const autoExecPath = path.join(sessionFolder, 'autoexec.sas')
const contentForAutoExec = `/* compiled systemInit */\n${compiledSystemInitContent}\n/* autoexec */\n${autoExecContent}`
const contentForAutoExec = `/* compiled systemInit */
${compiledSystemInitContent}
/* autoexec */
${autoExecContent}`
await createFile(autoExecPath, contentForAutoExec)
// create empty code.sas as SAS will not start without a SYSIN