@sasjs/core 4.27.11 → 4.27.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/mp_abort.sas +17 -6
- package/package.json +1 -1
package/base/mp_abort.sas
CHANGED
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
, mode=REGULAR
|
|
64
64
|
)/*/STORE SOURCE*/;
|
|
65
65
|
|
|
66
|
-
%global sysprocessmode sysprocessname;
|
|
66
|
+
%global sysprocessmode sysprocessname sasjs_stpsrv_header_loc;
|
|
67
|
+
%local fref fid i;
|
|
67
68
|
|
|
68
69
|
%if not(%eval(%unquote(&iftrue))) %then %return;
|
|
69
70
|
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
%end;
|
|
158
159
|
|
|
159
160
|
%if %symexist(SYS_JES_JOB_URI) %then %do;
|
|
160
|
-
/* setup webout */
|
|
161
|
+
/* setup webout for Viya */
|
|
161
162
|
OPTIONS NOBOMFILE;
|
|
162
163
|
%if "X&SYS_JES_JOB_URI.X"="XX" %then %do;
|
|
163
164
|
filename _webout temp lrecl=999999 mod;
|
|
@@ -167,6 +168,18 @@
|
|
|
167
168
|
name="_webout.json" lrecl=999999 mod;
|
|
168
169
|
%end;
|
|
169
170
|
%end;
|
|
171
|
+
%else %if %sysfunc(filename(fref,&sasjs_stpsrv_header_loc))=0 %then %do;
|
|
172
|
+
/* set up http header for SASjs Server */
|
|
173
|
+
%let fid=%sysfunc(fopen(&fref,A));
|
|
174
|
+
%if &fid=0 %then %do;
|
|
175
|
+
%put %str(ERR)OR: %sysfunc(sysmsg());
|
|
176
|
+
%return;
|
|
177
|
+
%end;
|
|
178
|
+
%let rc=%sysfunc(fput(&fid,%str(Content-Type: application/json)));
|
|
179
|
+
%let rc=%sysfunc(fwrite(&fid));
|
|
180
|
+
%let rc=%sysfunc(fclose(&fid));
|
|
181
|
+
%let rc=%sysfunc(filename(&fref));
|
|
182
|
+
%end;
|
|
170
183
|
|
|
171
184
|
/* send response in SASjs JSON format */
|
|
172
185
|
data _null_;
|
|
@@ -187,9 +200,7 @@
|
|
|
187
200
|
msg=cats('"',msg,'"');
|
|
188
201
|
if symexist('_debug') then debug=quote(trim(symget('_debug')));
|
|
189
202
|
else debug='""';
|
|
190
|
-
if
|
|
191
|
-
and symget('sasjsprocessmode')='Stored Program'
|
|
192
|
-
then mode='SASJS';
|
|
203
|
+
if symget('sasjsprocessmode')='Stored Program' then mode='SASJS';
|
|
193
204
|
if mode ne 'SASJS' then put '>>weboutBEGIN<<';
|
|
194
205
|
put '{"SYSDATE" : "' "&SYSDATE" '"';
|
|
195
206
|
put ',"SYSTIME" : "' "&SYSTIME" '"';
|
|
@@ -222,7 +233,7 @@
|
|
|
222
233
|
syswarningtext=quote(trim(symget('syswarningtext')));
|
|
223
234
|
put ",""SYSWARNINGTEXT"" : " syswarningtext;
|
|
224
235
|
put ',"END_DTTM" : "' "%sysfunc(datetime(),E8601DT26.6)" '" ';
|
|
225
|
-
put "}"
|
|
236
|
+
put "}" ;
|
|
226
237
|
if mode ne 'SASJS' then put '>>weboutEND<<';
|
|
227
238
|
run;
|
|
228
239
|
|
package/package.json
CHANGED