COMTRAN Reconstruction

F28-8043 · June 1960

Page 81

PDF page 87 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 81]

EXAMPLES

The following examples indicate the range of characters for which provision is made by the notation shown:

Notation Range of Characters Provided For
AAA All characters in the machine's character set except numerals.
88999 All numeric values from 000 to 99999.
****.99 All numeric values from ****.00 to 9999.99.
$888,888.99 All numeric values from $.00 to $999,999.99.

Constants

A constant is a value, or a group of symbols, placed in the program for use without alteration, such as a fixed percentage rate or a fixed name. A constant may be placed in the system by writing a data description entry for it which includes both a statement of its format (using the format characters) and a statement of the actual value or group of symbols. The format is specified by a standard field pictorial entry. The actual value, or the actual symbols, must then be written on the same line, separated from the field pictorial by at least one blank. This value (or this group of symbols) must be enclosed in quotation marks.

While a literal may be thought of as a form of a constant, the reader should note two distinctions: (1) Literals are written in procedure statements, whereas constants are placed in the system by means of data description entries. (2) Constants, unlike literals, must always be enclosed in quotation marks, even though they may be wholly numeric.

To illustrate, if the programmer wished to place the percentage .05 into the data description as a constant, it would be necessary to specify the nature of the constant by a notation such as the following:

Coding form: PERCENT.CONST constant entry Data description coding form — PERCENT.CONST constant entry (page 81).

SERIAL   DATA NAME              LEVEL  TYPE    QUANTITY   MODE  JUSTIFY  DESCRIPTION

         PERCENT.CONST                                                            V99 '05'

In this example, the notation V99 is, of course, the field pictorial, and it is followed by a statement of the actual value of the constant.

Data Names Associated with REDEF and COPY

When the type codes REDEF and COPY are used, it is necessary to specify the name of the data item or area to be redefined or copied. This name must be entered in the "Description" columns. (See the discussion of those type codes earlier in this chapter.)

Library Names

The word LIBRARY, followed by the name of a data description stored in the library, designates a data description which is to be copied. Availability of this code enables the programmer to store data descriptions which are frequently required, so that he can save the effort of writing new ones when a previous one will serve his purpose. When a library data description is prescribed, the type code COPY must be used.