Previous Topic: Global Variables OverviewNext Topic: OPS/REXX Compound Symbols


Global Variable Basics and OPS/REXX

This section describes global variables in the context of OPS/REXX.

At the basic level, a global variable is an OPS/REXX compound symbol that has a unique stem. For example:

GLOBAL.xyz
OPS/REXX Compound Symbol

Compound symbols let you establish an accurate and efficient way to address values. By design, they help you implement tables or arrays.

An OPS/REXX compound symbol is a named object that which you can assign a value or data. It is a powerful kind of variable because one or more variables can be included in the name of the compound symbol itself. In other words, what makes a compound symbol unique is that a portion of the name of the compound symbol itself can be a variable.

Typically, the name of the most simple type of a variable is an identifiable constant; most likely a character string.

On the other hand, consider a variable that is a compound symbol:

Example: Compound Symbols

An analogy is the address system of a city. In this analogy, assume the following information:

For more information about compound symbols, see THE REXX LANGUAGE: A Practical Approach to Programming by M.F. Cowlishaw (Prentice Hall, 1990).