mirror of
https://github.com/sasjs/core.git
synced 2026-06-08 12:00:21 +00:00
chore: updating all.sas
This commit is contained in:
@@ -24267,6 +24267,43 @@ run;
|
||||
%else 0;
|
||||
|
||||
%mend mfv_existsashdat;
|
||||
/**
|
||||
@file mfv_getcaslib.sas
|
||||
@brief Returns the CAS caslib name for a given SAS libref
|
||||
@details Pure macro function. Reads sashelp.vlibnam and returns
|
||||
the sysvalue where sysname='Caslib' for the given libref. This
|
||||
is useful when the caslib name and libref name may differ.
|
||||
|
||||
Usage:
|
||||
|
||||
%put %mfv_getcaslib(lib=PUBLIC);
|
||||
|
||||
@param [in] lib SAS libref for which to return the CAS caslib name
|
||||
|
||||
@return Returns the CAS caslib name, or empty string if not found
|
||||
|
||||
**/
|
||||
|
||||
%macro mfv_getcaslib(lib);
|
||||
|
||||
%local dsid rc result;
|
||||
|
||||
%let dsid=%sysfunc(open(sashelp.vlibnam(
|
||||
where=(libname="%upcase(&lib)" and sysname="Caslib")
|
||||
)));
|
||||
|
||||
%if &dsid %then %do;
|
||||
%let rc=%sysfunc(fetch(&dsid));
|
||||
%if &rc=0 %then
|
||||
%let result=%sysfunc(
|
||||
getvarc(&dsid,%sysfunc(varnum(&dsid,SYSVALUE)))
|
||||
);
|
||||
%let rc=%sysfunc(close(&dsid));
|
||||
%end;
|
||||
|
||||
&result
|
||||
|
||||
%mend mfv_getcaslib;
|
||||
/**
|
||||
@file
|
||||
@brief Returns the path of a folder from the URI
|
||||
|
||||
Reference in New Issue
Block a user