EasyManuals Logo
Home>IBM>Computer Hardware>TSO/E REXX

IBM TSO/E REXX User Manual

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
Page #43 background imageLoading...
Page #43 background image
Chapter 3. Using Variables and Expressions
Using Variables.........................25
Variable Names .......................26
Variable Values ........................27
Exercises - Identifying Valid Variable Names .............27
Using Expressions .......................28
Arithmetic Operators ......................28
Division .........................29
Order of Evaluation .....................29
Using Arithmetic Expressions..................30
Exercises - Calculating Arithmetic Expressions ...........30
Comparison Operators .....................30
The Strictly Equal and Equal Operators ..............31
Using Comparison Expressions .................31
Exercises - Using Comparison Expressions ............32
Logical (Boolean) Operators ...................32
Using Logical Expressions...................33
Exercises - Using Logical Expressions ..............34
Concatenation Operators ....................34
Using Concatenation Operators .................34
Priority of Operators ......................35
Exercises - Priority of Operators ................36
Tracing Expressions with the TRACE Instruction ............37
Tracing Operations ......................37
Tracing Results........................38
Exercises - Using the TRACE Instruction .............38
This chapter describes variables, expressions, and operators, and explains how to
use them in REXX execs.
One of the most powerful aspects of computer programming is the ability to process
variable data to achieve a result. The variable data could be as simple as two
numbers, the process could be subtraction, and the result could be the answer.
answer = number1 - number2
Or the variable data could be input to a series of complex mathematical
computations that result in a 3-dimensional animated figure.
Regardless of the complexity of a process, the premise is the same. When data is
unknown or if it varies, you substitute a symbol for the data, much like the "x" and
"y" in an algebraic equation.
x=y+29
The symbol, when its value can vary, is called a variable. A group of symbols or
numbers that must be calculated to be resolved is called an expression.
Using Variables
A variable is a character or group of characters that represents a value. A variable
can contain either single- or double-byte characters, or a combination of single- and
double-byte characters. (Double-byte characters are valid only if you include
OPTIONS ETMODE as the first instruction of your exec.) The following variable big
represents the value one million or 1,000,000.
© Copyright IBM Corp. 1988, 2001 25

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals