Writing Real Programs in DCL, Second Edition

CHAPTER 2 INTRODUCED BASIC concepts that are important for all OpenVMS DCL users. This chapter begins an examination of DCL facilities that make it useful as a general-purpose programming language. The focus of this chapter is on data and the manipulation of data.
A symbol is the DCL equivalent of what most programming languages call a variable. A symbol is a named entity with which you can associate an item of data. Later on, the data can be retrieved and manipulated by using the name to refer to it. The item of data is called the symbol's value. The same symbol may have different values at different points in the program. It is the ability of a symbol to take on different values that makes it such a powerful programming tool. A DCL symbol has three items of information associated with it:
Name Each symbol has a name that is used to refer to it. The name of a symbol, together with its level, uniquely distinguishes if from all other existing symbols.
Level Each symbol has a level, which is determined by the context in which the symbol was originally created. The various symbol contexts are described in Section 3.3. A symbol with the same name may exist in two different contexts, but duplicate names may not exist in the same context. Therefore, a symbol's name and level uniquely distinguish it from all other symbols.
Value Each symbol has a value associated...