From d6056b9397e608225b8160c076172cecb767a9e4 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Sat, 10 Apr 2021 12:41:17 +0200 Subject: [PATCH] fix: adding mod statement to _webout to enable sas-side sasjs testing --- all.sas | 16 ++++++++-------- meta/mm_createwebservice.sas | 8 ++++---- meta/mm_webout.sas | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/all.sas b/all.sas index 189eea4..63c563a 100644 --- a/all.sas +++ b/all.sas @@ -7595,14 +7595,14 @@ data _null_; put ' i+1; '; put ' call symputx(''wt''!!left(i),name,''l''); '; put ' call symputx(''wtcnt'',i,''l''); '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put ",""WORK"":{"; '; put ' %do i=1 %to &wtcnt; '; put ' %let wt=&&wt&i; '; put ' proc contents noprint data=&wt '; put ' out=_data_ (keep=name type length format:); '; put ' run;%let tempds=%scan(&syslast,2,.); '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' dsid=open("WORK.&wt",''is''); '; put ' nlobs=attrn(dsid,''NLOBS''); '; put ' nvars=attrn(dsid,''NVARS''); '; @@ -7613,10 +7613,10 @@ data _null_; put ' put '',"nvars":'' nvars; '; put ' %mp_jsonout(OBJ,&tempds,jref=&fref,dslabel=colattrs,engine=DATASTEP) '; put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,engine=DATASTEP) '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put "}"; '; put ' %end; '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put "}"; '; put ' run; '; put ' %end; '; @@ -11064,14 +11064,14 @@ run; i+1; call symputx('wt'!!left(i),name,'l'); call symputx('wtcnt',i,'l'); - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put ",""WORK"":{"; %do i=1 %to &wtcnt; %let wt=&&wt&i; proc contents noprint data=&wt out=_data_ (keep=name type length format:); run;%let tempds=%scan(&syslast,2,.); - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; dsid=open("WORK.&wt",'is'); nlobs=attrn(dsid,'NLOBS'); nvars=attrn(dsid,'NVARS'); @@ -11082,10 +11082,10 @@ run; put ',"nvars":' nvars; %mp_jsonout(OBJ,&tempds,jref=&fref,dslabel=colattrs,engine=DATASTEP) %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,engine=DATASTEP) - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put "}"; %end; - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put "}"; run; %end; diff --git a/meta/mm_createwebservice.sas b/meta/mm_createwebservice.sas index 0642e2a..858ae4b 100644 --- a/meta/mm_createwebservice.sas +++ b/meta/mm_createwebservice.sas @@ -277,14 +277,14 @@ data _null_; put ' i+1; '; put ' call symputx(''wt''!!left(i),name,''l''); '; put ' call symputx(''wtcnt'',i,''l''); '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put ",""WORK"":{"; '; put ' %do i=1 %to &wtcnt; '; put ' %let wt=&&wt&i; '; put ' proc contents noprint data=&wt '; put ' out=_data_ (keep=name type length format:); '; put ' run;%let tempds=%scan(&syslast,2,.); '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' dsid=open("WORK.&wt",''is''); '; put ' nlobs=attrn(dsid,''NLOBS''); '; put ' nvars=attrn(dsid,''NVARS''); '; @@ -295,10 +295,10 @@ data _null_; put ' put '',"nvars":'' nvars; '; put ' %mp_jsonout(OBJ,&tempds,jref=&fref,dslabel=colattrs,engine=DATASTEP) '; put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,engine=DATASTEP) '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put "}"; '; put ' %end; '; - put ' data _null_; file &fref encoding=''utf-8''; '; + put ' data _null_; file &fref mod encoding=''utf-8''; '; put ' put "}"; '; put ' run; '; put ' %end; '; diff --git a/meta/mm_webout.sas b/meta/mm_webout.sas index 6c9fe26..8c71e09 100644 --- a/meta/mm_webout.sas +++ b/meta/mm_webout.sas @@ -108,14 +108,14 @@ i+1; call symputx('wt'!!left(i),name,'l'); call symputx('wtcnt',i,'l'); - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put ",""WORK"":{"; %do i=1 %to &wtcnt; %let wt=&&wt&i; proc contents noprint data=&wt out=_data_ (keep=name type length format:); run;%let tempds=%scan(&syslast,2,.); - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; dsid=open("WORK.&wt",'is'); nlobs=attrn(dsid,'NLOBS'); nvars=attrn(dsid,'NVARS'); @@ -126,10 +126,10 @@ put ',"nvars":' nvars; %mp_jsonout(OBJ,&tempds,jref=&fref,dslabel=colattrs,engine=DATASTEP) %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,engine=DATASTEP) - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put "}"; %end; - data _null_; file &fref encoding='utf-8'; + data _null_; file &fref mod encoding='utf-8'; put "}"; run; %end;