big = 1000000
Variables can refer to different values at different times. If you assign a different
value to
big
, it gets the value of the new assignment, until it is changed again.
big = 999999999
Variables can also represent a value that is unknown when the exec is written. In
the following example, the user’s name is unknown, so it is represented by the
variable
who
.
SAY "Hello! What's your name?"
PARSE PULL who
/* Put the person's name in the variable "who" */
Variable Names
A variable name, the part that represents the value, is always on the left of the
assignment statement and the value itself is on the right. In the following example,
the word "variable1" is the variable name:
variable1 = 5
SAY variable1
As a result of the above assignment statement,
variable1
is assigned the value "5",
and you see on the terminal screen:
5
Variable names can consist of:
A...Z
uppercase alphabetic
a...z
lowercase alphabetic
0...9
numbers
@ # $ ¢ ? ! . _
special characters
X'41' ... X'FE'
double-byte character set (DBCS) characters.
(ETMODE must be on for these characters to be
valid in a variable name.)
Restrictions on the variable name are:
v
The first character cannot be 0 through 9 or a period (.)
v
The variable name cannot exceed 250 bytes. For names containing DBCS
characters, count each DBCS character as two bytes, and count the shift-out
(SO) and shift-in (SI) as one byte each.
v
DBCS characters within a DBCS name must be delimited by SO (X'0E') and SI
(X'0F'). Also note that:
– SO and SI cannot be contiguous.
– Nesting of SO / SI is not permitted.
– A DBCS name cannot contain a DBCS blank (X'4040').
v
The variable name should not be RC, SIGL, or RESULT, which are REXX special
variables. More about special variables appears later in this book.
Examples of acceptable variable names are:
ANSWER
?98B
X
Word3
number the_ultimate_value
Using Variables
26
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: ......