The following code will generate a LIBREF named as MC0000nn. But I cannot figure out how to know the generated name. The FILENAME function has similar feature that populates the variable with the generated FILEREF.
6
7 data _null_;
8 length libref $8;
9 libref = ' ';
10 rc = libname(libref,'.');
11 msg = sysmsg();
12 put _all_;
13 run;
libref= rc=-70004 msg=NOTE: Libref refers to the same physical library as SASUSER. _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
SASHELP.VLIBNAM before and after.
Before
After