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
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> SAS Macros </h4>
17  @li mf_getplatform.sas
18 
19 
20  @version 8
21  @author Allan Bowe
22 **/
23 /** @cond */
24 
25 %macro mf_existfeature(feature
26 )/*/STORE SOURCE*/;
27  %let feature=%upcase(&feature);
28  %local platform;
29  %let platform=%mf_getplatform();
30 
31  %if &feature= %then %do;
32  %put Supported features: PROCLUA;
33  %end;
34  %else %if &feature=PROCLUA %then %do;
35  %if &platform=SASVIYA %then 1;
36  %else %if "&sysver"="9.3" or "&sysver"="9.4" %then 1;
37  %else 0;
38  %end;
39  %else %do;
40  -1
41  %put &sysmacroname: &feature not found;
42  %end;
43 %mend;
44 
45 /** @endcond */