Created
May 25, 2021 07:02
-
-
Save rudvfaden/7cafe389bed15819e0ee67198528635d to your computer and use it in GitHub Desktop.
Retunrs sas engine from metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%macro getengine(libref); | |
%global ENGINE; | |
%let dsid=%sysfunc(open(sashelp.vlibnam(where=(libname="%upcase(&libref.)")),i)); | |
%if (&dsid ^= 0) %then %do; | |
%let engnum=%sysfunc(varnum(&dsid,ENGINE)); | |
%let rc=%sysfunc(fetch(&dsid)); | |
%let engine=%sysfunc(getvarc(&dsid,&engnum)); | |
&engine. | |
%let rc= %sysfunc(close(&dsid.)); | |
%end; | |
%mend; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment