z/OS Tools & Language

Expand all | Collapse all

Sample documentation

  • 1.  Sample documentation

    Posted 02-24-2017 18:29

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



  • 2.  RE: Sample documentation

    Posted 02-27-2017 10:44

    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
    /*


  • 3.  RE: Sample documentation

    Posted 02-28-2017 10:07

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



  • 4.  RE: Sample documentation

    Posted 02-28-2017 11:00

    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.