Installing and configuring ZOAU
System requirements
- IBM Z Open Automation Utilities has the following requirements.
Software requirements
-
ZOAU is supported on z/OS 2.4 or later.
-
Before installing ZOAU, you must be running job entry subsystem 2 (JES2) on your installation. Learn more at z/OS JES2.
Toolkit disk space
- ZOAU requires approximately 3000 tracks (200 cylinders) of 3390 disk space for product installation.
Optional programs and installed items
- To use Python with ZOAU, you must install IBM Open Enterprise SDK for Python version 3.9 or later. Learn more at IBM Open Enterprise SDK for Python.
- A samples directory is distributed as part of the ZOAU install. To learn more, see Directory structure.
Installing ZOAU on z/OS
You can install ZOAU via pax or SMP/E.
Install via pax
To download and install ZOAU via pax:
- Navigate to Mainframe DEV.
- Search for product name "IBM Z Open Automation Utilities" listed under IBM Enterprise DevOps.
- Press Download and agree to the Software License Agreement.
- Save the
zoau-<version>.pax.Z
file. - Transfer
zoau-<version>.pax.Z
to your z/OS host by using binary mode. - Install ZOAU on z/OS by issuing the command:
pax -ppx -rf zoau-<version>.pax.Z
Install via SMP/E
To install ZOAU on z/OS via SMP/E, see the Program Directory for IBM Z Open Automation Utilities.
Directory structure
The results of the ZOAU installation are a z/OS UNIX directory found at /usr/lpp/IBM/zoautil
and a data set containing sample members used for the installation. The zoautil
directory contains these subdirectories:
Subdirectory | Usage |
---|---|
bin | Executable programs |
docs | Man pages, message catalogs, and other supporting documentation |
include | Header files |
lib | API DLL files |
LICENSES | ZOAU licenses |
samples | C and Python code samples |
zoautil_py-stubs | Optional Python stub files |
Configuring ZOAU
Complete the following procedure to configure ZOAU.
Set environment variables
-
Set the following environment variable as shown:
export _BPXK_AUTOCVT=ON
-
Create a
ZOAU_HOME
environment variable that points to the location where ZOAU is installed.export ZOAU_HOME=<PATH_TO_ZOAU>
-
Add ZOAU to the
PATH
environment variable.export PATH=$PATH:$ZOAU_HOME/bin
-
Add ZOAU to the
LIBPATH
environment variable.export LIBPATH=$LIBPATH:$ZOAU_HOME/lib
-
(Optional) To use the supplied man pages and view them with the
man
command, update theMANPATH
environment variable.export MANPATH=$MANPATH:$ZOAU_HOME/docs/%L
-
(Optional) If the user ID that will be running ZOAU commands does not have write access to the high-level qualifier (HLQ) matching its username, use the
TMPHLQ
environment variable to specify a different HLQ.export TMPHLQ=WRITEHLQ
Install ZOAU Python APIs (optional)
To use the ZOAU Python APIs, use only one of the following installation methods:
- Python wheel installation method
- Python setuptools installation method
- PYTHONPATH environment method
Python wheel installation method
The Python wheel installation method requires ZOAU version 1.2.3 or later. Python 3.12 support requires ZOAU version 1.2.5.1 or later.
A wheel file is a ZIP-format archive with a specially formatted file name followed by the .whl
extension. It contains a precompiled python module ready to install. Current Python versions support this installation method.
The ZOAU pax archive contains a .whl
file for each of the currently supported versions of IBM Open Enterprise SDK for Python. In the following table, <zoauversion>
represents the ZOAU version included in the
pax archive. For example, the .whl
file for IBM Open Enterprise SDK for Python version 3.11 for ZOAU version 1.2.3 has the file name zoautil_py-1.2.3-cp311-none-any.whl
.
Filename | IBM Open Enterprise SDK for Python version |
---|---|
zoautil_py-<zoauversion>-cp39-none-any.whl |
3.9 |
zoautil_py-<zoauversion>-cp310-none-any.whl |
3.10 |
zoautil_py-<zoauversion>-cp311-none-any.whl |
3.11 |
zoautil_py-<zoauversion>-cp312-none-any.whl |
3.12 |
Important: The Python wheel installation method performs version matching against the .whl
file name. Any modification to the file name can break and corrupt the module installation.
-
To install the ZOAU API with wheel, run the following command after replacing
<zoauversion>
with your version of ZOAU (including dots, such as1.2.3
), and<pythonversion>
with your version of IBM Open Enterprise SDK for Python (excluding dots, such as311
):pip3 install zoautil_py-<zoauversion>-cp<pythonversion>-none-any.whl
Note for users of IBM Open Enterprise SDK for Python 3.9: A bug in Python 3.9 causes the ZOAU extension module to be installed with incorrect permissions and file tag. To fix this, apply IBM Open Enterprise SDK for Python 3.9 APAR/PTF PH55814/UI92787. Alternatively, issue the the
chmod +x
andchtag -b
commands for the ZOAU .so files, which are usually located in the active Python/lib
directory. These commands add execute permission and properly set the file tag to "binary".chmod +x <Python Library Path>/lib/python3.*/site-packages/zoautil_py/*.abi3.so chtag -b <Python Library Path>/lib/python3.*/site-packages/zoautil_py/*.abi3.so
Use the
type
command to find the the activepython
directory.~$ type python python is /u/IBMUSER/venv1/bin/python
In this case, the active Python library path would be
/u/IBMUSER/venv1/
.
Python setuptools installation method
This method provides pip package manager features and attempts to build Cpython source code for guaranteed PYZ version compatibility.
Note: If you are running IBM Open Enterprise SDK for Python version 3.9 or 3.10 and you want to use the Python setuptools method, you must use the IBM XL C/C++ compiler. If you are running ZOAU version 1.2.2.1 (or later) and IBM Open Enterprise SDK for Python version 3.11 (or later), you can use either the IBM XL C/C++ compiler or the IBM C/C++ for Open Languages Clang compiler.
-
If not already done, set the environment variables.
-
Create a virtual environment by using the following commands:
python3 -m venv env source env/bin/activate
-
Find the pip installable package, which is included in the ZOAU pax file. Follow the Installing via pax procedure to download and extract the pax file, from which you can get
zoautil_py-<version>.tar.gz
. -
Install the pip installable package for ZOAU Python APIs with the following command:
pip3 install zoautil_py-<version>.tar.gz
PYTHONPATH environment method
Note: The PYTHONPATH environment method is not recommended for installation. Use the Python wheel installation method.
The PYTHONPATH environment method sets the PYTHONPATH environment variable to point to the zoautil_py
directory path containing ZOAU Python APIs and a precompiled binary. The script configure.py
checks for and makes the precompiled binary compatible with the present IBM Open Enterprise SDK for Python (PYZ) version on the system.
-
Set the following environment variables:
export PYTHONPATH=${PYTHONPATH}:${ZOAU_HOME}/lib
-
Run the
configure.py
python script to create any required symbolic links to the python shared library. Note that this requires write access to the Python installation directory.cd ${ZOAU_HOME}/lib/zoautil_py/config python3 configure.py
Python stub files
A zoautil_py-stubs
directory that contains optional Python stub files is included as part of your ZOAU installation. To import the stub files into your preferred development environment, see your environment's
documentation.