Packages(Experimental)


Step 6: Create a ZIP File

All packages are distributed as ZIP files. The filename of the ZIP file must be the name of the package followed by the .zip extension.

This section assumes that you have created a directory hierarchy and that you have created source files, help files, program files, and an info.txt file, as described in the previous sections. For the RightTriangle package, the directories and files are arranged as shown in the Figure 9.5.

Figure 9.5: RightTriangle Directory Structure

     |   info.txt
     |   
     +---data
     +---help
     |       RightTriangle.txt
     |       
     +---programs
     |       example.sas
     |       
     +---source
             RightTriangle.sas


This section uses WinZip® software and the Windows operating system to illustrate how to create a ZIP file of the RightTriangle package. If you use other software to create ZIP file, the process will be different.

To create a ZIP file by using WinZip software, use Windows Explorer to navigate to the righttriangle directory. Select all the files and subdirectories in the righttriangle directory. Right-click on the selected files, and choose WinZipAdd to righttriangle.zip from the pop-up menu, as shown in Figure 9.6.

Figure 9.6: Creating a ZIP File by Using WinZip

Creating a ZIP File by Using WinZip


The program will create the file righttriangle.zip. You can examine the contents of the ZIP file to make sure that all the files are included and that the directory structure was preserved. The ZIP file will look similar to Figure 9.7.

Figure 9.7: Checking the Contents of a ZIP File

Checking the Contents of a ZIP File


So that the ZIP file can be correctly unzipped by the SAS/IML PACKAGE statement, make sure that the ZIP file satisfies the following requirements:

  • The ZIP file should preserve the directory hierarchy when the files are unzipped. In WinZip 18.0, click the Settings tab and select the Use Folder Names option under the Unzip Settings menu, as shown in Figure 9.8.

  • The ZIP file cannot be password-protected.

  • The ZIP file must use the original ZIP compression scheme.

Figure 9.8: WinZip Options

WinZip Options



Note: This procedure is experimental .