@sasjs/core 4.51.6 → 4.52.0

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.
@@ -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(&notpkcols,&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
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "^4.4.1"
37
37
  },
38
- "version": "4.51.6"
38
+ "version": "4.52.0"
39
39
  }