1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-15 16:14:36 +00:00

fix: adding tests for mf_getuniquelibref and mentioning deprecated param in README. Also regenerating all.sas

This commit is contained in:
Allan Bowe
2022-03-04 08:37:29 +00:00
parent 203ff3f80d
commit ed48c49964
5 changed files with 107 additions and 23 deletions

View File

@@ -16,10 +16,11 @@
A blank value is returned if no usable libname is determined.
@param prefix= 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.
@param maxtries= Deprecated parameter. Remains here to ensure a non-breaking
change.
@param [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.
@param [in] maxtries= Deprecated parameter. Remains here to ensure a
non-breaking change. Will be removed in v5.
@version 9.2
@author Allan Bowe
@@ -29,7 +30,13 @@
%local x;
%if ( %length(&prefix) gt 7 ) %then %do;
%put NOTE: The prefix parameter cannot exceed 7 characters.;
%put %str(ERR)OR: The prefix parameter cannot exceed 7 characters.;
0
%return;
%end;
%else %if (%sysfunc(NVALID(&prefix,v7))=0) %then %do;
%put %str(ERR)OR: Invalid prefix (&prefix);
0
%return;
%end;
@@ -44,6 +51,7 @@
%let x = %eval(&x + 1);
%end;
%put NOTE: Unable to find a usable libref in the range &prefix.0-&maxtries..;
%put NOTE: Change the prefix parameter.;
%put %str(ERR)OR: No usable libref in range &prefix.0-&maxtries;
%put %str(ERR)OR- Try reducing the prefix or deleting some libraries!;
0
%mend mf_getuniquelibref;