Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getuniquelibref.sas File Reference

Returns an unused libref. More...

Go to the source code of this file.

Detailed Description

Use as follows:

libname mclib0 (work);
libname mclib1 (work);
libname mclib2 (work);

%let libref=%mf_getuniquelibref();
%put &=libref;

which returns:

‍mclib3

A blank value is returned if no usable libname is determined.

Parameters
[in]prefix=(mclib) first part of the returned libref. As librefs can be as long as 8 characters, a maximum length of 7 characters is premitted for this prefix.
[in]maxtries=(1000) Deprecated parameter. Remains here to ensure a non-breaking change. Will be removed in v5.
Version
9.2
Author
Allan Bowe

Definition in file mf_getuniquelibref.sas.