The LIBNAME statement is a global SAS statement that manipulates librefs. In IMLPlus, it is normally the case that you must place global SAS statements in a SUBMIT block or prefix the statement with the @ character. However, IMLPlus provides limited support for the LIBNAME statement as a native IMLPlus statement.
The LIBNAME statement has many different forms. IMLPlus only supports the following forms:
IMLPlus also supports an IMLPlus-specific form of the LIBNAME statement that accepts an IML expression:
libname libref (SAS-library-expression);
The SAS-library-expression argument must evaluate to a scalar character matrix. IMLPlus processes the LIBNAME statement as if it were
libname libref "evaluated-SAS-library-expression";
If you need to use a form of the LIBNAME statement that is not supported by IMLPlus, you must submit the LIBNAME statement to SAS for processing.
libname samples "C:\Program Files\SASHome\SASIMLStudio\12.1\Data Sets";
run GetInstallationDirectory( path ); path = path + "Data Sets"; libname samples (path);
@libname Temp clear;
librefs = "SASUSER SASHELP";
submit librefs;
libname MyLibs (WORK &librefs);
endsubmit;
statement = "libname MyLibs (WORK SASUSER SASHELP);"; SAS.SubmitStatements( statement );