EasyManua.ls Logo

IBM TSO/E REXX

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
Loading...
Also, if ETMODE is set on, the following are valid DBCS variable names, where <
represents shift-out, and > represents shift-in, .X, .Y, and .Z represent DBCS
characters, and lowercase letters and numbers represent themselves.
<.X.Y.Z> number_<.X.Y.Z> <.X.Y>1234<.Z>
Variable Values
The value of the variable, which is the value the variable name represents, might be
categorized as follows:
v A constant, which is a number that is expressed as:
An integer (12)
A decimal (12.5)
A floating point number (1.25E2)
A signed number (-12)
A string constant (' 12')
v A string, which is one or more words that may or may not be enclosed in
quotation marks, such as:
This value is a string.
'This value is a literal string.'
v The value from another variable, such as:
variable1 = variable2
In the above example, variable1 changes to the value of variable2, but
variable2 remains the same.
v An expression, which is something that needs to be calculated, such as:
variable2 = 12 + 12 - .6 /* variable2 becomes 23.4 */
Before a variable is assigned a value, the variable displays the value of its own
name translated to uppercase. In the following example, if the variable new was not
assigned a previous value, the word "NEW" is displayed.
SAY new /* displays NEW */
Exercises - Identifying Valid Variable Names
Which of the following are valid REXX variable names?
1. 8eight
2. $25.00
3. MixedCase
4. nine_to_five
5. result
ANSWERS
1. Invalid, because the first character is a number
2. Valid
3. Valid
4. Valid
5. Valid, but it is a reserved variable name and we recommend that you use it only
to receive results from a subroutine
Using Variables
Chapter 3. Using Variables and Expressions 27

Table of Contents

Related product manuals