1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00
Files
core/base/mf_getuniquename.sas

22 lines
472 B
SAS

/**
@file mf_getuniquename.sas
@brief Returns a shortened (32 char) GUID as a valid SAS name
@details Use as follows:
%let myds=%mf_getuniquename();
%put &=myds;
which returns:
> MCc59c750610321d4c8bf75faadbcd22
@param prefix= (MC) Sets a prefix for the new name
@version 9.3
@author Allan Bowe
**/
%macro mf_getuniquename(prefix=MC);
&prefix.%substr(%sysfunc(compress(%sysfunc(uuidgen()),-)),1,32-%length(&prefix))
%mend mf_getuniquename;