Invoking BPXBATCH from the TSO/E environment
You can use BPXBATCH to run a z/OS UNIX shell command, shell script, or executable file from the TSO/E environment. (For shell commands, however, it may be even easier to use the OSHELL exec, which invokes BPXBATCH. See OSHELL: Running a shell command from the TSO/E READY prompt.)
You can invoke BPXBATCH under TSO/E like this:
BPXBATCH SH|PGM program_name [arg1...argN]
where:
- When SH is specified, program_name is the name of a shell command or a file containing a shell script. SH starts a login shell which processes your .profile before running a shell command or shell script. SH is the default; therefore, you can allocate a file containing a shell script to the STDIN ddname, invoke BPXBATCH without any parameters, and the shell script will be invoked.
- When PGM is specified, program_name is the name of an executable file that is stored in a z/OS UNIX file. Inadvertent use of a shell script with PGM may result in a process that will not end as expected, and will require use of the kill -9 pid command to force termination.
- You can supply optional arguments, arg1...argN, to program_name.
- You can invoke BPXBATCH without any parameters on the command line and, instead, place the parameter data in a file or data set defined by STDPARM.
Prior to invoking BPXBATCH, you can allocate any of the resources
discussed previously, using the TSO/E ALLOCATE command with the following
ddnames:
- DDname
- Description
- STDIN
- Standard input (see Defining standard input, output, and error streams for BPXBATCH)
- STDOUT
- Standard output (see Defining standard input, output, and error streams for BPXBATCH)
- STDERR
- Standard error (see Defining standard input, output, and error streams for BPXBATCH)
- STDENV
- Environment variable definitions (see Passing environment variables to BPXBATCH)
- STDPARM
- BPXBATCH parameter data (see Passing parameter data to BPXBATCH)