Installing and configuring HCL ZAI Abend Intelligence
About this task
Deploy the on-host HCL ZAI Abend Intelligence pipeline to z/OS UNIX System Services (USS) to enable real-time AI analysis of application abends.
For general information about this enhancement, see The AI analysis report.
To install HCL ZAI Abend Intelligence:
Procedure
-
Download Python 3.10 from https://www.python.org/downloads/ and deploy it and the required packages to
your z/OS UNIX System Services (USS) environment. The required packages are
found in data set HFZ.SHFZDOC1
member HFZZREQ. The Python
engine imports components from the
schemasandcustom_exceptionspackages. You must recreate this mandatory package subdirectory structure on your USS environment. If copied to a flat directory, the startup fails.src/ ├── HFZZMAIN.py # entry point ├── HFZZUTIL.py ├── HFZZCNST.py ├── HFZZCONF.py ├── HFZZREQ.txt # dependency pins ├── schemas/ │ ├── HFZZFDIN.py │ ├── HFZZFDEX.py │ └── HFZZFILE.py └── custom_exceptions/ └── HFZZEXCP.pyImportant:Thepyzfilerequired package only works on Python 3.10. If using Python 3.11, IBM Z Open Automation Utilities (ZOAU) is mandatory. - Create an FB 80 data set containing your LLM credentials and environment definitions. For details, see The STDENV environment variables for Abend Intelligence.
-
Register the HCL ZAI Abend Intelligence user exits via
the
HFZOPTSDDname in your abending test job.DATASETS(HFZEXEC(HFZ.SHFZSAM1)) EXITS( NOTIFY(REXX(HFZSUEAN)) FORMAT(REXX(HFZSSHOW)) )The HFZSUEAN and HFZSSHOW user exits are provided in the HFZ.SHFZSAM1 data set. Ensure these exits are available to Z Abend Investigator via the HFZEXEC DDname.- HFZSUEAN
- This is a Z Abend Investigator Notification user exit written in REXX that captures
environment variables from the active fault recording session,
invokes the orchestration launcher (HFZSBFCR) to
build a JSON payload in /tmp/, and submits an asynchronous job
to the internal reader to analyze the failure using a large
language model (LLM). Verify or change the AI Service Configuration definitions in this exit as appropriate for your installation:
Table 1. HFZSUEAN REXX Exit Configuration Variables Variable Name Example Value Description LLM_PROTOCOL_TO_USE'watsonx'or'ollama'Specifies the target large language model backend protocol: LLAMAorWATSONX.LLM_SERVICE_ENDPOINT'http://13.82.3.70:11434'Specifies the base URL of the LLM endpoint (required for Ollama). LLM_MODEL_TO_USE'llama3:latest'or'ibm/granite-3-8b-instruct'Specifies the model identifier to invoke on the AI backend. USE_SOURCE_CODEYESAttempts DWARF/LANGX/LISTING source extraction. PROGRAM_MODEBFOnly BF is supported. PYTHON_EXEC_TO_USE'/usr/lpp/IBM/cyp/v3r10/pyz/bin/python3'Specifies the fully qualified USS path to the Python 3.10 executable. PYTHON_MAIN_TO_USE'/usr/local/bin/fai/src/HFZZMAIN.py'Specifies the fully qualified USS path to the HFZZMAIN.pyentry point.STDENV_TO_USEUSERID()"ZAI.ENVS(LOCALENV)"Specifies the RACF-protected FB 80data set containing API credentials shown in step 1.HFZOPTS_TO_USEUSERID()".ZAI.OPTIONS(ZAIOPTS)"HCL ZAI Abend Intelligence options data set used in the generated JCL. No specific options are required to enable HCL ZAI Abend Intelligence. USE_ZOAU_MODENOSetting this variable to YESpassesUSE_ZOAU=YESinto the JSON payload. - HFZSSHOW
- This is a Z Abend Investigator Formatting user exit written in REXX that reads the Markdown report data set <userid>.ZAI.REPORT(<fault_id>) and converts Markdown elements to Z Abend Investigator Formatting user exit tags (see Formatting tags).
- Submit the abending test job with a sample JSON payload in /tmp/ to verify outbound TCP/IP connectivity to your LLM endpoint.
-
Verify the installation. You can verify the installation in the following
ways:
- JES Spool Check: Open
STDOUTfrom the automatically submitted HCL ZAI Abend Intelligence BPXBATCH job in SDSF and verify that the step finishes withRC=0and displays the### FAI Job Summary ###block withStatus: Success.Note:A return code of RC=253 indicates that the pipeline executed successfully, but the LLM endpoint timed out or was unreachable over TCP/IP. Verify TCP/IP firewall rules and theLLM_SERVICE_ENDPOINTsetting inHFZSUEAN. - AI Report Data Set Member Check: View data set
<userid>.ZAI.REPORT(<fault_id>), where<fault_id>is the fault ID created by the test job in step 4, using for example ISPF 3.4 to verify that the Markdown report content was written. - Z Abend Investigator Report Check: Perform reanalysis of the fault entry written in step 4 and confirm that the AI report is included in the User section of the report.
- JES Spool Check: Open
- If the testing in step 5 was successful, propagate the HFZOPTS DDname options in step 3 to the HFZCNFxx parmlib member to make HCL ZAI Abend Intelligence available to all jobs and users.