@sasjs/core 3.4.0 → 3.5.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.
@@ -20,10 +20,13 @@
20
20
  ;;;;
21
21
  run;
22
22
 
23
+ For more examples, see mp_validatecol.test.sas
24
+
23
25
  Tip - when contributing, use https://regex101.com to test the regex validity!
24
26
 
25
27
  @param [in] incol The column to be validated
26
28
  @param [in] rule The rule to apply. Current rules:
29
+ @li ISINT - checks if the variable is an integer
27
30
  @li ISNUM - checks if the variable is numeric
28
31
  @li LIBDS - matches LIBREF.DATASET format
29
32
  @li FORMAT - checks if the provided format is syntactically valid
@@ -32,6 +35,9 @@
32
35
  <h4> SAS Macros </h4>
33
36
  @li mf_getuniquename.sas
34
37
 
38
+ <h4> Related Macros </h4>
39
+ @li mp_validatecol.test.sas
40
+
35
41
  @version 9.3
36
42
  **/
37
43
 
@@ -41,7 +47,13 @@
41
47
  %local tempcol;
42
48
  %let tempcol=%mf_getuniquename();
43
49
 
44
- %if &rule=ISNUM %then %do;
50
+ %if &rule=ISINT %then %do;
51
+ &tempcol=input(&incol,?? best32.);
52
+ &outcol=0;
53
+ if not missing(&tempcol) then if mod(&incol,1)=0 then &outcol=1;
54
+ drop &tempcol;
55
+ %end;
56
+ %else %if &rule=ISNUM %then %do;
45
57
  /*
46
58
  credit SØREN LASSEN
47
59
  https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "dependencies": {
39
39
  "ts-loader": "^9.2.6"
40
40
  },
41
- "version": "3.4.0"
41
+ "version": "3.5.0"
42
42
  }