OS/390 packing programs

Axter used Ask the Experts™
Does an OS/390 mainframe have any tools for unpacking files like unzip or tar?

I want to ftp a grp of files in a single zip/packed file, but I'm not sure what type of packing format it should be sent in.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

I believe the tar command is available there as well. Furthermore, you can use the "compress" command to compress/uncompress files.

Hope this helps



>>I believe the tar command is available there as well. Furthermore, you can use the "compress" command to
>>compress/uncompress files.

I need to compress it before doing the ftp to the mainframe.
Is there a windows tool to compress it to a format that can be uncompress at the mainframe side?

Download the MVS zip utility
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Download gzip from file333 at cbttape.org


Exactly what is the MVS zip utitlity.

The link you posted doesn't describe it.

Does it run on OS/390?


>>Download gzip from file333 at cbttape.org

Does that run on OS/390?

Please provide some details.


I need an OS/390 solution.
I already have plenty of windows programs for zipping and unzipping files.

What I need is something that can unzip the file in the OS/390.
Or something that can compress the files in the Windows side that will match the format of the OS/390 uncompress utility program.

Do you want gzip and unzip?  Pkzip has a license version running at MVS. CBT Tape is the well konwn MVS Share utilitywhich is free.  Download file 333 to your PC. Unzip the file at Windows. Upload to MVS 390 and usually it is at the XMIT format.  At TSO issue command XMIT RECEIVE the file and it will unload to a PDS and it has the documentaton to guide you how to install gzip at MVS. As it has too many utilty there and maybe you can find a free unzip utility there.

www.cbttape.org is the website of MVS utility. I also contribute my OS/390 utiity there. Do you have issue to use MVS version of gzip?


>>At TSO issue command XMIT RECEIVE the file and it will unload to a PDS and it has the documentaton to guide you how to install gzip at MVS.

So you're saying this gzip will run on the OS/390 side?

If so, do I need admin rights to install this gzip in the OS/390 side?

It is no need to have admin right and gzip is only data uncompression program. It does not execute any OS/390 priviledge instruction. You execute TSO RECEiVE and load the gzip into your private load library.   Try the gzip at TSO

I've upload the gzip to OS/390 and a private loadlib for gzip.

The document of gzip:

 Gzip reduces the size of the named  files  using  Lempel-Ziv
coding  (LZ77).  Whenever possible, each file is replaced by
one with the extension .gz, while keeping the same ownership
modes,  access  and modification times.  (The default exten-
sion is -gz for VMS, z for MSDOS, OS/2 FAT, Windows  NT  FAT
and  Atari.) If no files are specified, or if a file name is
"-", the standard input is compressed to the  standard  out-
put.   Gzip will only attempt to compress regular files.  In
particular, it will ignore symbolic links.                  
If the compressed file name is too long for its file system,
gzip truncates it.  Gzip attempts to truncate only the parts
of the file name longer than 3 characters.  (A part is  del-
imited  by  dots.) If the name consists of small parts only,
the longest parts are truncated. For example, if file  names
are  limited  to 14 characters, gzip.msdos.exe is compressed
to gzi.msd.exe.gz.  Names are not truncated on systems which
do not have a limit on file name length.                    

By default, gzip keeps the original file name and  timestamp
in  the  compressed  file. These are used when decompressing
the file with  the  -N  option.  This  is  useful  when  the
compressed  file  name  was truncated or when the time stamp
was not preserved after a file transfer.                    
Compressed files can be  restored  to  their  original  form
using  gzip -d or gunzip or zcat. If the original name saved
in the compressed file is not suitable for its file  system,
a  new  name is constructed from the original one to make it
gunzip takes a  list  of  files  on  its  command  line  and
replaces each file whose name ends with .gz, -gz, .z, -z, _z
or .Z and which begins with the correct magic number with an
uncompressed  file  without  the original extension.  gunzip
also recognizes the special  extensions  .tgz  and  .taz  as
shorthands   for  .tar.gz  and  .tar.Z  respectively.   When
compressing, gzip  uses  the  .tgz  extension  if  necessary
instead of truncating a file with a .tar extension.          
gunzip can currently decompress files created by gzip,  zip,    
compress,  compress  -H  or pack. The detection of the input    
format is automatic.  When  using  the  first  two  formats,    
gunzip  checks  a  32  bit  CRC. For pack, gunzip checks the    
uncompressed length. The standard compress  format  was  not    
designed  to  allow  consistency  checks.  However gunzip is    
sometimes able to detect a bad .Z file. If you get an  error    
when uncompressing a .Z file, do not assume that the .Z file    
is correct simply because the standard uncompress  does  not    
complain.  This generally means that the standard uncompress    
does not check its input, and happily generates garbage out-    
put.   The  SCO  compress -H format (lzh compression method)    
does not include a CRC  but  also  allows  some  consistency    
Files created by zip can be uncompressed  by  gzip  only  if    
they  have  a  single member compressed with the 'deflation'    
method. This feature is only intended to help conversion  of    
tar.zip  files  to  the  tar.gz format. To extract zip files    
with several members, use unzip instead of gunzip.          
zcat is identical to gunzip -c. (On some systems,  zcat  may
be  installed  as  gzcat  to  preserve  the original link to
compress.) zcat uncompresses either a list of files  on  the
command   line   or   its  standard  input  and  writes  the
uncompressed data on standard output.  zcat will  uncompress
files that have the correct magic number whether they have a
.gz suffix or not.                                          
Gzip uses the Lempel-Ziv algorithm used in  zip  and  PKZIP.
The  amount  of  compression obtained depends on the size of
the input and the distribution of common substrings.   Typi-
cally,  text  such  as  source code or English is reduced by
60-70%.  Compression is  generally  much  better  than  that
achieved  by  LZW  (as used in compress), Huffman coding (as
used in pack), or adaptive Huffman coding (compact).        
Compression is always performed, even if the compressed file
is  slightly larger than the original. The worst case expan-
sion is a few bytes for the gzip file header, plus  5  bytes      
every  32K  block, or an expansion ratio of 0.015% for large      
files. Note that the  actual  number  of  used  disk  blocks      
almost  never increases.  gzip preserves the mode, ownership      
and timestamps of files when compressing or decompressing.        



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial