Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mf_existfeature.sas
Go to the documentation of this file.
1 /**
2  @file mf_existfeature.sas
3  @brief Checks whether a feature exists
4  @details Check to see if a feature is supported in your environment.
5  Run without arguments to see a list of detectable features.
6  Note - this list is based on known versions of SAS rather than
7  actual feature detection, as that is tricky / impossible to do
8  without generating errors in most cases.
9 
10  %put %mf_existfeature(PROCLUA);
11 
12  @param feature the feature to detect. Leave blank to list all in log.
13 
14  @return output returns 1 or 0 (or -1 if not found)
15 
16  <h4> Dependencies </h4>
17  @li mf_getplatform.sas
18 
19 
20  @version 8
21  @author Allan Bowe
22 **/
23 
24 %macro mf_existfeature(feature
25 )/*/STORE SOURCE*/;
26  %let feature=%upcase(&feature);
27  %local platform;
28  %let platform=%mf_getplatform();
29 
30  %if &feature= %then %do;
31  %put Supported features: PROCLUA;
32  %end;
33  %else %if &feature=PROCLUA %then %do;
34  %if &platform=SASVIYA %then 1;
35  %else %if "&sysver"="9.3" or "&sysver"="9.4" %then 1;
36  %else 0;
37  %end;
38  %else %do;
39  -1
40  %put &sysmacroname: &feature not found;
41  %end;
42 %mend;