EasyManuals 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 #26 background imageLoading...
Page #26 background image
TSO/E ALLOCATE command. For specific information about allocating a data set
for an exec, see Appendix A. Allocating Data Sets on page 185.
What is a REXX Exec?
A REXX exec consists of REXX language instructions that are interpreted directly
by the REXX interpreter or compiled directly by a REXX language compiler and
executed by a Compiler Runtime Processor. An exec can also contain commands
that are executed by the host environment.
An advantage of the REXX language is its similarity to ordinary English. This
similarity makes it easy to read and write a REXX exec. For example, an exec to
display a sentence on the screen uses the REXX instruction SAY followed by the
sentence to be displayed.
Example of a Simple Exec
/**************************** REXX *********************************/
SAY 'This is a REXX exec.'
Note that this simple exec starts with a comment line to identify the program as a
REXX exec. A comment begins with /* and ends with */. To prevent
incompatibilities with CLISTs, IBM recommends that all REXX execs start with
a comment that includes the characters “REXX” within the first line (line 1) of
the exec. Failure to do so can lead to unexpected or unintended results in
your REXX exec. More about comments and why you might need a REXX exec
identifier appears later 14.
When you run the exec, you see on your screen the sentence:
This is a REXX exec.
Even in a longer exec, the instructions flow like ordinary English and are easy to
understand.
Example of a Longer Exec
/**************************** REXX *********************************/
/* This exec adds two numbers and displays their sum. */
/*******************************************************************/
SAY 'Please enter a number.'
PULL number1
SAY 'Now enter a number to add to the first number.'
PULL number2
sum = number1 + number2
SAY 'The sum of the two numbers is' sum'.'
When you run the example, the exec interacts with you at the terminal. First you
see on your screen:
Please enter a number.
Before You Begin
8
z/OS V1R1.0 TSO/E REXX Users Guide

Table of Contents

Questions and Answers:

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

Related product manuals