IBM® ZCodeScan is provided as a Python package, which allows for
usage on a multitude of operating systems. The package must be installed in Python to become
functional. Install the IBM ZCodeScan core package on a distributed
environment in x86 or Linux on Z.
Installing the requisites and IBM ZCodeScan
If you use IBM ZCodeScan on a distributed environment (x86 or
Linux on Z), install the IBM ZCodeScan Python modules.
If you plan to use
IBM ZCodeScan on
z/OS, complete the following steps:
Note: The following steps require you to be active on the (
z/OS) UNIX command line. In
z/OS, you can use the OMVS TSO command. To return to TSO, use the
exit command:
export PYTHONHOME=/usr/lpp/IBM/cyp/pyz
export PATH=$PYTHONHOME/bin:$PATH
export _BPXK_AUTOCVT=ON
- Set the environment variables
- Your command shell must be able to find the Python executable files. On z/OS, the command shell must also allow scripts that are not EBCDIC
encoded. To do so, set the environment variables by using the following commands:
- Create a Python virtual environment
- Creating a virtual environment is recommended to isolate the Python package installation. You
can then manage separate package installations for different projects and test the
installations
- To create a virtual environment named akf in the
/global/opt/pyenv directory,
enter the following command:python3 -m venv /global/opt/pyenv/akf
- Next, you must activate the virtual environment with the following
command:
/global/opt/pyenv/akf/bin/activate
Note: If you use a bash shell,
you can use the
source command instead of the
. command. For example, you can enter
the following command:
source /global/opt/pyenv/akf/bin/activate
- Get the IBM ZCodeScan installable files that are present on
z/OS
- These files were created on z/OS when the IBM ZCodeScan FMID was installed through SMP/E, as described in the IBM ZCodeScan Program Directory.
- By default, the SMP/E installation created the
/usr/lpp/IBM/akf
z/OS UNIX directory. This directory contains the
installable files for usage on z/OS, and a
tar subdirectory that contains the zcodescan.tar file.
- The
zcodescan.tar file can be sent to a distributed environment (x86 or
Linux on Z) for the installation of IBM ZCodeScan on that system. You can extract the installable files from the
file by using the following command:tar -xvf zcodescan.tar
- The installable files are wheel files. A wheel file is a ZIP-format archive with a specially
formatted file name followed by the .whl extension. It contains a pre-compiled Python module ready
to install. The current Python versions support this installation method.
- The
/usr/lpp/IBM/akf directory contains a .whl file for each of the currently
supported versions of IBM Open Enterprise SDK for
Python. The following table
lists the IBM ZCodeScan .whl files, the environments where they can
be used, and the corresponding versions of IBM Open Enterprise SDK for
Python.
Table 1.
| File name |
Execution environments |
Python versions |
zcodescan-1.0.1.1-py3.13-none-any.whl |
Window, Linux, macOS or z/OS |
3.13 |
zcodescan-1.0.1.1-py3.12-none-any.whl |
Window, Linux, macOS or z/OS |
3.12 |
zcodescan-1.0.1.1-py3.11-none-any.whl |
Window, Linux, macOS or z/OS |
3.11 |
Warning: The Python wheel installation method performs version matching
against the .whl file name. Any modification to the file name can break and corrupt the
installation.
- Install the requisites
- The
/usr/lpp/IBM/akf directory contains a dependencies directory that contains
all the upstream libraries needed for IBM ZCodeScan.
- In the folder where you have unpacked the .tar file, issue the following
command:
pip3 install --no-deps --no-cache-dir -r dependencies/requirements.txt --no-index --find-links dependencies
- Install IBM ZCodeScan
- Now that Python has access to the requisite libraries, you can install IBM ZCodeScan.
- Enter the following installation command, where
X represents the Python version
in the IBM ZCodeScan wheel file. For example, the wheel file can be
zcodescan-1.0.1.1-py3.13-none-any.whl.pip3 install --no-deps --no-cache-dir zcodescan-1.0.1.1-py3.X-none-any.whl
Note:
If you are not the administrator of the environment where you install
IBM ZCodeScan, and if you are not installing
IBM ZCodeScan in a virtual environment, the
IBM ZCodeScan binary files are installed in your home folder
($HOME/.local/bin). In this case, before you validate the
IBM ZCodeScan installation, you must add this folder to the
PATH environment variable with the following
command:
export PATH=$PATH:$HOME/.local/bin
- Validate the IBM ZCodeScan installation
- To do so, verify that all the IBM ZCodeScan command-line
interface (CLI) modules are correctly installed by triggering the help options of the various CLI
modules with the following commands:
zcodescan -h
- All these commands must display the command arguments.