16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The stdenv file consists of one or more records, where record is defined as a<br />

string terminated with a character (X'15') in an z/<strong>OS</strong> <strong>UNIX</strong> file, or a<br />

fixed or variable (nonspanned) format record in an MVS data set. Other MVS<br />

record formats are not supported for stdenv. The following rules apply to the<br />

specification of environment variables in stdenv files:<br />

v Only one environment variable can be specified per record.<br />

v Each environment variable is specified as variable=value.<br />

v Environment variable names must begin in column 1, unless names<br />

beginning with blanks are used.<br />

v Environment variable records should not be terminated with null characters<br />

(X'00'). BPXBATCH automatically appends a null character to the end of<br />

each environment variable, and the lengths of environment variables as<br />

seen by the program include the null characters.<br />

v Trailing blanks (X'40') are truncated for MVS SYSIN data sets, but are not<br />

truncated for any other type of file.<br />

v Be careful that sequence numbers are not present in MVS data sets,<br />

because they will be treated as part of the environment variables. ISPF edit<br />

users should always set number mode off when creating environment<br />

variables, including JCL data sets with environment variables specified as<br />

SYSIN.<br />

Some environment variables are release-dependent. If BPXBATCH is executed<br />

on a system that does not support the environment variable, you will not get an<br />

error message and the variable will be ignored. Use the uname shell<br />

command to determine the release number of the operating system that<br />

BPXBATCH is running on.<br />

Environment variables (including PATH) are established at the start of the<br />

executable program, not for BPXBATCH itself. Thus, PATH is not searched to<br />

locate the program, but instead is used if the program invokes other<br />

executable programs. In the following example, someprogram may be found<br />

only in the initial working directory defined by the user’s profile, not by the<br />

PATH environment variable:<br />

//jobname JOB ...<br />

//stepname EXEC PGM=BPXBATCH,PARM=’PGM someprogram parm1 parm2’<br />

//STDOUT DD PATH=’/tmp/pgmout’,PATHOPTS=(OWRONLY,OCREAT,OTRUNC),<br />

// PATHMODE=SIRWXU<br />

//STDENV DD *<br />

PATH=/bin:/u/usr/joeuser<br />

STEPLIB=SYS1.JOE.STEPLIB<br />

/*<br />

12. BPXBATCH uses two more environment variables for execution that are<br />

specified by STDENV:<br />

v _BPX_BATCH_UMASK=0755<br />

v _BPX_BATCH_SPAWN=YES|NO<br />

BPXBATCH<br />

_BPX_BATCH_UMASK allows the user the flexibility of modifying the<br />

permission bits on newly created files instead of using the default mask (when<br />

PGM is specified).<br />

Note: This variable will be overridden by umask (usually set from within<br />

/etc/profile) if BPXBATCH is invoked with the ’SH’ option (SH is the<br />

default). SH causes BPXBATCH to execute a login shell which runs the<br />

/etc/profile script (and runs the user’s .profile) and which may set the<br />

umask before execution of the intended program.<br />

Appendix D. Running shell scripts or executable files under MVS environments 897

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!