1
0
mirror of https://github.com/sasjs/core.git synced 2026-04-21 07:21:31 +00:00

feat: new mp_applyformats macro (and test), plus new addition to mp_validatecol (is_format)

This commit is contained in:
munja
2021-12-23 13:50:58 +00:00
parent a13c782074
commit 9f815c73e9
6 changed files with 281 additions and 3 deletions
@@ -59,4 +59,37 @@ run;
desc=Test2 - ISNUM,
test=EQUALS 4,
outds=work.test_results
)
/**
* Test 3 - FORMAT
*/
data test3;
infile datalines4 dsd;
input;
infile=_infile_;
%mp_validatecol(infile,FORMAT,is_format)
if is_format=1;
datalines4;
$.
$format.
$format12.2
somenum.
somenum12.4
above are good
the rest are bad
%abort
1&somethingverybad.
&
+-1
.
a.A
$format12.1b
$format12.1b1
;;;;
run;
%mp_assertdsobs(work.test3,
desc=Test3 - ISFORMAT,
test=EQUALS 5,
outds=work.test_results
)