@sasjs/core 4.67.0 → 4.67.1
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/package.json +1 -1
- package/viya/mv_jobflow.sas +34 -19
package/package.json
CHANGED
package/viya/mv_jobflow.sas
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
@li mf_nobs.sas
|
|
122
122
|
@li mp_abort.sas
|
|
123
123
|
@li mf_getplatform.sas
|
|
124
|
-
@li
|
|
124
|
+
@li mf_getvarlist.sas
|
|
125
125
|
@li mf_existvarlist.sas
|
|
126
126
|
@li mv_jobwaitfor.sas
|
|
127
127
|
@li mv_jobexecute.sas
|
|
@@ -234,14 +234,12 @@ data _null_;
|
|
|
234
234
|
if last then call symputx('flowcnt',cnt,'l');
|
|
235
235
|
run;
|
|
236
236
|
|
|
237
|
-
/* prepare temporary datasets
|
|
238
|
-
%local fid jid jds
|
|
237
|
+
/* prepare temporary datasets */
|
|
238
|
+
%local fid jid jds jdsapp jdsrunning jdswaitfor;
|
|
239
239
|
data;run;%let jds=&syslast;
|
|
240
|
-
data;run;%let jjson=&syslast;
|
|
241
240
|
data;run;%let jdsapp=&syslast;
|
|
242
241
|
data;run;%let jdsrunning=&syslast;
|
|
243
242
|
data;run;%let jdswaitfor=&syslast;
|
|
244
|
-
%let jfref=%mf_getuniquefileref();
|
|
245
243
|
|
|
246
244
|
/* start loop */
|
|
247
245
|
%do fid=1 %to &flowcnt;
|
|
@@ -259,23 +257,39 @@ data;run;%let jdswaitfor=&syslast;
|
|
|
259
257
|
&dbg. if _n_= 1 then putlog "Loop &fid";
|
|
260
258
|
&dbg. putlog (_all_)(=);
|
|
261
259
|
run;
|
|
260
|
+
/* build list of char and num vars in json format */
|
|
261
|
+
/* Viya 2026 expects all values to be strings */
|
|
262
|
+
%local nvars cvars ii _vnm;
|
|
263
|
+
%let cvars=%mf_getvarlist(&jds,typefilter=C);
|
|
264
|
+
%let nvars=%mf_getvarlist(&jds,typefilter=N);
|
|
262
265
|
%put exporting job variables in json format;
|
|
263
266
|
%do jid=1 %to &jcnt;
|
|
264
|
-
data &jjson;
|
|
265
|
-
set &jds;
|
|
266
|
-
if _n_=&jid then do;
|
|
267
|
-
output;
|
|
268
|
-
stop;
|
|
269
|
-
end;
|
|
270
|
-
run;
|
|
271
|
-
proc json out=&jfref;
|
|
272
|
-
export &jjson / nosastags fmtnumeric;
|
|
273
|
-
run;
|
|
274
267
|
data _null_;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
268
|
+
set &jds;
|
|
269
|
+
if _n_=&jid;
|
|
270
|
+
length _param $32767;
|
|
271
|
+
_param='';
|
|
272
|
+
%if %length(&cvars)>0 %then %do ii=1 %to %sysfunc(countw(&cvars,%str( )));
|
|
273
|
+
%let _vnm=%scan(&cvars,&ii,%str( ));
|
|
274
|
+
if _param ne '' then _param=cats(_param,',');
|
|
275
|
+
_param=cats(_param,'"'
|
|
276
|
+
,"%lowcase(&_vnm)"
|
|
277
|
+
,'":'
|
|
278
|
+
,quote(trim(&_vnm))
|
|
279
|
+
);
|
|
280
|
+
%end;
|
|
281
|
+
%if %length(&nvars)>0 %then %do ii=1 %to %sysfunc(countw(&nvars,%str( )));
|
|
282
|
+
%let _vnm=%scan(&nvars,&ii,%str( ));
|
|
283
|
+
if _param ne '' then _param=cats(_param,',');
|
|
284
|
+
_param=cats(_param,'"'
|
|
285
|
+
,"%lowcase(&_vnm)"
|
|
286
|
+
,'":"'
|
|
287
|
+
,strip(put(&_vnm,best32.))
|
|
288
|
+
,'"'
|
|
289
|
+
);
|
|
290
|
+
%end;
|
|
291
|
+
call symputx(cats('jparams',&jid),_param,'l');
|
|
292
|
+
stop;
|
|
279
293
|
run;
|
|
280
294
|
%local jobuid&jid;
|
|
281
295
|
%let jobuid&jid=0; /* used in next loop */
|
|
@@ -320,6 +334,7 @@ data;run;%let jdswaitfor=&syslast;
|
|
|
320
334
|
,paramstring=%superq(jparams&jid)
|
|
321
335
|
,outds=&jdsapp
|
|
322
336
|
,contextname=&&context&jid
|
|
337
|
+
,mdebug=&mdebug
|
|
323
338
|
)
|
|
324
339
|
data &jdsapp;
|
|
325
340
|
format jobparams $32767.;
|