mirror of
https://github.com/sasjs/core.git
synced 2026-01-03 15:40:05 +00:00
feat: new validation (ISINT) in the mp_validatecol.sas macro - https://core.sasjs.io/mp__validatecol_8sas_source.html
This commit is contained in:
@@ -92,4 +92,38 @@ run;
|
||||
desc=Test3 - ISFORMAT,
|
||||
test=EQUALS 5,
|
||||
outds=work.test_results
|
||||
)
|
||||
|
||||
/**
|
||||
* Test 4 - ISINT
|
||||
*/
|
||||
data test4;
|
||||
infile datalines4 dsd;
|
||||
input;
|
||||
infile=_infile_;
|
||||
%mp_validatecol(infile,ISINT,is_integer)
|
||||
if is_integer=1;
|
||||
datalines4;
|
||||
1
|
||||
1234
|
||||
-134
|
||||
-1.0
|
||||
1.0
|
||||
0
|
||||
above are good
|
||||
the rest are bad
|
||||
%abort
|
||||
1&somethingverybad.
|
||||
&
|
||||
+-1
|
||||
.
|
||||
a.A
|
||||
$format12.1b
|
||||
$format12.1b1
|
||||
;;;;
|
||||
run;
|
||||
%mp_assertdsobs(work.test4,
|
||||
desc=Test4 - ISFORMAT,
|
||||
test=EQUALS 6,
|
||||
outds=work.test_results
|
||||
)
|
||||
Reference in New Issue
Block a user