From 46ae27b18280e660d4f27fdf8044d08629516b2b Mon Sep 17 00:00:00 2001 From: allan Date: Fri, 26 Jun 2026 12:26:03 +0100 Subject: [PATCH 1/2] fix: updates to make tests pass on viya and sasjs server for mx_createjob --- base/mp_assert.sas | 2 +- base/mp_assertcols.sas | 2 +- base/mp_assertcolvals.sas | 2 +- base/mp_assertdsobs.sas | 2 +- base/mp_assertscope.sas | 2 +- base/mp_init.sas | 1 + tests/base/mf_getvarlist.test.sas | 2 +- tests/viyaonly/mv_createwebservice.test.sas | 2 +- tests/x-platform/mx_createjob.test.sas | 5 ++++- viya/mv_deletejes.sas | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) diff --git a/base/mp_assert.sas b/base/mp_assert.sas index 86fdf561..ea48d260 100644 --- a/base/mp_assert.sas +++ b/base/mp_assert.sas @@ -35,7 +35,7 @@ )/*/STORE SOURCE*/; data ; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_comments="&sysmacroname: Test result of "!!symget('iftrue'); %if %eval(%unquote(&iftrue)) %then %do; diff --git a/base/mp_assertcols.sas b/base/mp_assertcols.sas index 73b39153..5d47dddf 100644 --- a/base/mp_assertcols.sas +++ b/base/mp_assertcols.sas @@ -108,7 +108,7 @@ %end; data; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); if test_description='0' then test_description="Testing &inds for existence of &test of: &cols"; diff --git a/base/mp_assertcolvals.sas b/base/mp_assertcolvals.sas index dfa70eb0..c8bec124 100644 --- a/base/mp_assertcolvals.sas +++ b/base/mp_assertcolvals.sas @@ -143,7 +143,7 @@ ) data; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_result='FAIL'; test_comments="&sysmacroname: &lib..&ds..&col has &result/&orig values " diff --git a/base/mp_assertdsobs.sas b/base/mp_assertdsobs.sas index 4abe4238..e4f0cf1e 100644 --- a/base/mp_assertdsobs.sas +++ b/base/mp_assertdsobs.sas @@ -87,7 +87,7 @@ %end; data &ds; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_result='FAIL'; test_comments="&sysmacroname: Dataset &inds has &nobs observations."; diff --git a/base/mp_assertscope.sas b/base/mp_assertscope.sas index 213b1461..31f9a9c0 100644 --- a/base/mp_assertscope.sas +++ b/base/mp_assertscope.sas @@ -131,7 +131,7 @@ data ; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_comments=symget('test_comments'); test_result=symget('test_result'); diff --git a/base/mp_init.sas b/base/mp_init.sas index ee2231b9..6cd992b4 100644 --- a/base/mp_init.sas +++ b/base/mp_init.sas @@ -37,6 +37,7 @@ %global SASJS_PREFIX /* the ONLY hard-coded global macro variable in SASjs */ + &prefix.PROCESSMODE &prefix._STPSRV_HEADER_LOC /* SASjs server specific vars*/ &prefix._FUNCTIONS /* used in mcf_init() to track core function compilation */ &prefix._INIT_NUM /* initialisation time as numeric */ &prefix._INIT_DTTM /* initialisation time in E8601DT26.6 format */ diff --git a/tests/base/mf_getvarlist.test.sas b/tests/base/mf_getvarlist.test.sas index 6982a991..fdfb4a01 100644 --- a/tests/base/mf_getvarlist.test.sas +++ b/tests/base/mf_getvarlist.test.sas @@ -15,7 +15,7 @@ %let test5=%mf_getvarlist(sashelp.class,typefilter=C); data work.test_results; - length test_description $256 test_result $4 test_comments base result $256; + length test_result $4 test_description $256 test_comments base result $256; test_description="Basic test"; base=symget('test1'); result='Name Sex Age Height Weight'; diff --git a/tests/viyaonly/mv_createwebservice.test.sas b/tests/viyaonly/mv_createwebservice.test.sas index d23e1a68..62d0ace1 100644 --- a/tests/viyaonly/mv_createwebservice.test.sas +++ b/tests/viyaonly/mv_createwebservice.test.sas @@ -32,7 +32,7 @@ run; ) %put TEST1: checking web service code; data work.test_results; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; if _n_=1 then call missing (of _all_); infile compare end=eof; input; diff --git a/tests/x-platform/mx_createjob.test.sas b/tests/x-platform/mx_createjob.test.sas index 5c958d8a..1dd07331 100644 --- a/tests/x-platform/mx_createjob.test.sas +++ b/tests/x-platform/mx_createjob.test.sas @@ -26,7 +26,10 @@ parmcards4; ;;;; %mp_assertscope(SNAPSHOT) %mx_createjob(path=&mcTestAppLoc/jobs,name=testjob1,replace=YES) -%mp_assertscope(COMPARE) +%mp_assertscope(COMPARE,ignorelist=MC0_JADP1LEN MC0_JADP2LEN MC0_JADPNUM + MC0_JADVLEN MC2_JADP1LEN MC2_JADP2LEN MC2_JADPNUM MC2_JADVLEN MC4_JADP1LEN + MC4_JADP2LEN MC4_JADPNUM MC4_JADVLEN +) %mp_assert( iftrue=(&syscc=0), diff --git a/viya/mv_deletejes.sas b/viya/mv_deletejes.sas index 994ce93e..15a0bb2f 100644 --- a/viya/mv_deletejes.sas +++ b/viya/mv_deletejes.sas @@ -117,7 +117,7 @@ libname &libref1a JSON fileref=&fname1a; %let found=0; /* %put Getting object uri from &libref1a..items; */ data _null_; - length contenttype name $1000; + length contenttype name uri $1000; call missing(of _all_); set &libref1a..items; if contenttype='jobDefinition' and upcase(name)="%upcase(&name)" then do; From 9d342ff0ee702dbc8b81f414db07f0652a16825e Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 26 Jun 2026 11:26:22 +0000 Subject: [PATCH 2/2] chore: updating all.sas --- all.sas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/all.sas b/all.sas index dd0cf2d6..7d80c320 100644 --- a/all.sas +++ b/all.sas @@ -3474,7 +3474,7 @@ run; )/*/STORE SOURCE*/; data ; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_comments="&sysmacroname: Test result of "!!symget('iftrue'); %if %eval(%unquote(&iftrue)) %then %do; @@ -3602,7 +3602,7 @@ run; %end; data; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); if test_description='0' then test_description="Testing &inds for existence of &test of: &cols"; @@ -3781,7 +3781,7 @@ run; ) data; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_result='FAIL'; test_comments="&sysmacroname: &lib..&ds..&col has &result/&orig values " @@ -3896,7 +3896,7 @@ run; %end; data &ds; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_result='FAIL'; test_comments="&sysmacroname: Dataset &inds has &nobs observations."; @@ -4060,7 +4060,7 @@ run; data ; - length test_description $256 test_result $4 test_comments $256; + length test_result $4 test_description $256 test_comments $256; test_description=symget('desc'); test_comments=symget('test_comments'); test_result=symget('test_result'); @@ -10078,6 +10078,7 @@ filename &tempref clear; %global SASJS_PREFIX /* the ONLY hard-coded global macro variable in SASjs */ + &prefix.PROCESSMODE &prefix._STPSRV_HEADER_LOC /* SASjs server specific vars*/ &prefix._FUNCTIONS /* used in mcf_init() to track core function compilation */ &prefix._INIT_NUM /* initialisation time as numeric */ &prefix._INIT_DTTM /* initialisation time in E8601DT26.6 format */ @@ -26427,7 +26428,8 @@ libname &libref1a JSON fileref=&fname1a; %let found=0; /* %put Getting object uri from &libref1a..items; */ data _null_; - length contenttype name $1000; + length contenttype name uri $1000; + call missing(of _all_); set &libref1a..items; if contenttype='jobDefinition' and upcase(name)="%upcase(&name)" then do; call symputx('uri',cats("&base_uri",uri),'l');