Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mf_getuniquefileref.sas File Reference

Assigns and returns an unused fileref. More...

Go to the source code of this file.

Detailed Description

Use as follows:

let fileref1=mf_getuniquefileref(); let fileref2=mf_getuniquefileref(); put &fileref1

which returns:

mcref0 mcref1

@prefix= first part of fileref. Remember that filerefs can only be 8 characters, so a 7 letter prefix would mean that maxtries should be 10.

Parameters
maxtries=the last part of the libref. Provide an integer value.
Version
9.2
Author
Allan Bowe

Definition in file mf_getuniquefileref.sas.