mirror of
https://github.com/sasjs/core.git
synced 2026-01-08 18:00:06 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67079d8c17 |
10
all.sas
10
all.sas
@@ -160,21 +160,23 @@ options noquotelenmax;
|
|||||||
Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer
|
Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer
|
||||||
and the tidy approach for pure macro data set filtering.
|
and the tidy approach for pure macro data set filtering.
|
||||||
Check out his [SAS Packages](https://github.com/yabwon/SAS_PACKAGES)
|
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
|
@param [in] name (positional) - function name
|
||||||
|
|
||||||
@author Allan Bowe
|
@author Allan Bowe
|
||||||
**/
|
**/
|
||||||
/** @cond */
|
/** @cond */
|
||||||
|
|
||||||
%macro mf_existfunction(name
|
%macro mf_existfunction(name
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
|
|
||||||
%local dsid rc exist;
|
%local dsid rc exist;
|
||||||
%let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)"))));
|
%let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)"))));
|
||||||
%let exist = %sysfunc(fetch(&dsid, NOSET));
|
%let exist=1;
|
||||||
%let rc = %sysfunc(close(&dsid));
|
%let exist=%sysfunc(fetch(&dsid, NOSET));
|
||||||
|
%let rc=%sysfunc(close(&dsid));
|
||||||
|
|
||||||
%sysevalf(0 = &exist)
|
%sysevalf(0 = &exist)
|
||||||
|
|
||||||
|
|||||||
@@ -12,21 +12,23 @@
|
|||||||
Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer
|
Full credit to [Bart](https://sasensei.com/user/305) for the vfunc pointer
|
||||||
and the tidy approach for pure macro data set filtering.
|
and the tidy approach for pure macro data set filtering.
|
||||||
Check out his [SAS Packages](https://github.com/yabwon/SAS_PACKAGES)
|
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
|
@param [in] name (positional) - function name
|
||||||
|
|
||||||
@author Allan Bowe
|
@author Allan Bowe
|
||||||
**/
|
**/
|
||||||
/** @cond */
|
/** @cond */
|
||||||
|
|
||||||
%macro mf_existfunction(name
|
%macro mf_existfunction(name
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
|
|
||||||
%local dsid rc exist;
|
%local dsid rc exist;
|
||||||
%let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)"))));
|
%let dsid=%sysfunc(open(sashelp.vfunc(where=(fncname="%upcase(&name)"))));
|
||||||
%let exist = %sysfunc(fetch(&dsid, NOSET));
|
%let exist=1;
|
||||||
%let rc = %sysfunc(close(&dsid));
|
%let exist=%sysfunc(fetch(&dsid, NOSET));
|
||||||
|
%let rc=%sysfunc(close(&dsid));
|
||||||
|
|
||||||
%sysevalf(0 = &exist)
|
%sysevalf(0 = &exist)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user