Continuations
One way to continue a clause onto the next line is to use the comma, which is referred to as the
continuation character
. The comma is functionally replaced by a blank, and, thus, no semicolon is
implied. One or more comments can follow the continuation character before the end of the line. The
continuation character cannot be used in the middle of a string or it will be processed as part of the string
itself. The same situation holds true for comments. Note that the comma remains in execution traces.
The following example shows how to use the continuation character to continue a clause.
say 'You can use a comma',
'to continue this clause.'
This displays:
You can use a comma to continue this clause.
Expressions and Operators
Expressions in REXX are a general mechanism for combining one or more pieces of data in various ways
to produce a result, usually different from the original data.
Expressions
Expressions consist of one or more
terms
(literal strings, symbols, function calls, or subexpressions)
interspersed with zero or more operators that denote operations to be carried out on terms. A
subexpression
is a term in an expression bracketed within a left and a right parenthesis.
Terms
include:
v
Literal Strings
(delimited by quotation marks), which are constants
v
Symbols
(no quotation marks), which are translated to uppercase. A symbol that does not begin with a
digit or a period may be the name of a variable; in this case the value of that variable is used.
Otherwise a symbol is treated as a constant string. A symbol can also be
compound
.
v
Function calls
(see page 171), which are of the form:
symbol
(
literal_string
(
,
expression
)
Evaluation of an expression is left to right, modified by parentheses and by operator precedence in the
usual algebraic manner (see section “Parentheses and Operator Precedence” on page 118). Expressions
are wholly evaluated, unless an error occurs during evaluation.
All data is in the form of “typeless” character strings (typeless because it is not—as in some other
languages—of a particular declared type, such as Binary, Hexadecimal, Array, and so forth). Consequently,
the result of evaluating any expression is itself a character string. Terms and results (except arithmetic and
logical expressions) may be the
null string
(a string of length
0
). Note that REXX imposes no restriction
on the maximum length of results. However, there is a 16MB limitation on the amount of a single storage
request available to the language processor. See the note on page 109 for more information.
Operators
An
operator
is a representation of an operation, such as addition, to be carried out on one or two terms.
The following pages describe how each operator (except for the prefix operators) acts on two terms, which
may be symbols, strings, function calls, intermediate results, or subexpressions. Each prefix operator acts
on the term or subexpression that follows it. Blanks (and comments) adjacent to operator characters have
no effect on the operator; thus, operators constructed from more than one character can have embedded
REXX General Concepts
Chapter 12. REXX General Concepts
115
Содержание SC34-5764-01
Страница 1: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 2: ......
Страница 3: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 22: ...xx CICS TS for VSE ESA REXX Guide...
Страница 23: ...Part 1 User s Guide Copyright IBM Corp 1992 2009 1...
Страница 24: ...2 CICS TS for VSE ESA REXX Guide...
Страница 40: ...18 CICS TS for VSE ESA REXX Guide...
Страница 54: ...Using Variables and Expressions 32 CICS TS for VSE ESA REXX Guide...
Страница 106: ...84 CICS TS for VSE ESA REXX Guide...
Страница 110: ...88 CICS TS for VSE ESA REXX Guide...
Страница 122: ...100 CICS TS for VSE ESA REXX Guide...
Страница 123: ...Part 2 Reference Copyright IBM Corp 1992 2009 101...
Страница 124: ...102 CICS TS for VSE ESA REXX Guide...
Страница 130: ...Introduction 108 CICS TS for VSE ESA REXX Guide...
Страница 152: ...REXX General Concepts 130 CICS TS for VSE ESA REXX Guide...
Страница 224: ...Functions 202 CICS TS for VSE ESA REXX Guide...
Страница 252: ...230 CICS TS for VSE ESA REXX Guide...
Страница 278: ...256 CICS TS for VSE ESA REXX Guide...
Страница 312: ...DB2 Interface 290 CICS TS for VSE ESA REXX Guide...
Страница 316: ...High level Client Server Support 294 CICS TS for VSE ESA REXX Guide...
Страница 340: ...318 CICS TS for VSE ESA REXX Guide...
Страница 344: ...for execs Commands 322 CICS TS for VSE ESA REXX Guide...
Страница 399: ...Part 3 Appendixes Copyright IBM Corp 1992 2009 377...
Страница 400: ...378 CICS TS for VSE ESA REXX Guide...
Страница 438: ...416 CICS TS for VSE ESA REXX Guide...
Страница 442: ...System Definition Customization Administration 420 CICS TS for VSE ESA REXX Guide...
Страница 446: ...Security 424 CICS TS for VSE ESA REXX Guide...
Страница 448: ...426 CICS TS for VSE ESA REXX Guide...
Страница 464: ...442 CICS TS for VSE ESA REXX Guide...
Страница 466: ...444 CICS TS for VSE ESA REXX Guide...
Страница 468: ...446 CICS TS for VSE ESA REXX Guide...
Страница 476: ...454 CICS TS for VSE ESA REXX Guide...
Страница 478: ...456 CICS TS for VSE ESA REXX Guide...
Страница 479: ......
Страница 480: ...SC34 5764 01...
Страница 481: ...Spine information CICS TS for VSE ESA REXX Guide...