Packages(Experimental)


Testing a Package

Before you send a ZIP file that contains a SAS/IML package to a colleague or post it to the SAS/IML File Exchange, you are strongly encouraged to install and run the package.

To test the RightTriangle package:

  1. Store the ZIP file somewhere on your file system. This example assumes that the ZIP file is located in the directory C:\Packages .

  2. Run the PACKAGE INSTALL statement to install the package from the ZIP file, as follows:

    proc iml;
    package install "C:\Packages\righttriangle.zip";
    quit;
    
  3. Run the following statements to ensure that the package installed correctly:

    proc iml;
    package list;
    package info RightTriangle;
    package help RightTriangle;
    
  4. Load the package and run the programs in the programs directory, as described in the section Step 4: Create a Program File. For example, the following statements test each function in the RightTriangle package:

    package load RightTriangle;
    Rt = IsRightTriangle({3 4 5});  /* 1 = valid lengths     */
    leg = FindLeg({3 5});           /* find 2nd leg from hypotenuse and leg */
    hypot = FindHypotenuse({3 4});  /* find hypotenuse from legs */
    print Rt leg hypot;             /* correct answer is {1 4 5} */
    


Note: This procedure is experimental .