|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Used to validate values in a data step. More...
Go to the source code of this file.
Useful when sanitising inputs, to ensure that they arrive with a certain pattern. Usage:
data test; infile datalines4 dsd; input; libds=_infile_; %mp_validatecol(libds,LIBDS,is_libds) datalines4; some.libname !lib.blah %abort definite.ok not.ok! nineletrs._ ;;;; run;
For more examples, see mp_validatecol.test.sas
Tip - when contributing, use https://regex101.com to test the regex validity!
| [in] | incol | The column to be validated |
| [in] | rule | The rule to apply. Current rules:
|
| [out] | outcol | The variable to create, with the results of the match |
Definition in file mp_validatecol.sas.