@sasjs/core 5.5.2 → 5.6.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.
@@ -15,6 +15,11 @@
15
15
 
16
16
  @param [in] libds= The target dataset to be filtered (lib should be assigned).
17
17
  If filtering a format catalog, add the following suffix: `-FC`.
18
+ @param [in] targetds= (&libds) The dataset against which VARIABLE_NM values
19
+ are validated. Defaults to &libds, which is the correct behaviour for
20
+ physical columns. Supply a view that adds computed columns when the filter
21
+ may reference variables that do not exist in the physical table - the
22
+ filter is still stored against &libds.
18
23
  @param [in] queryds= (WORK.FILTERQUERY) The temporary input query dataset to
19
24
  be validated. Has the following format:
20
25
  |GROUP_LOGIC:$3|SUBGROUP_LOGIC:$3|SUBGROUP_ID:8.|VARIABLE_NM:$32|OPERATOR_NM:$10|RAW_VALUE:$32767|
@@ -74,6 +79,7 @@
74
79
  **/
75
80
 
76
81
  %macro mp_filterstore(libds=,
82
+ targetds=,
77
83
  queryds=work.filterquery,
78
84
  filter_summary=PERM.FILTER_SUMMARY,
79
85
  filter_detail=PERM.FILTER_DETAIL,
@@ -86,7 +92,7 @@
86
92
  %put &sysmacroname entry vars:;
87
93
  %put _local_;
88
94
 
89
- %local ds0 ds1 ds2 ds3 ds4 filter_hash orig_libds;
95
+ %local ds0 ds1 ds2 ds3 ds4 filter_hash orig_libds targetds_used;
90
96
  %let libds=%upcase(&libds);
91
97
  %let orig_libds=&libds;
92
98
 
@@ -123,7 +129,13 @@
123
129
  %mddl_sas_cntlout(libds=&ds0)
124
130
 
125
131
  %end;
126
- %mp_filtercheck(&queryds,targetds=&libds,abort=YES)
132
+
133
+ /* the validation target defaults to the (possibly rewritten) libds, so that
134
+ computed columns can be validated against a view when required */
135
+ %if %length(&targetds)>0 %then %let targetds_used=&targetds;
136
+ %else %let targetds_used=&libds;
137
+
138
+ %mp_filtercheck(&queryds,targetds=&targetds_used,abort=YES)
127
139
 
128
140
  /* hash the result */
129
141
  %let ds1=%mf_getuniquename(prefix=hashds);
package/package.json CHANGED
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "@nogoo9/gitleaks": "8.30.1-post.2"
45
45
  },
46
- "version": "5.5.2"
46
+ "version": "5.6.0"
47
47
  }