GT08 - REXX Programming Workshop (including ISPF Dialog Manager) - 5 Days

Course Description

This course covers all aspects of programming with REXX. During the course the student is taught how to write and test programs that issue TSO commands, manipulate MVS datasets and DB2 Tables, access the REXX Datastack, manipulate string data, perform conditional logic and arithmetic, and use functions.

The student is also introduced to ISPF Dialog Management commands and is shown how to create applications containing ISPF Panels, Messages, Skeletons and Tables.


Pre-requisites

The delegate should be familiar with the z/OS host environment, together with a working knowledge TSO / ISPF. Experience with another mainframe programming language is advantageous.

A knowledge of DB2 is beneficial but not essential.


Objectives

The aim of this course is to provide the programmer with the necessary skills required to design, write, code and test REXX programs that interact with TSO and ISPF Dialog Manager.

On completion of this course the student will be able to:

  • develop Structured REXX Programs
  • understand and use REXX Verbs
  • use conditional logic in a REXX program
  • use REXX parsing commands
  • access the Data Stack
  • use REXX to access datasets
  • use REXX to run TSO commands
  • Develop and use REXX Functions
  • Develop REXX Programs that interface with ISPF Panels, Tables, Messages and Skeleton data
  • Interactively test and debug REXX programs
  • Develop REXX programs to access DB2 data
  • Develop simple REXX edit macros


Environment

Development will be performed using REXX running on a z/OS Platform.


Customisation

For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.


Course Details

INTRODUCTION
What Is REXX?
Rexx Is Interpretative
Simple Examples
Building REXX Programs

PROGRAM EXECUTION
Execution Of REXX Programs From A Member List
Tso Execution Of REXX Programs
System Definition Of REXX Programs
Dynamic Concatenation Of REXX Datasets
Viewing The ISPF Concatenation
Batch Execution Of REXX Programs

BASIC SYNTAX
Commencing A REXX Program - Comments
Terminating A REXX Program - Exit
Variables
Assigning Values To Variables
Assigning Values - Use Of Quotation Marks
Re-Initialising Variables - Drop
Concatenating Variables
Sending Data To The Terminal - Say
Receiving Data From The Terminal - Pull
Statement Continuation
Variables And Arithmetic
Evaluation Sequence
Numbers Supported
Altering Precision
Altering Precision For Comparisons

TEXT PARSING
Parsing Words Separated By Spaces
Parsing Words Separated By A Given String
Parsing Words By Specific Position
Disregarding Portions Of A String
Parsing Program Arguments
Parsing Instructions Summary
Interpret

PROGRAM FLOW AND CONTROL
Conditional Testing Variables - If / Then / Else
Nested If Statements
The Select Statement
Comparison Operators
Combining Comparisons - Logical Operators
Program Loops
Do
Do Forever
Do While
Do Until
Loop Summary
Iterate and Leave
Using Leave / Iterate Within Nested Loops
Interrupting Endless Loops

COMPOUND VARIABLES
Compound Variables
Testing For Initialised Occurrences
Trapping The Number of Elements
Non Numeric Subscripts
Multi-Dimensional Arrays
Re-Initialising Variables - Drop

SUBROUTINES
Internal Subroutines
External Subroutines
Passing Data to Subroutines
Receiving Arguments Into Subroutines
Returning Data To The Calling Program
Writing A Function
Internal Subroutines - The Procedure Statement
Receiving Arguments Into Main Line Programs
Label Look-Aside Table

FUNCTIONS
Built-in Function Summary
Abbrev
Abs
Address
Arg
B2X
C2D
C2X
Center / Centre
Compare
Copies
D2C
D2X
Datatype
Date
Delstr
Delword
Digits
Find
Format
Fuzz
Index
Insert
Justify
Lastpos
Left
Length
Listdsi
Max
Min
Msg
Outtrap
Overlay
Pos
Queued
Random
Reverse
Right
Sign
Space
Strip
Substr
Subword
Symbol
Sysdsn
Sysvar
Time
Translate
Trunc
Upper
Userid
Verify
Word
Wordindex
Wordlength
Wordpos
Words
X2B
X2C
X2D
User Defined Functions
Subroutine / Function Search Order

THE DATA STACK
Datastack Manipulation
Queuing
Stacking
NEWSTACK And DELSTACK
MAKEBUF And DROPBUF
Data Stack Query Commands

EXTERNAL COMMANDS
Executing TSO Commands
The Address Command
Allocating Datasets
Freeing Datasets
Execio - Reading And Writing To Files
Execio - Return Codes
Reading Records Into A Compound Variable
Writing Records From A Compound Variable
Reading Records Into The Data Stack
Writing Records From The Data Stack
Appending Data To A File
Copying A Dataset
Deleting And Renaming Datasets
Clearing The Screen
Editing And Browsing A Dataset
Suppression Of System Messages
TSO Command Reference Summary

DB2 ACCESS USING REXX
Setting the Environment
Connecting to a DB2 Subsystem
Sample Code
Executing SQL Statements - Execsql
Host Variables
The Prepare Statement
Cursor Processing
C1 to C100
C101 to C200
S1 to S100
Selecting Data - Cursor Processing
Null Indicators
SQLCA
Isolation Level
Calling Stored Procedures Via REXX
Sample Program
DB2 Access Via The Tivoli CAF Interface
Drl1sqlx Example
Drl1sqlx Input Variables
Drl1sqlx Output Variables

PROGRAM TESTING
Trapping Errors
Signal And Call
Trace
ISPF Dialog Testing

DIALOG MANAGER
ISPF Dialog Manager Services
Dynamic Concatenation Of ISPF Datasets
The Model Command

DIALOG MANAGER PANELS
Panels
Panel Sections
Selection Panels
Data Entry Panels
Pop-Up Panels
Point-And-Shoot Selection Panels
Action Bar Control Panels
Options for the )ATTR Section
Further Options For The )BODY Section
Variable Manipulation within Panels
VER (Verify) Statements
REXX Code - Displaying a Panel
REXX Code - Displaying a Pop-Up Panel
Rexx Code - Cursor Positioning
Saving And Retrieving Variables
The Newappl and Newpool Parameters
REXX Code - Selecting the Required Pool
VPUT And VGET Statements

DIALOG MANAGER MESSAGES
Message Definitions
Error Message Naming Syntax
Error Message Content
Predefined Messages
Error Message Parameters
Displaying An Error Message in REXX

DIALOG MANAGER TABLES
Dialog Manager Table Services
Creating A Table
Writing To A Table
Table Display - Scrollable Panels
Displaying A Table within a Scrollable Panel
Selecting / Updating The Table Display
Positioning The Pointer
Closing A Table
Table Level Services
Row Level Services

DIALOG MANAGER SKELETONS
Skeleton Members - File Tailoring
File Tailoring Control Statements
File Tailoring Control Characters
The )BLANK Statement
The )CM Statement
The )DEFAULT Statement
The )DOT and )ENDDOT Statements
The )IM Statement
The )SEL and )ENDSEL Statements
The )SET Statement
The )TB Statement
File Tailoring Example

LIBRARY MANAGEMENT SERVICES
Library Management Services

ISPF EDIT MACROS
What is a Macro?
Macro Syntax
Passing Parameters To Macros


Course Enquiry