Concatenation Operators - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

\___________________/
true
\_____________________________/
As a result, when you run the program, it produces the result:
Go skiing.
Exercises - Using Logical Expressions
A student applying to colleges has decided to evaluate them according to the following specifications:
IF (inexpensive | scholarship) & (reputable | nearby) THEN
SAY "I'll consider it."
ELSE
SAY "Forget it!"
A college is inexpensive, did not offer a scholarship, is reputable, but is more than 1000 miles away.
Should the student apply?
ANSWER
Yes. The conditional instruction works out as follows:
IF (inexpensive | scholarship) & (reputable | nearby) THEN ...
\__________/ \___________/
true
false
\___________/
true
\_________________________/

Concatenation Operators

Concatenation operators combine two terms into one. The terms can be strings, variables, expressions, or
constants. Concatenation can be significant in formatting output.
The operators that indicate how to join two terms are as follows:
Operator
Meaning
blank Concatenates terms and places one blank between them. If more than one blank separates terms,
this becomes a single blank. For example:
SAY true
blue
||
Concatenates terms with no blanks between them. For example:
(8 / 2)||(3 * 3)
abuttal
Concatenates terms with no blanks between them. For example:
per_cent'%'
You can use abuttal only with terms that are of different types, such as a literal string and a
symbol, or when only a comment separates two terms.
Using Concatenation Operators
One way to format output is to use variables and concatenation operators as in the following example.
true
\_________/ \______/
true
false
\_________/
true
true
/* result is TRUE BLUE */
/* result is 49 */
/* if per_cent = 50, result
is 50% */
Using Variables and Expressions
/
/
Chapter 3. Using Variables and Expressions
27

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents