Text data processing with the HZAZIP utility

The HZAZIP utility processes text data to be compatible with the zip processing utilities available on other platforms.

When compressing a text record, the HZAZIP utility performs the following processing:
  • Translates EBCDIC line feed (LF) characters (x'25') to periods.
  • Translates EBCDIC data to ASCII data.
  • Appends an ASCII carriage return line feed (CRLF) sequence (x'0D0A') to encode the record extent.
  • Compresses the data and writes it to the archive.
Each compressed member is marked as an ASCII text file, and the internal attribute value of the central file header is set to 1.
The following input data set attributes are also stored in the zip header extended field:
  • Data set organisation
  • Record format
  • Block size
  • Logical record length
When decompressing text data, the HZAZIP utility performs the following processing:
  • Accumulates data until an ASCII LF (x'0A') is encountered.
  • Truncates the trailing ASCII carriage return (CR) (x'0D') if present in accumulated data.
  • Translates the ASCII data to EBCDIC and writes the data as a single record.

During compression, records read from data sets with fixed-length records have their trailing blanks truncated before being compressed. After being decompressed, short records to be written to data sets with fixed-length records are extended with blanks to the required length.

The translation tables used for conversion between EBCDIC and ASCII that are originally sourced from the EZAESENU member in the SEZATCPX library are reciprocal, so that applying one translate table and then the other yields the original data. Consequently, all EBCDIC single byte character set (SBCS) and double byte character set (DBCS) text can undergo a ZIP and UNZIP cycle without corruption.