2. Reference

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:

leopts

Language environment runtime options

-Lloglvl

A switch which enables logging/tracing of COZBATCH. Can be one of -LI (info), -LD (debug), or -LT (trace).

-N

By default, COZBATCH will automatically strip line numbers from columns 73-80 of STDIN. If this is not desired, the -N switch can be supplied to disable this behavior.

-M

This 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=MUST if 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 (in DD: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=value

One or more environment variables to set before running the Unix program.

pgmname

The name of the Unix program or script to execute. By default, the user's default login shell is executed, e.g. "-/bin/sh"

pgmopts

One 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:

SYSOUT

messages from the Co:Z batch utility and the z/OS language environment runtime. This file will be dynamically allocated to SYSOUT=* if not specified.

STDIN

if 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.

STDOUT

stdout output from the Unix program or shell will be directed to this file, or if not present it will be written to the SYSOUT DD. The DD may specify an MVS dataset or JES SYSOUT file.

STDERR

stderr output from the Unix program or shell will be directed to this file, or if not present it will be written to the SYSOUT DD. The DD may specify an MVS dataset or JES SYSOUT file.

STDENV

if 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=VALUE

The 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.

SAVEARGS

if 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 the PARM= 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.


Saint Charles, Missouri
info@coztoolkit.com
+1 636.300.0901

Copyright© 2009 - 2023 Dovetailed Technologies, LLC. All rights reserved. Co:Z® is a registered trademark and Co:Z Toolkit™ is a trademark of Dovetailed Technologies, LLC.

Saint Charles, Missouri
info@coztoolkit.com
+1 636.300.0901

Copyright© 2009 - 2023 Dovetailed Technologies, LLC. All rights reserved. Co:Z® is a registered trademark and Co:Z Toolkit™ is a trademark of Dovetailed Technologies, LLC.