@sasjs/core 4.51.6 → 4.52.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/base/mp_dirlist.sas +1 -1
- package/base/mp_stripdiffs.sas +7 -4
- package/package.json +1 -1
package/base/mp_dirlist.sas
CHANGED
|
@@ -85,7 +85,7 @@ data;run;
|
|
|
85
85
|
data &out_ds(compress=no
|
|
86
86
|
keep=file_or_folder filepath filename ext msg directory level
|
|
87
87
|
);
|
|
88
|
-
length directory filepath $
|
|
88
|
+
length directory filepath $2000 fref fref2 $8 file_or_folder $6 filename $255
|
|
89
89
|
ext $20 msg $200 foption $16;
|
|
90
90
|
if _n_=1 then call missing(of _all_);
|
|
91
91
|
retain level &level;
|
package/base/mp_stripdiffs.sas
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table.
|
|
23
23
|
@param [in] difftable The dataset containing the diffs. Definition available
|
|
24
24
|
in mddl_dc_difftable.sas
|
|
25
|
+
@param [in] filtervar= (0) If provided, the contents of this macro variable
|
|
26
|
+
will be applied as an additional filter against &libds
|
|
25
27
|
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
|
26
28
|
Has the same format as the base datset, plus a
|
|
27
29
|
`_____DELETE__THIS__RECORD_____` variable.
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
%macro mp_stripdiffs(libds
|
|
50
52
|
,loadref
|
|
51
53
|
,difftable
|
|
54
|
+
,filtervar=0
|
|
52
55
|
,outds=work.mp_stripdiffs
|
|
53
56
|
,mdebug=0
|
|
54
57
|
)/*/STORE SOURCE*/;
|
|
@@ -72,11 +75,11 @@
|
|
|
72
75
|
,msg=%str(Invalid library.dataset reference - %superq(libds))
|
|
73
76
|
)
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
|
|
77
78
|
/* set up unique and temporary vars */
|
|
78
|
-
%local ds1 ds2 ds3 ds4 ds5 fref1;
|
|
79
|
+
%local ds1 ds2 ds3 ds4 ds5 fref1 filterstr;
|
|
79
80
|
%let fref1=%mf_getuniquefileref();
|
|
81
|
+
%if &filtervar ne 0 %then %let filterstr=%superq(&filtervar);
|
|
82
|
+
%else %let filterstr=%str(1=1);
|
|
80
83
|
|
|
81
84
|
/* get timestamp of the diff to be reverted */
|
|
82
85
|
%local ts;
|
|
@@ -161,7 +164,7 @@ create table &outds as select "No " as _____DELETE__THIS__RECORD_____
|
|
|
161
164
|
,b.%scan(¬pkcols,&x,%str( ))
|
|
162
165
|
%end;
|
|
163
166
|
from &ds5 a
|
|
164
|
-
left join &libds b
|
|
167
|
+
left join &libds (where=(&filterstr)) b
|
|
165
168
|
on 1=1
|
|
166
169
|
%do x=1 %to %sysfunc(countw(&pk,%str( )));
|
|
167
170
|
and a.%scan(&pk,&x,%str( ))=b.%scan(&pk,&x,%str( ))
|
package/package.json
CHANGED