When I make a format, about 99.9% of the time I expect it to be exhaustive of the values that will be encountered. It would be nice to be able to define a format that would throw an error to the log if a value was not found.
other=_ERROR_ /*pseudo code*/
input sex ;
When the format is used, it would throw an error to the log. So below PROC step and DATA step would both throw errors, ideally listing the invalid value:
proc freq data=have;
tables sex; format sex sex.;
I know there are alternatives, e.g.,
if sexC="_ERROR_" then put "ERROR: invalid value " sex=;
But it would be nice to have a way to say when a format is created, "if any value is outside the domain of values defined in the format, throw an error [or warning or note]."