|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Checks a generated filter query for validity. More...
Go to the source code of this file.
Runs a generated filter in proc sql with the validate option. Used in mp_filtercheck.sas in an fcmp container.
Built to support dynamic filtering in Data Controller for SAS®.
Usage:
data work.filtertable;
infile datalines4 dsd;
input GROUP_LOGIC:$3. SUBGROUP_LOGIC:$3. SUBGROUP_ID:8. VARIABLE_NM:$32.
OPERATOR_NM:$10. RAW_VALUE:$4000.;
datalines4;
AND,AND,1,AGE,=,12
AND,AND,1,SEX,<=,"'M'"
AND,OR,2,Name,NOT IN,"('Jane','Alfred')"
AND,OR,2,Weight,>=,7
;;;;
run;
%mp_filtergenerate(work.filtertable,outref=myfilter)
%mp_filtervalidate(myfilter,sashelp.class)
| [in] | inref | The input fileref to validate (generated by mp_filtergenerate.sas) |
| [in] | targetds | The target dataset against which to verify the query |
| [out] | abort= | (YES) If YES will call mp_abort.sas on any exceptions |
| [out] | outds= | (work.mp_filtervalidate) Output dataset containing the err / warning message, if one exists. If this table contains any rows, there are problems! |
Definition in file mp_filtervalidate.sas.