
When you type a number, for example 42, and press the Enter key, the variable
number1
is assigned the value 42. You then see another sentence on the screen.
Now enter a number to add to the first number.
When you enter another number, for example 21, the variable
number2
is assigned
the value 21. Then the values in
number1
and
number2
are added and the total is
assigned to
sum
. You see a final sentence on the screen displaying the sum.
The sum of the two numbers is 63.
Before you actually try these examples, please read the next two sections:
v
v
Syntax of REXX Instructions
Some programming languages have rigid rules about how and where characters
are entered on each line. For example, CLIST statements must be entered in
uppercase, and assembler statements must begin in a particular column. REXX, on
the other hand, has simple syntax rules. There is no restriction on how characters
are entered and generally one line is an instruction regardless of where it begins or
where it ends.
The Character Type of REXX Instructions
You can enter a REXX instruction in lowercase, uppercase, or mixed case.
However, alphabetic characters are changed to uppercase, unless you enclose
them in single or double quotation marks.
Using Quotation Marks in an Instruction
A series of characters enclosed in matching quotation marks is called a
literal string
.
The following examples both contain literal strings.
SAY 'This is a REXX literal string.'
/* Using single quotes */
SAY "This is a REXX literal string."
/* Using double quotes */
You cannot enclose a literal string with one each of the two types of quotation
marks. The following is
not
a correct example of an enclosed literal string.
SAY 'This is a REXX literal string."
/* Using mismatched quotes */
When you omit the quotation marks from a SAY instruction as follows:
SAY This is a REXX string.
you see the statement in uppercase on your screen.
THIS IS A REXX STRING.
Note:
If any word in the statement is the name of a variable that has already been
assigned a value, REXX substitutes the value. For information about
variables, see “Using Variables” on page 25.
What is a REXX Exec?
Chapter 2. Writing and Running a REXX Exec
9
Содержание 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: ......