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