CORE
mf_getengine.sas
Go to the documentation of this file.
1 
26 %macro mf_getEngine(libref);
27  %local dsid engnum rc engine;
28 
29  /* in case the parameter is a libref.tablename, pull off just the libref */
30  %let libref = %upcase(%scan(&libref, 1, %str(.)));
31 
32  %let dsid=%sysfunc(open(sashelp.vlibnam(where=(libname="%upcase(&libref)")),i));
33  %if (&dsid ^= 0) %then %do;
34  %let engnum=%sysfunc(varnum(&dsid,ENGINE));
35  %let rc=%sysfunc(fetch(&dsid));
36  %let engine=%sysfunc(getvarc(&dsid,&engnum));
37  %put &libref. ENGINE is &engine.;
38  %let rc= %sysfunc(close(&dsid));
39  %end;
40 
41  &engine
42 
43 %mend;