z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Building a STEPLIB environment: The STEPLIB environment variable

z/OS UNIX System Services User's Guide
SA23-2279-00

Traditionally, some MVS™ users have preferred to alter the search order for MVS executable files when they are running a new or test version of an application program, such as a runtime library. To do this, they code a STEPLIB DD statement on the JCL used to run the application. Accessed ahead of LINKLIB or LPALIB, a STEPLIB is a set of private libraries where the new or test version of the application is stored.

The STEPLIB environment variable provides the ability to use a STEPLIB when running a z/OS UNIX executable file. This variable is used to determine how to set up the STEPLIB environment for an executable file. The STEPLIB environment variable should always be exported.

You can set the variable in one of three ways:
Table 1. Three ways to set the STEPLIB environment variable (z/OS® shell)
Statement Action
STEPLIB=CURRENT Passes on any currently active TASKLIB, STEPLIB, or JOBLIB allocations from the invoker's MVS program search order environment to the environment created for the executable file to run in. Any STEPLIB environment in the invoker's process image is recreated in the new process image for the executable file when the file is invoked. This is the default value that is set if no STEPLIB variable is specified.

If an application uses fork(), spawn(), or exec(), the STEPLIB data sets must be cataloged.

STEPLIB=NONE Specifies that no STEPLIB environment should be set up for executable files.
STEPLIB=DSN1:DSN2:DSN3 Sets up a library search order for the STEPLIB, in the order that the data sets are specified. You can specify up to 255 fully qualified data set names, separated by colons. For example:
export STEPLIB=SMITH.C.LOADLIB:SMITH.PL1.LOADLIB
The specified data sets must be cataloged MVS load libraries that you have security access to. The data sets specified here are built into a STEPLIB environment for the executable file.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014