BPXBATCH
A program that runs a Unix System Services command, shell script or program as a step in a batch job.
Also written BPXBATCH SH, STDOUT, STDERR, run shell script from JCL
BPXBATCH lets a batch job run Unix work. A step with EXEC PGM=BPXBATCH and PARM='SH /u/zbank/scripts/nightly.sh' starts the Unix shell and runs the script. PARM='PGM /path/to/program' runs a Unix program directly, without a shell.
Output from the command goes to the STDOUT and STDERR DD statements. These can point at Unix files, using the PATH parameter, or, on current z/OS releases, at SYSOUT, so the output appears with the rest of the job's output in SDSF. A STDPARM DD can hold a longer command than fits in the PARM.
The step's return code reflects the command's exit status, so later steps and the scheduler can react to failures in the normal way.
BPXBATCH is how many sites fit Unix work into their batch: Java programs, Python scripts, file transfers and tools that only exist in Unix. It is the Unix equivalent of IKJEFT01, which does the same for TSO commands.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- Unix System ServicesA full Unix environment built into z/OS, with a shell, directories and files alongside the traditional mainframe world.
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- EXEC statementThe JCL statement that starts a step by naming the program or procedure to run.
- IKJEFT01The program that runs TSO in a batch job, so TSO commands and REXX execs can run without a terminal.
- zFSThe z/OS File System: the type of file system that holds Unix files and directories on z/OS.