1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-05 00:20:05 +00:00

fix: no json wrapper in SASjs mode in mp_abort.sas

This commit is contained in:
Allan Bowe
2022-06-07 11:28:59 +00:00
parent 16ed91f6a9
commit abfe7fe339
2 changed files with 12 additions and 6 deletions

View File

@@ -171,7 +171,7 @@
/* send response in SASjs JSON format */
data _null_;
file _webout mod lrecl=32000 encoding='utf-8';
length msg syswarningtext syserrortext $32767 ;
length msg syswarningtext syserrortext $32767 mode $10 ;
sasdatetime=datetime();
msg=symget('msg');
%if &logline>0 %then %do;
@@ -187,7 +187,10 @@
msg=cats('"',msg,'"');
if symexist('_debug') then debug=quote(trim(symget('_debug')));
else debug='""';
put '>>weboutBEGIN<<';
if symexist('sasjsprocessmode')
and symget('sasjsprocessmode')='Stored Program'
then mode='SASJS';
if mode ne 'SASJS' then put '>>weboutBEGIN<<';
put '{"SYSDATE" : "' "&SYSDATE" '"';
put ',"SYSTIME" : "' "&SYSTIME" '"';
put ',"sasjsAbort" : [{';
@@ -220,7 +223,7 @@
put ",""SYSWARNINGTEXT"" : " syswarningtext;
put ',"END_DTTM" : "' "%sysfunc(datetime(),E8601DT26.6)" '" ';
put "}" @;
put '>>weboutEND<<';
if mode ne 'SASJS' then put '>>weboutEND<<';
run;
%put _all_;