Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_existvarlist.sas File Reference

Checks if a set of variables ALL exist in a data set. More...

Go to the source code of this file.

Detailed Description

Returns 0 if ANY of the variables do not exist, if the dataset cannot be opened, if it holds no variables, or if libds / varlist is blank. Returns 1 if they ALL exist. The macro never aborts: a blank input answers 0 and the calling program decides whether that is a condition to stop on (mp_abort) or simply a negative result. Usage:

%put %mf_existVarList(sashelp.class, age sex name dummyvar);
Parameters
[in]libds2 part dataset or view reference
[in]varlistspace separated variable names
Version
9.2
Author
Allan Bowe

Definition in file mf_existvarlist.sas.