fix(derived): repair the validation rows for MPE_DERIVED
Build / Build-and-ng-test (pull_request) Successful in 6m20s
Lighthouse Checks / lighthouse (pull_request) Successful in 22m5s
Build / Build-and-test-development (pull_request) Successful in 32m21s

Four stray insert lines and a missing one left the MPE_VALIDATIONS block for
MPE_DERIVED malformed, so makedata aborted and the control table was never
created - found by building the library on a real estate.

The format assertions in the test now read the emitted statement, because proc
contents on a view does not report a format in full ('DATE' for DATE9.).
This commit is contained in:
dc committed 2026-10-21 12:06:35 +00:00
1 parent 616a2928e7
commit 9a047ad42e
2 files changed
+8 -10

No files matched your search

+8 -7
View File
@@ -138,13 +138,14 @@ run;
outds=work.test_results
)
/* the label is the variable name plus the expression, and the format from the length */
/* proc contents on a view reports a format name without its width, so the
format is compared on the name only */
proc contents noprint data=work.vw_derived
out=work.vw_cols(keep=name label format);
run;
data work.chk1d;
set work.vw_cols;
where name='BAND' and label='Age band' and format='$8.';
where name='BAND' and label='Age band' and format=:'$';
run;
%mp_assertdsobs(work.chk1d,
desc=Test1 - the label and default format are applied,
@@ -178,12 +179,12 @@ quit;
outvars=work.derived_vars2
)
proc contents noprint data=work.vw_derived2
out=work.vw_cols2(keep=name label format);
run;
/* asserted on the emitted statement - proc contents on a view does not
report the format in full */
data work.chk2;
set work.vw_cols2;
where name='FLAG_DT' and format='DATE9.';
infile derref2 truncover;
input line $4000.;
if index(line,'format=DATE9.')>0 then output;
run;
%mp_assertdsobs(work.chk2,
desc=Test2 - the configured format is applied,
-3
View File
@@ -2015,9 +2015,6 @@ insert into &lib..MPE_VALIDATIONS set
tx_from=0,base_lib="&lib",base_ds="MPE_DERIVED",base_col="VAR_DEPS"
,rule_type='HARDREGEX',rule_value='^[A-Za-z0-9_ ]*$',rule_active=1
,tx_to='31DEC5999:23:59:59'dt;
insert into &lib..MPE_VALIDATIONS set
insert into &lib..MPE_VALIDATIONS set
insert into &lib..MPE_VALIDATIONS set
insert into &lib..MPE_VALIDATIONS set
tx_from=0,base_lib="&lib",base_ds="MPE_DERIVED",base_col="VAR_TYPE"
,rule_type='NOTNULL',rule_value=' ',rule_active=1