@sasjs/core 4.32.13 → 4.33.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.
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Increments a macro variable
|
|
4
|
+
@details Useful outside of do-loops - will increment a macro variable every
|
|
5
|
+
time it is called.
|
|
6
|
+
|
|
7
|
+
Example:
|
|
8
|
+
|
|
9
|
+
%let cnt=1;
|
|
10
|
+
%put We have run %mf_increment(cnt) lines;
|
|
11
|
+
%put Now we have run %mf_increment(cnt) lines;
|
|
12
|
+
%put There are %mf_increment(cnt) lines in total;
|
|
13
|
+
|
|
14
|
+
@param [in] MACRO_NAME the name of the macro variable to increment
|
|
15
|
+
@param [in] ITER= The amount to add or subtract to the macro
|
|
16
|
+
|
|
17
|
+
<h4> Related Files </h4>
|
|
18
|
+
@li mf_increment.test.sas
|
|
19
|
+
|
|
20
|
+
**/
|
|
21
|
+
|
|
22
|
+
%macro mf_increment(macro_name,incr=1);
|
|
23
|
+
|
|
24
|
+
/* iterate the value */
|
|
25
|
+
%let ¯o_name=%eval(&&¯o_name+&incr);
|
|
26
|
+
/* return the value */
|
|
27
|
+
&&¯o_name
|
|
28
|
+
|
|
29
|
+
%mend mf_increment;
|
|
@@ -94,8 +94,11 @@ create table &outds as
|
|
|
94
94
|
/**
|
|
95
95
|
* We cannot apply this clause to the underlying dictionary table. See:
|
|
96
96
|
* https://communities.sas.com/t5/SAS-Programming/Unexpected-Where-Clause-behaviour-in-dictionary-TABLE/m-p/771554#M244867
|
|
97
|
+
* cannot use`where calculated libref="&lib"` either as it will STILL execute
|
|
98
|
+
* all the underlying constraint queries, causing exception errors in some
|
|
99
|
+
* cases: https://github.com/sasjs/core/issues/283
|
|
97
100
|
*/
|
|
98
|
-
where
|
|
101
|
+
where a.TABLE_CATALOG="&lib"
|
|
99
102
|
%if "&ds" ne "" %then %do;
|
|
100
103
|
and upcase(a.TABLE_NAME)="&ds"
|
|
101
104
|
and upcase(b.TABLE_NAME)="&ds"
|
package/base/mp_storediffs.sas
CHANGED
|
@@ -154,7 +154,9 @@ run;
|
|
|
154
154
|
%else %let vlist=%mf_getvarlist(&libds,dlm=%str(,),quote=DOUBLE);
|
|
155
155
|
|
|
156
156
|
data &ds4;
|
|
157
|
-
length &inds_keep $41 tgtvar_nm $32;
|
|
157
|
+
length &inds_keep $41 tgtvar_nm $32 _label_ $256;
|
|
158
|
+
if _n_=1 then call missing(_label_);
|
|
159
|
+
drop _label_;
|
|
158
160
|
set &ds2 &ds3 indsname=&inds_auto;
|
|
159
161
|
|
|
160
162
|
tgtvar_nm=upcase(tgtvar_nm);
|
package/package.json
CHANGED