Language Reference
PACKAGE LIBNAME Statement
PACKAGE LIBNAME libref packagename;
This statement is supported only by the IML procedure.
The PACKAGE LIBNAME statement creates a SAS libref that points to the
data
directory for a package. You must load a package before you can use the PACKAGE LIBNAME statement.
You must specify the following arguments:
The PACKAGE LIBNAME statement is used to access data in a package. For examples, the following statements read data from the AboveBelow package, which is installed in the SYSTEM collection:
package load AboveBelow;
package libname ABdata AboveBelow;
/* use the libref to read data that the package provides */
use ABdata.example;
read all var _NUM_ into X[colname=varNames];
close ABdata.example;
print varNames;
Figure 306: Reading Data from a Package
| varNames | ||
|---|---|---|
| x1 | x2 | x3 |
The READ statement reads the numerical variables into the matrix . Figure 306 shows that the
example data set contains numerical variables named x1, x2, and x3.
You must specify exactly one package in the PACKAGE LIBNAME statement.