1. If you use the z/OS pax of z/OS with a portable archive format, the file
will be compatible with linux tar.  LZ compression is supported.  For
example, "pax -x ustar" specifies the compatible USTART format, which is
the default.

2. The pax -f <archive> with pax can be a z/OS dataset (//'hlq.my.dsn'  or
//dd:myDD reference).
    Unfortunately the component file that you are adding/compressing into
the archive can not be a dataset/DD
    Your question doesn't say which case you have.

3. You can use BPXBATCH to run pax, although using a DD reference requires
BPXBATSL.  It's trickier, but it can be done.

Here's an example of using COZBATCH (an improved BPXBATCH utility,
available free under our Community License):

//  EXPORT SYMLIST=(INDSN,FN)
//  SET INDSN=TCPIP.ETC.SERVICES
//  SET FN='myfile.txt'
//*
//SHELL EXEC PGM=COZBATCH
//ARCHIVE   DD DSN=&&ARCHIVE,DISP=(NEW,PASS),
//             DCB=(RECFM=U,BLKSIZE=27998),
//             SPACE=(CYL,(10,10))
//STDIN     DD *
# The following is just input to a z/OS Unix login shell running in batch

# We copy/convert the INDSN through a named pipe so that pax can use it
#  as a component file name that we choose
mkfifo $JES_FN     # JES_xxx environment variables are mapped from JES
symbols
trap 'rm -rf -f $JES_FN' EXIT
fromdsn -t ISO8859-1 -l crlf $JES_INDSN > $JES_FN   &

pax -wvz -f //DD:ARCHIVE  $JES_FN
//
(as you can see, this example uses fromdsn to do codepage and line
terminator conversion on the input file)

4. Since you are dealing with one file, IMO it is simpler to just use gzip
on z/OS (the Rocket port).

//  EXPORT SYMLIST=(INDSN)
//  SET INDSN=TCPIP.ETC.SERVICES
//*
//GZIP EXEC PGM=COZBATCH
//GZ       DD DSN=&&GZ,DISP=(NEW,PASS),
//             DCB=(RECFM=U,BLKSIZE=2799
//             SPACE=(CYL,(1,1))
//STDIN    DD *
set -o pipecurrent
fromdsn -t ISO8859-1 -l crlf $JES_INDSN | \
  gzip -v -c | \
  todsn -b //DD:GZ
//

Either one of these steps could be followed by an FTP step using the passed
temporary archive/gz data set.

5. FWIW, if you use SFTP (z/OS OpenSSH) instead of FTP or FTP+TLS, you can
automatically do LZ compression/decompression on the file as it is
transferred.   Co:Z SFTP also supports z/OS data sets and codepage / format
conversions.

Kirk Wolf
http://dovetail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to