Python Scripting for z/OS Systems Programmers – Expert Videos
Duration
1 hour
Overview
In the first expert video, Python scripting is introduced, explaining why Python is important to z/OS and what benefits it can provide. An overview of how the IBM Z Open Automation Utilities (ZOAU) is used to allow Python Scripts to interact between z/OS UNIX and z/OS is also presented as well as how to enable, install, configure and validate ZOAU. The presenter then delves into more detailed information, explaining how ZOAU’s features allow Python Scripts to read, write, create, and delete files and datasets, as well as interacting with jobs and issuing operator commands. Also covered is the importance of data serialization across integrated environments, and the differences of using Python scripting in interactive and batch processing. In the final video, important factors that need to be considered when using Python Scripts on z/OS are highlighted.
Audience
This is aimed at Python Application Programmers and z/OS System Programmers.
Prerequisites
A programming background in Python.
Objectives
- After completing this course, the student should be able to:
- Describe how Python and Z Open Automation Utilities (ZOAU) can be used in a z/OS environment
- Use ZOAU to work with files, datasets, and jobs
- Describe Data Serialization Methods
- Describe the Differences Between Invoking Python Scripts Via Interactive and Batch Execution
- Identify and Resolve Common Issues with Using Python on z/OS
Course Content
Why Python for Systems Programming Tasks
Why Python Is Important for z/OS
Benefits of Python
Where Python Is Commonly Used
Planning for Python Script Development
Introducing IBM Z Open Automation Utilities
What is Z Open Automation Utilities (ZOAU)
Capabilities of ZOAU
Enabling and Validating ZOAU on z/OS
Installing and Configuring ZOAU
Using the zoaversion Command
Using the python3 Command
Using the pip3 Command
Using the export Command
Reading and Writing Datasets with ZOAU
Import Statement
Read Function
Write Function
Using Append Arguments
Creating Datasets Using the Create Function
Deleting Datasets Using the Delete Function
Interacting with Jobs and Operator Commands
Submitting Jobs Using the Submit Function
Using the Wait Method to View Job Status
Using the jobs.read_output Function to View Job Output
Purging Job Output Using the Purge Method
Using the opercmd.execute Function to Issue Operator Commands
Using Datasets, Temporary Files, and Load Modules
Importing the os, tempfile, and jobs Modules
Creating a Named Temporary z/OS UNIX File Using the tempfile Function
Using the os.remove Function to Delete Temporary Files
Creating Valid Temporary Datasets Using the temp_name Function
Invoking Load Modules Using mvscmd.execute_authorize Function
Hybrid Integration with Python
Data Sharing in an Integrated Environment
Data Serialization Methods
JavaScript Object Notation (JSON)
Representational State Transfer (REST) APIs
Operationalizing Python Scripts
Interactive Execution vs Batch
Invoking Python Scripts using BPXBATCH
Using the BPXBATCH PARM Parameter to Pass Arguments
Orchestration Tools Invoking Scripts Via Non-Interactive SSH Sessions
Common Issues with Python on z/OS
Securing Credentials and Encrypting Data
Resolving TCP/IP Connectivity Between Platforms
Data Encoding
Tagging and Un-tagging Files