Part 1. Learning The Rexx Language - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

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
v "Chapter 2. Writing and Running a REXX Exec" on page 7 — Execs are easy to
v "Chapter 3. Using Variables and Expressions" on page 25 — Variables,
v "Chapter 4. Controlling the Flow Within an Exec" on page 41 — You can use
v "Chapter 5. Using Functions" on page 61 — A function is a sequence of
v "Chapter 6. Writing Subroutines and Functions" on page 69 — You can write
v "Chapter 7. Manipulating Data" on page 85 — Compound variables and parsing
Note: Although you can write a REXX exec to run in a non-TSO/E address space
Note: You can use the TSO/E environment service, IKJTSOEV, to create a TSO/E
© Copyright IBM Corp. 1988, 2001
that make it a powerful programming tool.
write and have few syntax rules.
expressions, and operators are essential when writing execs that do arithmetic
and comparisons.
instructions to branch, loop, or interrupt the flow of an exec.
instructions that can perform a specific task and must return a value.
internal and external routines that are called by an exec.
are two ways to manipulate data.
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.
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.
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents