From 033ffd302502c7530fc44a314364f5cdb3be6ad2 Mon Sep 17 00:00:00 2001 From: dc Date: Sat, 24 Oct 2026 10:04:39 +0000 Subject: [PATCH] fix(tests): read the work location from _SASJS_WORK @sasjs/core 6.0.0 renamed the session globals to a _SASJS_ prefix and sets _SASJS_WORK only; SASJSWORK no longer exists (and sasjs/server's pre-program compat aliases never covered it). testsetup.sas still read &sasjswork in both the SASJS and SASMETA arms of %update_settings, so under the new pin those filename statements built unrooted paths and ms_createfile / mm_createstp wrote outside the session work directory, breaking sasjs test setup on SASJS and SAS9. mp_init() is called at the top of the script, so _SASJS_WORK is defined here. --- sas/sasjs/tests/testsetup.sas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sas/sasjs/tests/testsetup.sas b/sas/sasjs/tests/testsetup.sas index 60f19b7..c160d97 100644 --- a/sas/sasjs/tests/testsetup.sas +++ b/sas/sasjs/tests/testsetup.sas @@ -192,7 +192,7 @@ options mprint; %else %if &pf=SASJS %then %do; %mx_getcode(&root/services/public/settings,outref=stngs) - filename sendback "&sasjswork/settings2.txt" lrecl=1000; + filename sendback "&_SASJS_WORK/settings2.txt" lrecl=1000; data _null_; file sendback; infile stngs end=last lrecl=1000; @@ -223,11 +223,11 @@ options mprint; %mm_getstpcode(tree=&root/services/public ,name=Data_Controller_Settings - ,outloc=&sasjswork/settings.txt + ,outloc=&_SASJS_WORK/settings.txt ) data _null_; - file "&sasjswork/settings2.txt"; - infile "&sasjswork/settings.txt" end=last; + file "&_SASJS_WORK/settings2.txt"; + infile "&_SASJS_WORK/settings.txt" end=last; input; put _infile_; if last then do; @@ -238,7 +238,7 @@ options mprint; %mm_deletestp(target=&root/services/public/Data_Controller_Settings) %mm_createstp(stpname=Data_Controller_Settings ,filename=settings2.txt - ,directory=&sasjswork + ,directory=&_SASJS_WORK ,tree=&root/services/public ,Server=SASApp ,stptype=2