Language Reference


PACKAGE INSTALL Statement

(Experimental)

  • PACKAGE INSTALL "fullname"<(collection <PARSETIME> )> …;

  • PACKAGE INSTALL fileref<(collection <PARSETIME> )> …;

The PACKAGE INSTALL statement is experimental in SAS/IML 14.1. Packages are distributed as ZIP files. The PACKAGE INSTALL statement unzips the ZIP file and installs the package in a predetermined location.

You can specify the package to be installed in two ways:

"fullname"

specifies the ZIP file’s fully qualified name (which includes both the path and the filename) in quotation marks. You can specify multiple names in a single statement.

fileref

specifies a file reference that was previously created by the FILENAME statement.

You can also specify the following options in parentheses:

collection

specifies the collection into which the package is to be installed. You can specify PUBLIC or PRIVATE; you cannot install a package in the SYSTEM collection. By default, the package is installed in the PRIVATE collection. At some sites, you might need administrative privileges in order to install a package in the PUBLIC collection.

PARSETIME

requests that the package be installed at parse time, rather than at run time. This option applies only to IMLPLUS programs in the SAS/IML Studio environment.

For example, the following statement installs the Pkg1 package from the ZIP file named C:\Packages\Pkg1.zip :

package install "C:\Packages\Pkg1.zip";

The following statements are an equivalent way to install the Pkg1 package:

filename ThePkg "C:\Packages\Pkg1.zip";
package install ThePkg;

The PACKAGE INSTALL statement creates a directory named Pkg1 in a directory whose location is system-dependent and then unzips the contents of the ZIP file into that directory. The previous examples do not specify a collection, so the package is installed in the PRIVATE collection.

You should install a package only once. SAS/IML software does not allow you overwrite a package that is already installed. To install a newer version of a package in the same collection, you must uninstall the older version and then install the newer version.

Some operating systems (notably Linux) are case-sensitive. When you specify a ZIP file on a case-sensitive operating system, be sure to match the case of the filename in the operating system.