
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 = n 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 User’s Guide
Summary of Contents for TSO/E REXX
Page 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 2: ......
Page 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Page 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Page 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Page 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Page 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Page 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Page 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Page 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Page 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Page 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Page 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Page 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Page 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Page 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Page 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Page 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Page 241: ......