EasyManuals Logo

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 #38 background imageLoading...
Page #38 background image
Preventing Translation to Uppercase
As a rule, all alphabetic characters processed by the language processor are
translated to uppercase before they are processed. These alphabetic characters
can be from within an exec, such as words in a REXX instruction, or they can be
external to an exec and processed as input. You can prevent this translation to
uppercase in two ways depending on whether the characters are read as parts of
instructions from within an exec or are read as input to an exec.
From Within an Exec
To prevent translation of alphabetic characters to uppercase from within an exec,
simply enclose the characters in single or double quotation marks. Numbers and
special characters, whether or not in quotation marks, are not changed by the
language processor. For example, when you follow a SAY instruction with a phrase
containing a mixture of alphabetic characters, numbers, and special characters, only
the alphabetic characters are changed.
SAY The bill for lunch comes to $123.51!
results in:
THE BILL FOR LUNCH COMES TO $123.51!
Quotation marks ensure that information from within an exec is processed exactly
as typed. This is important in the following situations:
v For output when it must be lowercase or a mixture of uppercase and lowercase.
v To ensure that commands are processed correctly. For example, if a variable
name in an exec is the same as a command name, the exec ends in error when
the command is issued. It is good programming practice to avoid using variable
names that are the same as commands, but just to be safe, enclose all
commands in quotation marks.
As Input to an Exec
When reading input from a terminal or when passing input from another exec, the
language processor also changes alphabetic characters to uppercase before they
are processed. To prevent translation to uppercase, use the PARSE instruction.
For example, the following exec reads input from the terminal screen and
re-displays the input as output.
Example of Reading and Re-displaying Input
/************************** REXX ***********************************/
/* This is an interactive REXX exec that asks a user for the name */
/* of an animal and then re-displays the name. */
/*******************************************************************/
SAY "Please type in the name of an animal."
PULL animal /* Get the animal name.*/
SAY animal
If you responded to the example with the word tyrannosaurus, you would see on
your screen:
Preventing Translation to Uppercase
20
z/OS V1R1.0 TSO/E REXX User’s Guide

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