HZAZIP program parameters

The HZAZIP utility can accept up to two program parameters. The first parameter specifies the function the program is to perform and the second parameter can provide a data definition override list for programs that dynamically invoke the utility.

When you invoke the HZAZIP utility as a stand-alone batch program, the PARM value on the EXEC statement specifies the functional request. DD statements define the details of the following files:

  • The SYSPRINT report file
  • The SYSUT1 input file
  • The SYSUT2 output file
You can specify program parameters in the function request in mixed case. The following information describes valid program parameters.
none
If you omit the program parameter, usage notes will be printed to SYSPRINT and LIST processing will be initiated. If SYSUT1 is not allocated the program completion code will be set to 1.
LIST
If you specify this parameter, the utility produces a list of the entries in the central file directory.
TEST
This function will list the local file headers as well as the entries in the central file directory, check that the stored and actual values of some properties match, then perform a trial unzip of each file in the zip archive.
ZIP or ZIP=filename.ext
Use this parameter to compress a sequential data set into a new archive with a single constituent file assigned the name specified in the parameter. If no name is specified in the parameter, the name seq.txt is used. The data is treated as text.
ZIP or ZIP=*.ext
Use this parameter to compress a partitioned data set into a new archive where each member is loaded as a separate zipped file within the archive. The PDS member name is used to name each corresponding archive member. If an asterisk and a file extension are specified, then the file extension will be appended to the name of the zipped version of each real PDS member. The data is treated as text.
ADD or ADD=filename.ext
Use this parameter to compress a sequential data set into an existing archive. A new archive member will be created with the name specified in the parameter. If no name is specified in the parameter, the name seq.txt is used. The data is treated as text. There is no dependency on the text or binary nature of files already present in the archive. To retain data access, ensure that all resultant archive member names are unique.
ADD or ADD=*.ext
Use this parameter to compress a partitioned data set into an existing archive where each member is loaded as a separate zipped file within the archive. The PDS member name is used to name each corresponding archive member. If an asterisk and a file extension are specified, then the file extension will be appended to the name of the zipped version of each real PDS member. The data is treated as text. There is no dependency on the text or binary nature of files already present in the archive. To retain data access, ensure that all resultant archive member names are unique.
UNZIP or UNZIP=filenamemask
Use this parameter to decompress an archive into a partitioned data set and load each zipped file into a separate member. The parameter restores data sets from archives made by the HZAZIP utility with PARM=ZIP. If the output data set is sequential, only the first file in the archive is unzipped. You can use the file name mask specification to filter the files to be unzipped.
ZIPBIN or ZIPBIN=filename.ext
Use this parameter to compress a sequential data set into a new archive with a single constituent file assigned the name specified in the parameter. If no name is specified in the parameter, the name seq.bin is used. The data is treated as binary and no translation is performed.
ZIPBIN or ZIPBIN=*.ext
Use this parameter to compress a partitioned data set into a new archive where each member is loaded as a separate zipped file within the archive. The PDS member name is used to name each corresponding archive member. If an asterisk and a file extension are specified, then the file extension will be appended to the name of the zipped version of each real PDS member. The data is treated as binary and no translation is performed. There is no dependency on the text or binary nature of files already present in the archive.
ADDBIN or ADDBIN=filename.ext
Use this parameter to compress a sequential data set into an existing archive. A new archive member will be created with the name specified in the parameter. If no name is specified in the parameter, the name seq.bin is used. The data is treated as binary and no translation is performed. There is no dependency on the text or binary nature of files already present in the archive. To retain data access, ensure that all resultant archive member names are unique.
ADDBIN or ADDBIN=*.ext
Use this parameter to compress a partitioned data set into an existing archive where each member is loaded as a separate zipped file within the archive. The PDS member name is used to name each corresponding archive member. If an asterisk and a file extension are specified, then the file extension will be appended to the name of the zipped version of each real PDS member. The data is treated as binary and no translation is performed. There is no dependency on the text or binary nature of files already present in the archive. To retain data access, ensure that all resultant archive member names are unique.
UNZIPBIN or UNZIPBIN=filenamemask
Use this parameter to decompress an archive into a partitioned data set and load each zipped file into a separate member. The parameter restores data sets from archives made by the HZAZIP utility with PARM=ZIPBIN. If the output data set is sequential, only the first file in the archive is unzipped. Use the file name mask specification to filter the files to be unzipped.
The filenames and filename masks that you specify in program parameters must not exceed 128 bytes in length. File name mask matching is case insensitive. The following characters are generic masking characters for filename masks:
  • ? (question mark) matches any single character.
  • * (asterisk) matches any zero or more contiguous characters.
If the function request is absent or invalid, the utility writes usage notes to the report file. If the request is absent, the utility attempts to run the LIST function.

Controlling zip compaction

For the program parameter values described above, wherever the parameter begins with the characters ZIP or ADD, the values ZPn or ADn can be substituted respectively, where n is a decimal digit in the 0 to 9 range which specifies the compaction that the zip process is to use.

A value of 0 specifies that the shrink method is to be used, which is the method the HZAZIP program always used in releases earlier than 8.2.

A value in the 1 to 9 range specifies the corresponding compaction level of the deflate method. As the compaction level number increases, so does both the data compression and the CPU time consumed by the zip process.

The default is the fastest deflate compaction level. That is, PARM=ZIP is equivalent to PARM=ZP1 and PARM=ADD is equivalent to PARM=AD1.

Handling EBCDIC Code Page 1047 Text

When EBCDIC text is being zipped for the simple purpose of reducing its volume, the precise translation into ASCII is not important as along as it is exactly reversed before the unzipped EBCDIC text is processed. However, when the EBCDIC text is to be transported to a platform using a character set based on ASCII, various code page translation issues may arise. A frequent issue is the differences between EBCDIC code pages 037 and 1047, the latter being the default code page of z/OS UNIX.

By default, HSIZIP uses translate tables copied from SEZATCPX library member EZAESENU which caters for code page 1140 which is equivalent to code page 037 with a Euro currency sign modification. HSIZIP can also be directed to use the translate tables copied from SEZATCPX library member EZAAS010 which cater for code page 1047.

To use the relevant alternate code page 1047 translate table, a character in the program parameter which specifies the request is changed to an A.

For compression requests, the second character is changed to an A. So, parameter values of AAD, AA0, ZAP, and ZA1 are equivalent to alternate translation requests for ADD, AD0, ZIP and ZP1 respectively. Any of the ZIP and ADD requests can have the second character changed to A for this purpose, although the alternate translate specification will be ignored for binary data requests.

For decompression requests, change UNZIP to UNZAP to use the alternate translation from ASCII to EBCDIC.

There is no metadata present in a zip archive created or modified by HZAZIP to indicate which translate table was used to translate text data. Be careful to use consistent translations for compression and decompression when consuming zipped data on EBCDIC-based platforms such as z/OS.