This project demonstrates how to use Python with Z Open Automation Utilities (ZOAU) in USS to interact with z/OS system data. The script retrieves the system LINKLIST and writes it into a sequential dataset, then validates the output using a JCL job.
- Extract system-level data (LINKLIST) from z/OS
- Transform the output into the required dataset format
- Write the data into a sequential dataset
- Validate correctness using a JCL job (CC0000)
- z/OS USS (Unix System Services)
- Python 3
- ZOAU (
zoautil_py) - JCL
- VS Code with Zowe Explorer
-
Created or reused a sequential dataset:
Z87690.COMPLETE -
Used Python (
datasets.create) to ensure correct dataset type
-
Used ZOAU API:
zsystem.list_linklist()
-
Returned system libraries such as:
SYS1.MIGLIB SYS1.CSSLIB SYS1.LINKLIB
-
Converted Python list output into required z/OS dataset format:
- One entry per line
- Preserved single quotes
- Removed list brackets and commas
-
Used:
datasets.write(dsname, linklist_output, append=False)
-
Ensured correct parameter order and formatting
-
Submitted JCL job:
CHKAUTO -
Achieved:
CC 0000 -
Confirmed dataset content met exact formatting requirements
This is the Python script used to extract the z/OS LINKLIST and write it to a sequential dataset.
- Cause: Incorrect argument order in
datasets.write() - Fix: Corrected to
(dsname, data)
- Cause: Output formatting mismatch (missing quotes, brackets present)
- Fix: Reformatted output to match required structure
- Cause: Dataset format and content mismatch with validation job
- Fix: Ensured sequential dataset + exact output formatting
- z/OS workflows require strict formatting precision, not just correct logic
- ZOAU enables direct system interaction using Python
- Understanding dataset types (PDS vs sequential) is critical
- Debugging involved tracing both data flow and system expectations
Successfully built an end-to-end automation workflow:
USS (Python) → ZOAU API → z/OS Dataset → JCL Validation
- Extend script to automate job submission using
jobs.submit() - Explore additional ZOAU modules for system monitoring and automation
