COMTRAN Reconstruction

F28-8043 · June 1960

Page 16

PDF page 22 of 124. Download the scanned PDF

The page as scanned

The scan of PDF page 22 of F28-8043
Select the scan to open it at full size.

The text read off it

[page 16]

  1. The names must be written in increasing order from the general to the specific. (If the reader is familiar with the concept of level numbers, as discussed in Chapter 4 of this manual, he will note that this means that the names must be listed in order from the lowest to the highest level number.)
  2. No qualifying names are required that do not contribute to the uniqueness of the compound name. Thus, in the example given, if there were only one date named in each of the input and output files—e.g., an ORDER.DATE, but no SHIPMENT.DATE—it would not be necessary to use the name ORDER.DATE in forming the compound name; the names INPUT.MASTER MONTH and OUTPUT.MASTER MONTH would suffice.

The organization and structure of data for use in a data processing system is further discussed in Chapter 4, entitled "Data Description." The reader is referred, in particular, to the discussion of level numbers beginning on page 68.

The reader has seen that the Commercial Translator system uses names as a convenient—in fact, indispensable—means of identifying data, procedures, and conditions. It is now necessary to indicate how each name is placed in the program in a way that permits the system to connect it with the item to which it refers.

Placing Names in the Program

A Commercial Translator program consists primarily of procedure description and data description. The first of these is made up of procedure statements—the actual instructions which govern both the processor and the object program. The second consists of data description statements—entries which instruct the system to reserve a specified amount of storage space for each kind of data and which show the organization and nature of the data so that it can be located and used when needed. These two sections are discussed in Chapters 3 and 4.

All statements for a Commercial Translator program must be written in a specified format, and, as a guide to the programmer, two columnar forms have been prepared for this purpose. One is used for procedure statements, the other for data description statements. The first is described in Chapter 3, the second in Chapter 4.

Procedure-names differ from other names in one important respect. They are used as names for sentences and sections (which themselves usually contain names of various kinds), whereas data-names and condition-names identify kinds of information. A procedure-name identifies a fixed set of procedure statements. A data-name usually identifies a storage area that may contain different values at different times.

Procedure-names are identified in the procedure description. This is a simple matter. It consists merely of writing the procedure-name before the statement or statements to which it refers, in accordance with the rules given in Chapter 3. Once the name has been written, the program will be able to interpret any reference to the name as a reference to the associated procedure statement.

Data-names and condition-names, however, require amplification. As will be seen in Chapter 4, the system must know whether the data is numeric or whether it contains alphabetic characters. It must know where decimal points, if any, are to be placed, where to print dollar signs, and so on. There are a number of such details which must be specified. It would have been possible to set up rules for describing the data in the procedure description, but this would have been inefficient, since the description of each item would have had to be repeated each time its name appeared. Since the description is placed in a separate section, however, each name need be described only once, regardless of the number of times it is used in the program.

It follows that each data-name and each condition-name used in the procedure description must be properly accounted for in the data description, following the rules given in Chapter 4. Once this has been done, the programmer is free to refer to the name repeatedly throughout the procedure description.