COMTRAN Reconstruction

F28-8043 · June 1960

Page 64

PDF page 70 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 64]

However, the programmer has the option of prescribing certain details of a label by the use of the LABEL type code, which is discussed later in this chapter.

Records

A record is a portion of a file which can be made accessible to the system by the verb GET, assuming the file has previously been "opened." The size and position of a record in storage are determined by the specifications given in the data description. Its contents are referred to by their location in storage, whereas a file, as such, is never actually brought into storage. In other words, a record, unlike a file, is conceived as an "internal" body of data, even though it may be stored externally for long periods of time as part of a file.

Usually, but not necessarily, the records within a file are similar to each other in content, size, and format. For example, there might be a file called PAYROLL RECORD—EASTERN REGION, which would contain hundreds, or thousands, of individual payroll records. Each individual record would normally contain data relating to a particular employee, such as his name, employee number, job title or class, pay rate, dependency classification, deductions, and so on. The separate parts of a record might be quite dissimilar, but they would all relate to a single subject (in this case, an employee), and other records in the same file would carry similar information about other employees. Furthermore, each item would occupy the same relative position in one record that it does in another; it would also have the same format and be of the same size. This makes it possible to describe each kind of data instead of each individual item of data.

A record may be obtained for use by the verb GET, and, when processing has been completed, it may be placed in an output file by the verb FILE.

Fields

A field is a block of data which can be operated on as a unit by the arithmetic commands and by the commands that control the movement of data within the system (other than the verbs GET and FILE). In many cases, a field will be a subordinate part of a record (such as a PAY.RATE field within a record called PAY.RECORD). However, this relationship does not necessarily hold. A record may contain only one field, for example, and, in fact, several records, or parts of several different records, may be regrouped within storage to form a new block of data which can then be treated as a field. Fields must always be defined in the data description.

In most cases, a field is considered to deal with only one element of data, at least for the purposes of the operation being performed. In a payroll record, for instance, such items of data as employee name, pay rate, employee number, and so on, would each be treated as a field. In practice, a field may be further subdivided. The classic example is the representation of a date. According to one view, the complete date, consisting of day, month, and year, is a single field, and the smaller components are regarded as "subfields." Another view holds that day, month, and year are each fields, and that the complete date is a group of fields.

As far as the Commercial Translator language is concerned, however, distinctions between subfields, fields, and groups of fields are handled by assigning "level" numbers to the various components. This is explained later in this chapter. It is felt that this method eliminates confusion that could result from trying to show relationships among the smaller units of data by the use of only three terms (i.e., field, subfield, and group of fields), and it allows, through the use of level numbers, a greater degree of flexibility in organizing the data. In general, it should be understood that a field is any element of data which can be operated upon by arithmetic and/or data transmission verbs.

Data Description Format