Skip to main content  
        iSeries home   |   Easy400     |   CGIDEV2     |   MMAIL  
Freeware
 
 Introduction
 
  Commands:
zipsave
dspzipsave
unzipsave
 
 Download
 
 

 
What about a free ZIP utility on your iSeries?
ZIPSAVE
Save & Zip
by Giovanni B. Perotti (Italy)
 
If you distribute software for iSeries, you now may stop downloading save files to PC, zipping and uploading them back to the iSeries.

You can have all it done on the iSeries.

Zip and Unzip on your iSeries platform.

About iSeries QShell

iSeries QSHELL is a command line interpreter (shell) running on the IBM iSeries computer platform. Qshell is based on POSIX and X/Open standards. IBM created the Qshell interpreter primarily to provide support for the Java Development Kit (JDK) on their iSeries line of computers. The Qshell interpreter can be used interactively or for running shell scripts.
Links: Qshell in the IBM iSeries Information Center (html)
Exploring iSeries QShell (html)
IBM System i - Programming QShell (pdf)

About the "JAR" tool

The "JAR" (Java ARchive) tool - available trough the QShell interpreter - combines multiple files by compressing them into a single jar file.
It is compatible with the jar tool that is supplied by Sun Microsystems, Inc. which was designed mainly to facilitate the packaging of java applets or applications into a single archive.
JAR files are based on the ZIP file format.
Links: ZIP (file format) (html)
jar - The Java Archive tool (html)

Cautions when using the "JAR" tool on iSeries

After reading Thomas Snyder's technical tip Use RPG and QShell for Zipping and Tarring Files, I got the impression that I could use the JAR tool to compress any type of OS/400 file, from an IFS stream file, to a source member.
You can try and believe in success, until you try to decompress (unzip) the compressed files.

The problem here is that the information about the codepage of the compressed files is not retained (the underlying assumption here seems to be that the whole game is for PC objects).
Therefore, when a zipped file is decompressed (inflated), it is given codepage 819 (PC ASCII) whatever its original code page was.
Of course you may then copy the decompressed stream file to another stream file, by specifying the correct target codepage, but that implies that you know what it was.

The next problem is when you want the resulting zip file be processed on a PC. In such a case the zip file (the JAR file) must be codepage 819 (PC ASCII), otherwise the PC unzip utility would not understand it.

In conclusion:

  1. If you want the zipped files be processed by a PC, you must use codepage 819 both for the containing file (the zip or JAR file) and for the contained files (the zipped ones) if they must be accessed by PC users or PC programs.
  2. Zipped files containing binary data (as save files) must be codepage 819 to be understood by a PC, but do not need to be converted to such a codepage. When back to an OS/400 save file, they will be understood again in their original 65535 CCSID.
  3. Text files to be unzipped and read on a PC, must be converted as *text to codepage 819 before they are zipped.
  4. PDF stream files must be converted as *binary to codepage 819 before they are zipped.

What is the ZIPSAVE utility

ZIPSAVE is an iSeries utility available at no charge from the Easy400 site and including sources.
It was made for distributing save files through the Internet network.
It does take advantage of the iSeries Qshell JAR utility in order to distribute save files in compressed format.
Zip files generated by this utility can be unzipped on a PC or directly on an iSeries.
The overall contents of a ZIPSAVE generated zip stream file are:
• an optional .txt file containing some installation instructions
• a .savf binary file that can be used to load an iSeries save file.

The ZIPSAVE utility is made of the following commands:

  1. ZIPSAVE
    Allows to run a SAVLIB, a SAVOBJ or a SAV command.
    The QShell JAR tool is used to compress the resulting save file into a user-specified zip file along with a "readme" user-specified text stream file.
     Note- The command takes care of the 819 codepage for both files.
  2. DSPZIPSAVE
    The QShell JAR tool is used to display the table of contents of the zip file.
  3. UNZIPSAVE
    The ZIPSAVE-created zip file can be unzipped on a PC.
    The UNZIPSAVE command uses the Qshell JAR tool to performs the unzip on the iSeries.
    Options are available to display the optional "readme" text file and to upload a QGPL save file from the unzipped save stream file.

Command helps provide the detail information needed to properly operate.

See the next pages for details. next page