Skip to main content

I apologize, but I couldn´t find any jcl sample to run gzip in batch mode.

I apologize, but I couldn´t find any jcl sample to run gzip in batch mode.

Here’s an example, using gzip to compress and then uncompress a file. Hope this helps.

– Jerry

//GZIP JOB
//BATCHSH EXEC PGM=BPXBATCH,PARMDD=CMDIN
//STDOUT   DD   SYSOUT=*
//STDERR   DD   SYSOUT=*
//CMDIN DD *
SH ls -l /some/big/file;
   /rsusr/ported/bin/gzip
     </some/big/file
   | /rsusr/ported/bin/gzip -d
   | wc -c
/*

Here’s an example, using gzip to compress and then uncompress a file. Hope this helps.

– Jerry

//GZIP JOB
//BATCHSH EXEC PGM=BPXBATCH,PARMDD=CMDIN
//STDOUT   DD   SYSOUT=*
//STDERR   DD   SYSOUT=*
//CMDIN DD *
SH ls -l /some/big/file;
   /rsusr/ported/bin/gzip
     </some/big/file
   | /rsusr/ported/bin/gzip -d
   | wc -c
/*

Hi, thank you, but is it possible to address a dataset without moving to the uss directory?


Hi, thank you, but is it possible to address a dataset without moving to the uss directory?

Yes.

//GZIP JOB
//BATCHSH EXEC PGM=BPXBATCH,PARMDD=CMDIN
//STDOUT   DD   SYSOUT=*
//STDERR   DD   SYSOUT=*
//CMDIN DD *
SH cat "//'SOME.BIG.DATASET'" |
   /rsusr/ported/bin/gzip
   | /rsusr/ported/bin/gzip -d
   | wc -c
/*

Some useful documentation:

The IBM documentation is actually quite good.