@sasjs/core 4.51.4 → 4.51.5

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.
@@ -98,7 +98,7 @@ create table &ds1 (drop=libref dsn) as
98
98
  /* extract key values only */
99
99
  %let ds2=%upcase(work.%mf_getuniquename(prefix=mpsd_pks));
100
100
  create table &ds2 as
101
- select key_hash,
101
+ select distinct key_hash,
102
102
  tgtvar_nm,
103
103
  tgtvar_type,
104
104
  coalescec(oldval_char,newval_char) as charval,
@@ -112,9 +112,9 @@ create table &ds2 as
112
112
  %local pk;
113
113
  data _null_;
114
114
  set &ds2;
115
- by key_hash;
115
+ by key_hash processed_dttm;
116
116
  call symputx('pk',catx(' ',symget('pk'),tgtvar_nm),'l');
117
- if last.key_hash then stop;
117
+ if last.processed_dttm then stop;
118
118
  run;
119
119
 
120
120
  %let ds3=%upcase(work.%mf_getuniquename(prefix=mpsd_keychar));
@@ -136,6 +136,7 @@ run;
136
136
  %mp_ds2squeeze(&ds3,outds=&ds3)
137
137
  %mp_ds2squeeze(&ds4,outds=&ds4)
138
138
 
139
+ /* now merge to get all key values and de-dup */
139
140
  %let ds5=%upcase(work.%mf_getuniquename(prefix=mpsd_merged));
140
141
  data &ds5;
141
142
  length key_hash $32 processed_dttm 8;
@@ -143,6 +144,9 @@ data &ds5;
143
144
  by key_hash;
144
145
  if not missing(key_hash);
145
146
  run;
147
+ proc sort data=&ds5 nodupkey;
148
+ by &pk;
149
+ run;
146
150
 
147
151
  /* join to base table for preliminary stage DS */
148
152
  proc sql;
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "^4.4.1"
37
37
  },
38
- "version": "4.51.4"
38
+ "version": "4.51.5"
39
39
  }