13 dt=
'01jan2020'd; output;
14 dt=
'01jan2020'd; output;
15 dt=
'02feb2021'd; output;
16 dt=
'03mar2022'd; output;
20%mp_distinctfmtvalues(libds=work.fmtvals,var=dt,outds=work.dfv_out)
23 length formatted_value $2000;
27%mp_assertmodel(work.dfv_out,
30 desc=Checking formatted value model and key,
31 outds=work.test_results
35 select count(*) into: n_vals from work.dfv_out;
36 select count(*) into: n_hit from work.dfv_out
37 where formatted_value='01JAN2020';
38 select count(*) into: n_expected from work.dfv_out
39 where formatted_value in ('01JAN2020
','02FEB2021
','03MAR2022');
44 desc=Checking that duplicate formatted values collapse to one row,
45 outds=work.test_results
50 desc=Checking that the value carries the variable format,
51 outds=work.test_results
55 iftrue=(&n_expected=3),
56 desc=Checking all three formatted dates are present,
57 outds=work.test_results