Tokens - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

You can avoid this type of problem by using concatenation for literal strings containing /* or */; line 2
would be:
if substr(input,1,5) = '/' || '*123'
You could comment out lines 2 and 3 correctly as follows:
01
parse pull input
02 /* if substr(input,1,5) = '/' || '*123'
03
then call process
04 */ dept = substr(input,32,5)
For information about Double-Byte Character Set characters, see Appendix C, "Double-Byte Character Set
(DBCS) Support," on page 395 and the OPTIONS instruction on page 151.

Tokens

A token is the unit of low-level syntax from which clauses are built. Programs written in REXX are
composed of tokens. They are separated by blanks or comments or by the nature of the tokens
themselves. The classes of tokens are:
Literal Strings:
A literal string is a sequence including any characters and delimited by the single quotation mark
(') or the double quotation mark ("). Use two consecutive double quotation marks ("") to represent
a " character within a string delimited by double quotation marks. Similarly, use two consecutive
single quotation marks ('') to represent a ' character within a string delimited by single quotation
marks. A literal string is a constant and its contents are never modified when it is processed.
A literal string with no characters (that is, a string of length 0) is called a null string.
These are valid strings:
'Fred'
"Don't Panic!"
'You shouldn''t'
''
Note that a string followed immediately by a ( is considered to be the name of a function. If
followed immediately by the symbol X or x, it is considered to be a hexadecimal string. If followed
immediately by the symbol B or b, it is considered to be a binary string. Descriptions of these
forms follow. Implementation maximum:A literal string can contain up to 250 characters. But note
that the length of computed results is limited only by the amount of storage available. See the note
on page 109 for more information.
Hexadecimal Strings:
A hexadecimal string is a literal string, expressed using a hexadecimal notation of its encoding. It
is any sequence of zero or more hexadecimal digits (0–9, a–f, A–F), grouped in pairs. A single
leading 0 is assumed, if necessary, at the front of the string to make an even number of
hexadecimal digits. The groups of digits are optionally separated by one or more blanks, and the
whole sequence is delimited by single or double quotation marks, and immediately followed by the
symbol X or x. (Neither x nor X can be part of a longer symbol.) The blanks, which may be present
only at byte boundaries (and not at the beginning or end of the string), are to aid readability. The
language processor ignores them. A hexadecimal string is a literal string formed by packing the
hexadecimal digits given. Packing the hexadecimal digits removes blanks and converts each pair
of hexadecimal digits into its equivalent character, for example: 'C1'X to A.
Hexadecimal strings let you include characters in a program even if you cannot directly enter the
characters themselves. These are valid hexadecimal strings:
'ABCD'x
"1d ec f8"X
"1 d8"x
/* Same as "You shouldn't" */
/* The null string
REXX General Concepts
*/
Chapter 12. REXX General Concepts
111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents