Skip to main content  
        iSeries home   |   Easy400     |   CGIDEV2     |   MMAIL  
Public-Source
 
 Introduction
Command set 1
Command set 2
Appendix A
Appendix B
 Download
 
 

 
ZIP & UNZIP commands on IBM i
by Giovanni B. Perotti (Italy)
At last, after many years, with V7R2 IBM i started featuring some ZIP/UNZIP CL commands. Those commands were unhappily named
  • CPYTOARCF (Copy To Archive File) and
  • CPYFRMARC (Copy From Archive File)
so that one may not immediately figure out what they are for.

If you run V7R2 or subsequent, now you know that you have IBM provided CL tools for compressing/uncompressing stream files.

If you are not yet on V7R2, never fear: this ZIP/UNZIP tool of ours does it extremely well since year 2009 on V5R2 and subsequent releases, including V7R2, V7R3 and the future ones.



This utility installs on your IBMi two sets of commands to

  1. compress multiple IFS objects into a "zip" stream file
  2. display the contents of an IFS "zip" stream file
  3. unzip (inflate) the compressed objects of a "zip" stream file.

The following sets of commands are made available:

  1. Command set 1 - A set of commands (ZIP, DSPZIP and UNZIP) based on a Qshell "zip" command automatically installed by this utility.
  2. Command set 2 - A set of commands (ZIP2, DSPZIP2 and UNZIP2) based on a system provided Qshell "Jar" (Java archive) command.

Zip files created by ZIP and ZIP2 commands are fully compatible between themselves and with zip files created under Windows.
Windows zip files are fully compatible with commands ZIP and ZIP2 of this utility.

Note - Check out the updates to this tool by pressing this link.
To know the release date of this tool on your IBMi, run command zip/released.

1-Prerequisites

  • OS/400 release V5R2 or subsequent
  • IBM product 57xxSS1 option 30 (Qshell)
  • IBM product 57xxDG1 (IBM HTTP Server for i)

2-Installation

  • Download file zip.zip from the Easy400 download page and unzip it.
  • Follow the Readme.txt instructions to upload and to restore library ZIP.
  • On the iSeries run the following procedure:
    STRREXPRC SRCMBR(INSTALL) SRCFILE(ZIP/QREXSRC)
    It does the following:
    • Creates utility objects in library ZIP
    • Restores directory /zip
    • Restores directory /home/zip
    • copies commands ZIP and UNZIP to directory /QOpenSys/usr/bin/jpzip for use of i5/OS PASE
    • copies commands ZIP and UNZIP to directory /usr/bin for use of Qshell