diff --git a/all.sas b/all.sas index 49f955b..f6ca7a2 100644 --- a/all.sas +++ b/all.sas @@ -160,21 +160,23 @@ options noquotelenmax; Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer and the tidy approach for pure macro data set filtering. Check out his [SAS Packages](https://github.com/yabwon/SAS_PACKAGES) - framework! + framework! Where you can find the same [function]( +https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionexists-macro + ). @param [in] name (positional) - function name @author Allan Bowe **/ /** @cond */ - %macro mf_existfunction(name )/*/STORE SOURCE*/; %local dsid rc exist; %let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)")))); - %let exist = %sysfunc(fetch(&dsid, NOSET)); - %let rc = %sysfunc(close(&dsid)); + %let exist=1; + %let exist=%sysfunc(fetch(&dsid, NOSET)); + %let rc=%sysfunc(close(&dsid)); %sysevalf(0 = &exist) diff --git a/base/mf_existfunction.sas b/base/mf_existfunction.sas index f875d48..2c8c6d8 100644 --- a/base/mf_existfunction.sas +++ b/base/mf_existfunction.sas @@ -12,21 +12,23 @@ Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer and the tidy approach for pure macro data set filtering. Check out his [SAS Packages](https://github.com/yabwon/SAS_PACKAGES) - framework! + framework! Where you can find the same [function]( +https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionexists-macro + ). @param [in] name (positional) - function name @author Allan Bowe **/ /** @cond */ - %macro mf_existfunction(name )/*/STORE SOURCE*/; %local dsid rc exist; %let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)")))); - %let exist = %sysfunc(fetch(&dsid, NOSET)); - %let rc = %sysfunc(close(&dsid)); + %let exist=1; + %let exist=%sysfunc(fetch(&dsid, NOSET)); + %let rc=%sysfunc(close(&dsid)); %sysevalf(0 = &exist)