diff --git a/api/scripts/systemInit.sas b/api/scripts/systemInit.sas index 9a20dda..0b07025 100644 --- a/api/scripts/systemInit.sas +++ b/api/scripts/systemInit.sas @@ -10,6 +10,4 @@ **/ -proc fcmp outcat=work.sasjs.utils; -%mcf_stpsrv_header() -quit; \ No newline at end of file +%mcf_stpsrv_header(wrap=YES, insert_cmplib=YES) diff --git a/api/src/controllers/internal/Execution.ts b/api/src/controllers/internal/Execution.ts index a313c9f..c45f40d 100644 --- a/api/src/controllers/internal/Execution.ts +++ b/api/src/controllers/internal/Execution.ts @@ -101,6 +101,7 @@ ${program}` typeof vars._debug === 'string' ? parseInt(vars._debug) : vars._debug let debugResponse: string | undefined + if ((debugValue && debugValue >= 131) || session.crashed) { debugResponse = `${webout}

SAS Log

${log}
` } @@ -108,7 +109,16 @@ ${program}` session.inUse = false sessionController.deleteSession(session) - if (returnJson) return { result: debugResponse ?? webout, log } + if (returnJson) { + const response: any = { + result: webout + } + if ((debugValue && debugValue >= 131) || session.crashed) { + response.log = log + } + + return response + } return debugResponse ?? webout }