Setting and accessing environment variables
You can set environment variables for z/OS® UNIX COBOL programs either from
the shell with commands
or from the program.
Although setting and resetting environment variables from the shell before you begin to run a program is a typical procedure, you can set, reset, and access environment variables from the program while it is running.
If you are running a program with BPXBATCH,
you can set environment variables by using an
STDENV DD statement.
reset an environment variable as if it had not been set, use the z/OS UNIX shell command
To reset an environment variable from a COBOL program, call the setenv()
To see the values of all environment variables,
export command with no parameters. To access
the value of an environment variable from a COBOL program, call the
Running in z/OS UNIX environments
Setting environment variables that affect execution
Accessing main program parameters under z/OS UNIX
Running OO applications under z/OS UNIX
Setting environment variables under z/OS UNIX
Runtime environment variables
Language Environment® Programming Reference
MVS™ Program Management: User's Guide and Reference