The Co:Z Batch utility may be executed in a batch job step using the following statement:
//step EXEC PGM=COZBATCH,
// PARM='{leopts}/{-Lloglvl} {-N} {-M} {envvar=value}* {pgmname {pgmopts}}'
The PARM keyword and values are optional, and defined as:
leoptsLanguage environment runtime options
-LloglvlA switch which enables logging/tracing of COZBATCH. Can be one of
-LI(info),-LD(debug), or-LT(trace).-NBy default, COZBATCH will automatically strip line numbers from columns 73-80 of
STDIN. If this is not desired, the-Nswitch can be supplied to disable this behavior.-MThis switch forces the target program or script to run in the same address space. This is not necessary by default since COZBATCH sets the environment variable
_BPX_SHAREAS=MUSTif it is not already set. This feature was added in release 4.5.0 for cases where it is desirable to explicitly set_BPX_SHAREAS=NO(inDD:STDENV), but invoke the target program in the same address space anyway. See: Using SMF type/subtype specific permissions for an example of where this is useful.envvar=valueOne or more environment variables to set before running the Unix program.
pgmnameThe name of the Unix program or script to execute. By default, the user's default login shell is executed, e.g. "-/bin/sh"
pgmoptsOne or more arguments to the program, which may be double-quoted if necessary to allow spaces within an argument.
The following DDs may be used, although none are required:
SYSOUTmessages from the Co:Z batch utility and the z/OS language environment runtime. This file will be dynamically allocated to
SYSOUT=*if not specified.STDINif present, this file will be read and directed as input to the Unix program or shell. An MVS dataset or JES SYSIN spool file may be used, in which case it it read as a text file such that records are separated by newline characters with trailing spaces removed from each record. If a shell is used, the input is a script subject to normal shell processing.
STDOUTstdoutoutput from the Unix program or shell will be directed to this file, or if not present it will be written to theSYSOUTDD. The DD may specify an MVS dataset or JES SYSOUT file.STDERRstderroutput from the Unix program or shell will be directed to this file, or if not present it will be written to theSYSOUTDD. The DD may specify an MVS dataset or JES SYSOUT file.STDENVif present, this DD will be read by the language environment runtime and be used to set environment variables for the program. Each record or line in the file must be of the form:
VAR=VALUEThe following special environment variables may be set:
SHELL can be set to override the user's default login shell.
COZ_FILE_TAG=STDIN if set, stdin input to the program from DD:STDIN will be tagged with the current locale codepage, normally IBM-1047.
SAVEARGSif present, this DD will be read for environment variables (after STDENV). Each record must be in the form
VAR=VALUE. In addition, any variables settings in thePARM=field will be written to the end of this file. See Chapter 3, Examples for more information on using this to pass arbitrary numbers/length JCL variables in environment variables. Note that variables set via the STDENV DD are not written to this file.
