Features:
Co:Z Batch is a utility that is similar to BPXBATCH, however it offers several improvements:
- Executes the Unix program or shell in the same address space, which simplifies job accounting
and allows for the use of resources such as DD statements by the Unix program.
- STDIN, STDOUT, and STDERR files from the Unix program are redirected to DD statements,
which may refer to z/OS datasets or spool files.
- If not specified, the default Unix program to run is the user's default login shell.
- Environment variables may be set using a STDENV DD, or passed in via JCL PARM= .
Multiple COZBATCH steps may be used together to pass JCL variables into Unix environment variables,
so as to avoid the limits imposed by 100-character PARM= fields.
- If a program is run directly, its name and arguments are given in JCL PARM= and program
arguments support quoting.
- The Unix program or shell exit code is used as the step return code, but this may be overridden
by a PARM setting.
Features Comparison:
Feature |
BPXBATCH |
BPXBATSL |
AOPBATCH |
COZBATCH |
Same address space |
no |
yes |
yes |
yes |
STDOUT/STD to dataset/sysout |
yes (1.7+) |
yes (1.7+) |
yes |
yes |
STDIN from dataset/sysin |
no |
no |
yes |
yes |
Run a default login shell |
yes |
no (unless root) |
no |
yes |
Run a Unix command without a shell |
yes |
yes |
yes |
yes |
Set ENV vars from JCL vars |
limited[1] |
limited[1] |
limited[1] |
yes |
PARM= args support quoting |
no |
no |
yes |
yes |
Override(set) step return code |
no |
no |
no |
yes |
[1]
One or more ENVAR() LE runtime options may be specified on the
PARM to set environment variables using JCL variables.
The size of the entire PARM field is limited to 100 characters.
|