@sasjs/core 3.7.1 → 3.7.2

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.
@@ -121,42 +121,16 @@ run;
121
121
  ,mac=mp_filterstore
122
122
  ,msg=%str(syscc=&syscc after hash check)
123
123
  )
124
- %mp_abort(iftrue= ("&filter_hash"=" ")
124
+ %mp_abort(iftrue= ("&filter_hash "=" ")
125
125
  ,mac=mp_filterstore
126
126
  ,msg=%str(problem with filter_hash generation)
127
127
  )
128
128
 
129
129
  %if %mf_nobs(&outresult)=0 %then %do;
130
130
 
131
- /* update detail table first */
132
- %let ds2=%mf_getuniquename(prefix=filterdetail);
133
- data &ds2;
134
- if 0 then set &filter_detail;
135
- set &queryds;
136
- format filter_hash $hex32. filter_line 8.;
137
- filter_hash="&filter_hash";
138
- filter_line=_n_;
139
- PROCESSED_DTTM=%sysfunc(datetime());
140
- run;
141
- %mp_lockanytable(LOCK,
142
- lib=%scan(&filter_detail,1,.)
143
- ,ds=%scan(&filter_detail,2,.)
144
- ,ref=MP_FILTERSTORE update - &filter_hash
145
- ,ctl_ds=&lock_table
146
- )
147
- proc append base=&filter_detail data=&ds2;
148
- run;
149
-
150
- %mp_lockanytable(UNLOCK,
151
- lib=%scan(&filter_detail,1,.)
152
- ,ds=%scan(&filter_detail,2,.)
153
- ,ref=MP_FILTERSTORE update - &filter_hash
154
- ,ctl_ds=&lock_table
155
- )
156
-
157
- /* now update summary table */
131
+ /* first update summary table */
158
132
  %let ds3=%mf_getuniquename(prefix=filtersum);
159
- data &ds3;
133
+ data work.&ds3;
160
134
  if 0 then set &filter_summary;
161
135
  filter_table=symget('libds');
162
136
  filter_hash="&filter_hash";
@@ -168,7 +142,7 @@ run;
168
142
  %mp_lockanytable(LOCK,
169
143
  lib=%scan(&filter_summary,1,.)
170
144
  ,ds=%scan(&filter_summary,2,.)
171
- ,ref=MP_FILTERSTORE update - &filter_hash
145
+ ,ref=MP_FILTERSTORE summary update - &filter_hash
172
146
  ,ctl_ds=&lock_table
173
147
  )
174
148
 
@@ -190,21 +164,64 @@ run;
190
164
  %mp_lockanytable(UNLOCK,
191
165
  lib=%scan(&filter_summary,1,.)
192
166
  ,ds=%scan(&filter_summary,2,.)
193
- ,ref=MP_FILTERSTORE update - &filter_hash
167
+ ,ref=MP_FILTERSTORE summary update - &filter_hash
194
168
  ,ctl_ds=&lock_table
195
169
  )
196
170
 
171
+ %if &syscc ne 0 %then %do;
172
+ data _null_;
173
+ set &ds4;
174
+ putlog (_all_)(=);
175
+ run;
176
+ %goto err;
177
+ %end;
178
+
197
179
  data &outresult;
198
180
  set &filter_summary;
199
181
  where filter_hash="&filter_hash";
200
182
  run;
201
183
 
184
+ /* Next, update detail table */
185
+ %let ds2=%mf_getuniquename(prefix=filterdetail);
186
+ data &ds2;
187
+ if 0 then set &filter_detail;
188
+ set &queryds;
189
+ format filter_hash $hex32. filter_line 8.;
190
+ filter_hash="&filter_hash";
191
+ filter_line=_n_;
192
+ PROCESSED_DTTM=%sysfunc(datetime());
193
+ run;
194
+ %mp_lockanytable(LOCK,
195
+ lib=%scan(&filter_detail,1,.)
196
+ ,ds=%scan(&filter_detail,2,.)
197
+ ,ref=MP_FILTERSTORE update - &filter_hash
198
+ ,ctl_ds=&lock_table
199
+ )
200
+ proc append base=&filter_detail data=&ds2;
201
+ run;
202
+
203
+ %mp_lockanytable(UNLOCK,
204
+ lib=%scan(&filter_detail,1,.)
205
+ ,ds=%scan(&filter_detail,2,.)
206
+ ,ref=MP_FILTERSTORE detail update &filter_hash
207
+ ,ctl_ds=&lock_table
208
+ )
209
+
210
+ %if &syscc ne 0 %then %do;
211
+ data _null_;
212
+ set &ds2;
213
+ putlog (_all_)(=);
214
+ run;
215
+ %goto err;
216
+ %end;
217
+
202
218
  %end;
203
219
 
204
220
  proc sort data=&filter_detail(where=(filter_hash="&filter_hash")) out=&outquery;
205
221
  by filter_line;
206
222
  run;
207
223
 
224
+ %err:
208
225
  %mp_abort(iftrue= (&syscc ne 0)
209
226
  ,mac=mp_filterstore
210
227
  ,msg=%str(syscc=&syscc on macro exit)
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "dependencies": {
39
39
  "ts-loader": "^9.2.6"
40
40
  },
41
- "version": "3.7.1"
41
+ "version": "3.7.2"
42
42
  }