REXX – Working in the TSO Environment
Duration
4 hours
Overview
This course introduces REXX programming tailored specifically for the TSO environment. It starts by exploring two key methods for reading and writing data from z/OS data sets: EXECIO and Stream I/O. The course also covers a variety of TSO REXX functions used to retrieve information from, and interact with, the z/OS system.
Audience
Personnel responsible for writing or maintaining REXX programs in a TSO environment.
Prerequisites
Knowledge of traditional REXX programming covered earlier in this curriculum.
Objectives
After completing this course the student should be able to:
- Describe how the EXECIO command is used to read from, and write to, z/OS data sets
- Identify the functions used with Stream I/O
- List special REXX Functions that can be used only in a TSO environment
Course Content
TSO File Control Commands
Using the EXECIO Command
Types of Data That Can be Accessed with EXECIO
Benefits of Using EXECIO
Allocating and Freeing Data Sets
Reading Data Set Content Using the DISKR Operand
Storing Data in Compound Variables
EXECIO Return Codes
Writing to Data Sets Using the DISKW Operand
Writing Tips
Updating Existing Data Sets Using the DISKRU Operand
DISKRU Usage Scenarios
Stream I/O
What is Stream I/O?
Stream I/O Installation
Comparing EXECIO to Stream I/O
Input and Output Data Sets
Steam I/O Functions
Opening and Closing a Stream
Query Commands
Streaming By Character Using CHARIN and CHAROUT Functions
Line-Oriented I/O Using LINEIN and LINEOUT Functions
Using CHARS and LINES Functions to Determine Remaining Data
TSO Special Functions
Retrieving Data Set Information Using the LISTDSI Function
Verifying Data Set Existence Using the SYSDSN Function
Enabling TSO Command Prompting using the PROMPT Function
Capturing Command Output Using the OUTRAP Function
Obtaining MVS Information Using the MVSVAR Function
Using the MSG Function to Display or Hide TSO Messages
Trapping REXX Messages Using the TRAPMSG Function
Retrieving Console Messages Using the GETMSG Function