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:
- 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
- Place these files somewhere on your System i server. In this example, we use /home/zip.
- 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.
- Sign on to your System i server and start an i5/OS PASE terminal with the command:
CALL QP2TERM
- Change to the /home/zip directory:
cd /home/zip
- The unzip file is a compressed file. Uncompress this file:
uncompress gzip.1.2.4a.tar.Z
- “Untar” the gzip tar file:
tar -xvf gzip.1.2.4a.tar
It installs the executable files under the /usr/local/bin directory.
- Update the PATH variable with the /usr/loca/bin directory by running this command:
export PATH=$PATH:/usr/local/bin
- Uncompress the unz550x-aix5L.tar.gz file using this command:
gunzip unz550x-aix5L.tar.gz
- “Untar” the uncompressed file:
tar -xvf unz550x-aix5L.tar
It creates the directory unzip-5.50.
- Change to this directory:
cd unzip-5.50
- Enter the following command:
unzip
It shows you the command usage text.
- 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
- Switch back to the directory to which you have downloaded the files:
cd /home/zip
- 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
- This creates a directory named zip and places all files into that directory. Change to this directory:
cd zip
- Issue the following command to see if the program is working:
zip
This will show the usage notes.
- 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
- 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.
