1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 22:14:35 +00:00

fix: making ms_webout work with SAS on Windows Desktop

This commit is contained in:
Allan Bowe
2021-12-17 23:01:43 +00:00
parent 5e8e8e02d3
commit 1e72f13f2d
2 changed files with 17 additions and 14 deletions

View File

@@ -62,13 +62,13 @@
%put output location=&jref;
%if &action=OPEN %then %do;
options nobomfile;
data _null_;file &jref encoding='utf-8';
data _null_;file &jref encoding='utf-8' termstr=lf;
put '{"PROCESSED_DTTM" : "' "%sysfunc(datetime(),E8601DT26.6)" '"';
run;
%end;
%else %if (&action=ARR or &action=OBJ) %then %do;
options validvarname=upcase;
data _null_;file &jref mod encoding='utf-8';
data _null_;file &jref mod encoding='utf-8' termstr=lf;
put ", ""%lowcase(%sysfunc(coalescec(&dslabel,&ds)))"":";
%if &engine=PROCJSON %then %do;
@@ -147,7 +147,7 @@
run;
%let ds=&fmtds;
%end; /* &fmt=Y */
data _null_;file &jref mod encoding='utf-8';
data _null_;file &jref mod encoding='utf-8' termstr=lf;
put "["; call symputx('cols',0,'l');
proc sort
data=sashelp.vcolumn(where=(libname='WORK' & memname="%upcase(&ds)"))
@@ -192,7 +192,7 @@
/* write to temp loc to avoid _webout truncation
- https://support.sas.com/kb/49/325.html */
filename _sjs temp lrecl=131068 encoding='utf-8';
data _null_; file _sjs lrecl=131068 encoding='utf-8' mod;
data _null_; file _sjs lrecl=131068 encoding='utf-8' mod termstr=lf;
set &tempds;
if _n_>1 then put "," @; put
%if &action=ARR %then "[" ; %else "{" ;
@@ -219,14 +219,14 @@
rc = fclose(fileid);
run;
filename _sjs clear;
data _null_; file &jref mod encoding='utf-8';
data _null_; file &jref mod encoding='utf-8' termstr=lf;
put "]";
run;
%end;
%end;
%else %if &action=CLOSE %then %do;
data _null_;file &jref encoding='utf-8' mod;
data _null_;file &jref encoding='utf-8' mod termstr=lf;
put "}";
run;
%end;