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:
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user