Skip to main content

Bringing Zip and Unzip to i5/OS PASE and QShell Environments

Redbooks logo

Abstract

Zipping documents and directories has become a common practice. It is also possible to use the Zip functions in Portable Application Solutions Environment (i5/OS PASE), with a little help from AIX. This tip provides the steps for bringing the Zip and Unzip functions to your System i server.

Contents

Restriction: This procedure is not supported on the System i server by IBM. We provide these instructions for you to download a copy of zip and unzip and run these functions on your System i server.

Here are the steps to add the Unzip and Zip functions to your System i server:

  1. Go to the following File Transfer Protocol (FTP) site and download the archives:

    http://www.ctan.org/tex-archive/tools/zip/info-zip/UNIX/AIX/

    In our case, we download these files:

    zip23x-aix43.zip To compress (zip) files
    unz550x-aix5L.tar.gz To uncompress (unzip) files

  2. Place these files somewhere on your System i server. In this example, we use /home/zip.
  3. You will also need the gunzip tool to uncompress the unz550x-aix5L.tar.gz file. Download the tool from the following Web site:
    http://www-03.ibm.com/servers/enable/site/porting/iseries/overview/gnu_utilities.html

    Place the file in the same directory as the other two files.
    Review the license agreement for the downloaded tools.

  4. Sign on to your System i server and start an i5/OS PASE terminal with the command:

    CALL QP2TERM

  5. Change to the /home/zip directory:

    cd /home/zip

  6. The unzip file is a compressed file. Uncompress this file:

    uncompress gzip.1.2.4a.tar.Z

  7. “Untar” the gzip tar file:

    tar -xvf gzip.1.2.4a.tar

    It installs the executable files under the
    /usr/local/bin directory.
  8. Update the PATH variable with the /usr/loca/bin directory by running this command:

    export PATH=$PATH:/usr/local/bin

  9. Uncompress the unz550x-aix5L.tar.gz file using this command:

    gunzip unz550x-aix5L.tar.gz

  10. “Untar” the uncompressed file:

    tar -xvf unz550x-aix5L.tar

    It creates the directory
    unzip-5.50.
  11. Change to this directory:

    cd unzip-5.50

  12. Enter the following command:

    unzip

    It shows you the command usage text.
  13. To run the command from any directory and any terminal window, you have to copy the unzip file into the /QOpenSys/usr/bin directory:

    cp unzip /QOpenSys/usr/bin

  14. Switch back to the directory to which you have downloaded the files:

    cd /home/zip

  15. Now check whether unzip is really working. The Zip program on our system is packed in the zip file - zip23x-aix43.zip, so we can try on that one. Verify that you are in the directory in which the zip23x-aix43.zip file is located. Enter the following command:

    unzip -d ./zip zip23x-aix43.zip

  16. This creates a directory named zip and places all files into that directory. Change to this directory:

    cd zip

  17. Issue the following command to see if the program is working:

    zip

    This will show the usage notes.

  18. To make the command available in every i5/OS PASE terminal session, copy the program into the /QOpenSys/usr/bin directory.

    cp zip /QOpenSys/usr/bin

  19. To use both commands (zip and unzip) in QShell, make another copy of the programs into the /usr/bin directory by running 2 commands:

    cp /QOpenSys/usr/bin/zip /usr/bin

    cp /QOpenSys/usr/bin/unzip /usr/bin

    Now zip and unzip are available for the next QShell terminal.


Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

Profile

Publish Date
18 August 2003

Last Update
11 May 2009


Rating:
(based on 7 reviews)


Author(s)

IBM Form Number
TIPS0283