From 3038be83a0c2e3bbbb818698fa48587b438a8fb6 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sat, 11 Sep 2021 19:24:51 +0300 Subject: [PATCH 1/2] fix: adding default lengths to vars in mv_getfoldermembers to cover use case where no members found (and downstream process expects an empty table with those vars. Also fixing mp_webin to cover a case where native temp filerefs (starting with a #hash) are not supported. --- base/mp_webin.sas | 2 +- viya/mv_getfoldermembers.sas | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/base/mp_webin.sas b/base/mp_webin.sas index 1c6675f..eaaaa4e 100644 --- a/base/mp_webin.sas +++ b/base/mp_webin.sas @@ -50,7 +50,7 @@ /* If Viya, create temporary fileref(s) */ %local i; %if %mf_getplatform()=SASVIYA %then %do i=1 %to &_webin_file_count; - %let _webin_fileref&i=%mf_getuniquefileref(prefix=0); + %let _webin_fileref&i=%mf_getuniquefileref(); filename &&_webin_fileref&i filesrvc "&&_webin_fileuri&i"; %end; diff --git a/viya/mv_getfoldermembers.sas b/viya/mv_getfoldermembers.sas index 99b0663..df27ae1 100644 --- a/viya/mv_getfoldermembers.sas +++ b/viya/mv_getfoldermembers.sas @@ -122,6 +122,7 @@ options noquotelenmax; run; libname &libref2 JSON fileref=&fname2; data &outds; + length id $36 name $128 uri $64 type $32 description $256; set &libref2..items; run; filename &fname2 clear; From 25e61fd8ef07587ea9f627f985792af98e6a9058 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sat, 11 Sep 2021 19:25:28 +0300 Subject: [PATCH 2/2] chore: updating all.sas --- all.sas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/all.sas b/all.sas index a74fcf3..c8dcc6b 100644 --- a/all.sas +++ b/all.sas @@ -7595,7 +7595,7 @@ alter table &libds modify &var char(&len); /* If Viya, create temporary fileref(s) */ %local i; %if %mf_getplatform()=SASVIYA %then %do i=1 %to &_webin_file_count; - %let _webin_fileref&i=%mf_getuniquefileref(prefix=0); + %let _webin_fileref&i=%mf_getuniquefileref(); filename &&_webin_fileref&i filesrvc "&&_webin_fileuri&i"; %end; @@ -15794,6 +15794,7 @@ options noquotelenmax; run; libname &libref2 JSON fileref=&fname2; data &outds; + length id $36 name $128 uri $64 type $32 description $256; set &libref2..items; run; filename &fname2 clear;