z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using Variables

z/OS TSO/E REXX User's Guide
SA32-0982-00

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.
big = 1000000
Variables can refer to different values at different times. If you assign a different value to big, it gets the value of the new assignment, until it is changed again.
big = 999999999
Variables can also represent a value that is unknown when the exec is written. In the following example, the user's name is unknown, so it is represented by the variable who.
SAY "Hello! What's your name?"

PARSE PULL who      /* Put the person's name in the variable "who" */

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014