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

Create a SAS Library. More...

Go to the source code of this file.

Detailed Description

Currently only supports BASE engine

This macro is idempotent - if you run it twice (for the same libref or libname), it will only create one library. There is a dependency on other macros in this library - they should be installed as a suite (see README).

Usage:

mm_createlibrary( libname=My New Library ,libref=mynewlib ,libdesc=Super & <fine> ,engine=BASE ,tree=/User Folders/sasdemo ,servercontext=SASApp ,directory=/tmp/tests ,mDebug=1)

Dependencies

Parameters
libname=Library name (as displayed to user, 256 chars). Duplicates are not created (case sensitive).
libref=Library libref (8 chars). Duplicate librefs are not created, HOWEVER- the check is not case sensitive - if libref exists, LIBREF will still be created. Librefs created will always be uppercased.
engine=Library engine (currently only BASE supported)
tree=The metadata folder uri, or the metadata path, in which to create the library.
servercontext=The SAS server against which the library is registered.
IsPreassigned=set to 1 if the library should be pre-assigned.
libdesc=Library description (optional)
directory=Required for the BASE engine. The metadata directory objects are searched to find an existing one with a matching physical path. If more than one uri found with that path, then the first one will be used. If no URI is found, a new directory object will be created. The physical path will also be created, if it doesn't exist.
mDebug=set to 1 to show debug messages in the log
frefin=fileref to use (enables change if there is a conflict). The filerefs are left open, to enable inspection after running the macro (or importing into an xmlmap if needed).
frefout=fileref to use (enables change if there is a conflict)
Version
9.3
Author
Allan Bowe

Definition in file mm_createlibrary.sas.