EasyManua.ls Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #19 background imageLoading...
Page #19 background image
Part 1. Learning the REXX Language
The REXX language is a versatile general-purpose programming language that can
be used by new and experienced programmers. This part of the book is for
programmers who want to learn the REXX language. The chapters in this part
cover the following topics.
v Chapter 1. Introduction on page 3 The REXX language has many features
that make it a powerful programming tool.
v Chapter 2. Writing and Running a REXX Exec on page 7 Execs are easy to
write and have few syntax rules.
v Chapter 3. Using Variables and Expressions on page 25 Variables,
expressions, and operators are essential when writing execs that do arithmetic
and comparisons.
v Chapter 4. Controlling the Flow Within an Exec on page 41 You can use
instructions to branch, loop, or interrupt the flow of an exec.
v Chapter 5. Using Functions on page 61 A function is a sequence of
instructions that can perform a specific task and must return a value.
v Chapter 6. Writing Subroutines and Functions on page 69 You can write
internal and external routines that are called by an exec.
v Chapter 7. Manipulating Data on page 85 Compound variables and parsing
are two ways to manipulate data.
Note: Although you can write a REXX exec to run in a non-TSO/E address space
in MVS, the chapters and examples in this part assume the exec will run in a
TSO/E address space. If you want to write execs that run outside of a
TSO/E address space, keep in mind the following exceptions to information
in Part 1:
v An exec that runs outside of TSO/E cannot include TSO/E commands,
unless you use the TSO/E environment service (see note).
v In TSO/E, several REXX instructions either display information on the
terminal or retrieve information that the user enters at the terminal. In a
non-TSO/E address space, these instructions get information from the
input stream and write information to the output stream.
SAY this instruction sends information to the output DD whose
default is SYSTSPRT.
PULL this instruction gets information from the input DD whose
default is SYSTSIN.
TRACE this instruction sends information to the output DD whose
default is SYSTSPRT.
PARSE EXTERNAL this instruction gets information from the input
DD whose default is SYSTSIN.
v The USERID built-in function, instead of returning a user identifier, might
return a stepname or jobname.
Note: You can use the TSO/E environment service, IKJTSOEV, to create a TSO/E
environment in a non-TSO/E address space. If you run a REXX exec in the
TSO/E environment you created, the exec can contain TSO/E commands,
external functions, and services that an exec running in a TSO/E address
space can use. That is, the TSO host command environment (ADDRESS
TSO) is available to the exec. For more information about the TSO/E
environment service and the different considerations for running REXX execs
within the environment, see z/OS TSO/E Programming Services.
© Copyright IBM Corp. 1988, 2001 1

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Summary

Part 1. Learning the REXX Language

Chapter 1. Introduction

Explains the REXX programming language, its features, and suitability for various users.

Chapter 2. Writing and Running a REXX Exec

Details the process of writing, running, and understanding REXX execs, including syntax rules and common issues.

Chapter 3. Using Variables and Expressions

Covers REXX variables, expressions, operators, and tracing techniques for data manipulation and calculations.

Chapter 4. Controlling the Flow Within an Exec

Explains how to alter REXX exec execution using conditional, looping, and interrupt instructions.

Chapter 5. Using Functions

Describes REXX functions, including built-in, user-written, and packages, and how to use them.

Chapter 6. Writing Subroutines and Functions

Guides on writing, calling, and passing information to REXX subroutines and functions.

Chapter 7. Manipulating Data

Covers REXX data manipulation using compound variables, stems, and various parsing techniques.

Part 2. Using REXX

Chapter 8. Entering Commands from an Exec

Explains how REXX execs can interact with the operating system by issuing TSO/E and host commands.

Chapter 9. Diagnosing Problems Within an Exec

Details techniques for diagnosing and debugging REXX execs using tracing and special variables.

Chapter 10. Using TSO/E External Functions

Describes TSO/E external functions available for interacting with the system and performing specific tasks.

Chapter 11. Storing Information in the Data Stack

Explains how to use the REXX data stack for temporary storage, passing information, and managing buffers.

Chapter 12. Processing Data and Input/Output Processing

Covers dynamic REXX expression modification and processing data to/from data sets using EXECIO.

Chapter 13. Using REXX in TSO/E and Other MVS Address Spaces

Explains how to run REXX execs in TSO/E and non-TSO/E MVS address spaces and available services.

Part 3. Appendixes

Appendix A. Allocating Data Sets

Guides on creating and allocating data sets, including checklists for ISPF/PDF and ALLOCATE commands.

Appendix B. Specifying Alternate Libraries with the ALTLIB Command

Details using the ALTLIB command to specify and manage alternative libraries for implicit execution.

Appendix C. Comparisons Between CLIST and REXX

Compares REXX and CLIST languages, highlighting similarities and differences in features and capabilities.

Appendix D. Notices

Provides legal notices, warranty disclaimers, copyright, and trademark information.

Bibliography

TSO/E Publications

Lists IBM publications related to TSO/E, including administration, CLISTs, and general information.

Related Publications

Lists IBM publications related to z/OS MVS and ISPF, covering system programming and administration.

Index

Related product manuals