The ZIP and UNZIP commands perform standard PC zip and unzip
functions for compressing/decompressing data in the IFS. This can be
used to provide better performance for the transmission of objects.
The Qshell and jar functions are used along with the QTOCVRT API. A
DSPZIP command also exists.
ZIP and UNZIP require intensive CPU cycles.
The typical use of the ZIP command is to first save objects into a
save file using the TAA Tools SAVLIBIFS or SAVOBJIFS.
SAVLIBIFS LIB(ABC)
By default, the ABC library would be saved to a save file in QTEMP
and copied to the home directory of the user using a stream file name
of ABC.savf.
To zip the file, a typical command would be:
ZIP ZIPFILE(abc.zip) FROMFILE(abc.savf)
The zipped file would be 'abc.zip' and would be ready to be
transmitted.
If you receive a zipped file, you may display the contents with the
DSPZIP command. The Qshell and jar command are used to process the
request:
DSPZIP ZIPFILE(abc.zip)
This would display:
abc.savf
You can unzip a zipped file with the UNZIP command:
UNZIP ZIPFIFE(abc.zip)
Because the original stream file name is known, UNZIP creates the
stream file:
abc.savf
The stream file can then be restored using the TAA Tool RSTLIBIFS
command such as:
RSTLIBIFS SAVLIB(TAATFR)
ZIP/UNZIP escape messages you can monitor for
---------------------------------------------
TAA9871 Qshell or jar failed
Escape messages from based on functions will be re-sent.
ZIP Command parameters *CMD
----------------------
ZIPFILE The zip file to be created. If there is no leading
slash such as 'abc.zip', the file is placed in the
home directory. If a leading slash is specified,
the full path name is required such as
'/dir1/dir2/abc.zip'.
FROMFILE Used in combination with the FROMDIR parameter.
This describes the files to be placed into the zip
file.
Multiple names are separated from each other by
blanks such as 'abc.zip def.zip'. If the name is a
directory, the directory and any files or
directories it contains are included.
Any combination of one or more qualified or
unqualified file names may be used. A qualified
name includes or or more directory names.
Generic names may be used with * meaning zero or
more characters (generic) and ? meaning a single
character. For example, to include all files
beginning with abc, specify 'abc*'. To include all
files containing a lower case 'a' in the fifth
position, specify '????a'
The names are case sensitive. To include all files
beginning with 'a' or 'A' would be 'a* A*'.
Unqualified names should be used because when jar
unzips the file, it restores the full path of each
file.
FROMDIR The directory in which to find the file or files in
the FROMFILE parameter. *HOMEDIR is the the default
for the home directory.
ACTION Whether the contents of the zip file are replaced if
it exists.
*REPLACE is the default to replace the file if it
exists and to create the file if it does not.
*UPDATE may be specified to ensure the zip file
exists. Any files that are already in the zip file
are updated and new files are added.
COMPRESS A *YES/*NO parameter for whether to compress the
data.
*YES is the default to compress the data.
*NO may be specified so the data is not compressed.
VERBOSE A *YES/*NO parameter for whether verbose output
should be produced.
*NO is the default to cause output only if errors
occur.
*YES may be specified to send default information.
If an interactive job is used, a window is used for
the output. In batch, a spooled file is output.
UNZIP Command parameters *CMD
------------------------
ZIPFILE The file where the contents are to be extracted into
the TODIR directory. A qualified or unqualified
name may be used. If no leading slash exists, the
user's home directory is searched.
TODIR The directory where the extracted file will be
placed. *HOMEDIR is the default for the user's home
directory.
VERBOSE A *YES/*NO parameter for whether verbose output
should be produced.
*NO is the default to cause output only if errors
occur.
*YES may be specified to send default information.
If an interactive job is used, a window is used for
the output. In batch, a spooled file is output.
DSPZIP Command parameters *CMD
-------------------------
ZIPFILE The file where the contents should be displayed
from. A qualified or unqualified name may be used.
If no leading slash exists, the user's home
directory is searched.
VERBOSE A *YES/*NO parameter for whether verbose output
should be produced.
*NO is the default to cause output only if errors
occur.
*YES may be specified to send default information.
If an interactive job is used, a window is used for
the output. In batch, a spooled file is output.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKIFSE Check IFS entry
RCVLSTMSG3 Receive last message 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
ZIP *CMD TAAIFSZ QATTCMD
UNZIP *CMD TAAIFSZ2 QATTCMD
DSPZIP *CMD TAAIFSZ3 QATTCMD
TAAIFSZC *PGM CLP TAAIFSZC QATTCL
TAAIFSZC2 *PGM CLP TAAIFSZC2 QATTCL
TAAIFSZC3 *PGM CLP TAAIFSZC3 QATTCL
TAAIFSZR *PGM RPGLE TAAIFSZR QATTRPG
TAAIFSZR2 *PGM RPGLE TAAIFSZR2 QATTRPG
Structure
---------
ZIP Cmd
TAAIFSZC CL pgm
TAAIFSZR2 RPG pgm
UNZIP Cmd
TAAIFSZC2 CL pgm
TAAIFSZR2 RPG pgm
TAAIFSZR RPGLE pgm
DSPZIP Cmd
TAAIFSZC3 CL pgm
TAAIFSZR2 RPG pgm
|