@sasjs/core 4.27.10 → 4.27.13
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/mf_existvarlist.sas +0 -3
- package/base/mp_abort.sas +22 -7
- package/package.json +1 -1
package/base/mf_existvarlist.sas
CHANGED
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,8 +158,8 @@
|
|
|
157
158
|
%end;
|
|
158
159
|
|
|
159
160
|
%if %symexist(SYS_JES_JOB_URI) %then %do;
|
|
160
|
-
/* setup webout */
|
|
161
|
-
|
|
161
|
+
/* setup webout for Viya */
|
|
162
|
+
options nobomfile;
|
|
162
163
|
%if "X&SYS_JES_JOB_URI.X"="XX" %then %do;
|
|
163
164
|
filename _webout temp lrecl=999999 mod;
|
|
164
165
|
%end;
|
|
@@ -167,11 +168,24 @@
|
|
|
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
|
+
options nobomfile;
|
|
173
|
+
/* set up http header for SASjs Server */
|
|
174
|
+
%let fid=%sysfunc(fopen(&fref,A));
|
|
175
|
+
%if &fid=0 %then %do;
|
|
176
|
+
%put %str(ERR)OR: %sysfunc(sysmsg());
|
|
177
|
+
%return;
|
|
178
|
+
%end;
|
|
179
|
+
%let rc=%sysfunc(fput(&fid,%str(Content-Type: application/json)));
|
|
180
|
+
%let rc=%sysfunc(fwrite(&fid));
|
|
181
|
+
%let rc=%sysfunc(fclose(&fid));
|
|
182
|
+
%let rc=%sysfunc(filename(&fref));
|
|
183
|
+
%end;
|
|
170
184
|
|
|
171
185
|
/* send response in SASjs JSON format */
|
|
172
186
|
data _null_;
|
|
173
187
|
file _webout mod lrecl=32000 encoding='utf-8';
|
|
174
|
-
length msg syswarningtext syserrortext $32767 ;
|
|
188
|
+
length msg syswarningtext syserrortext $32767 mode $10 ;
|
|
175
189
|
sasdatetime=datetime();
|
|
176
190
|
msg=symget('msg');
|
|
177
191
|
%if &logline>0 %then %do;
|
|
@@ -187,7 +201,8 @@
|
|
|
187
201
|
msg=cats('"',msg,'"');
|
|
188
202
|
if symexist('_debug') then debug=quote(trim(symget('_debug')));
|
|
189
203
|
else debug='""';
|
|
190
|
-
|
|
204
|
+
if symget('sasjsprocessmode')='Stored Program' then mode='SASJS';
|
|
205
|
+
if mode ne 'SASJS' then put '>>weboutBEGIN<<';
|
|
191
206
|
put '{"SYSDATE" : "' "&SYSDATE" '"';
|
|
192
207
|
put ',"SYSTIME" : "' "&SYSTIME" '"';
|
|
193
208
|
put ',"sasjsAbort" : [{';
|
|
@@ -219,8 +234,8 @@
|
|
|
219
234
|
syswarningtext=quote(trim(symget('syswarningtext')));
|
|
220
235
|
put ",""SYSWARNINGTEXT"" : " syswarningtext;
|
|
221
236
|
put ',"END_DTTM" : "' "%sysfunc(datetime(),E8601DT26.6)" '" ';
|
|
222
|
-
put "}"
|
|
223
|
-
put '>>weboutEND<<';
|
|
237
|
+
put "}" ;
|
|
238
|
+
if mode ne 'SASJS' then put '>>weboutEND<<';
|
|
224
239
|
run;
|
|
225
240
|
|
|
226
241
|
%put _all_;
|
package/package.json
CHANGED