COMTRAN Reconstruction

F28-8043 · June 1960

Page 61

PDF page 67 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

Chapter 4: Data Description

What a Data Description Is

[page 61]

The preceding chapter has shown how to write instructions that direct the computer to perform various kinds of operations. Up to this point, the discussion has been limited to operations that act directly on the actual data of the problem being solved. It has been assumed that the various items of data had already been placed in the system for this purpose.

In actual practice, however, the programmer must make the arrangements for placing the data into the system in a manner which permits it to be used efficiently. Although this is not difficult, it requires thoughtful planning. It assumes that the data is arranged according to a well defined plan, and it consists of furnishing the system with information about that plan. If the data is not suitably organized, the programmer must work out an appropriate plan and arrange the data accordingly. The principles involved are not unlike those the programmer would follow if he were designing a set of business forms for handling the data manually.

The need for doing this should quickly become apparent. Suppose, for example, that a clerk has jotted down on a scrap of paper the figures "46.30." These figures presumably represent a value that means something to him. But could anyone else tell what kind of a value this is? Is it, for example, a unit selling price? The number of hours worked by an employee? A discount? The percentage of water in a chemical product? Obviously, the number, standing alone, has very little practical significance.

In normal business operations, of course, there are several means of identifying values of this kind. In some cases the number will actually be labeled. In many other cases its identity will be seen at once from the fact that it appears in a particular position on a particular form, or that it is written in a certain column in a certain ledger.

When data is entered into a data processing system, it is rarely feasible to label each number. If "46.30" is a rate of pay, for example, the programmer would not write "$46.30 per 40-hour week." Neither would he write "46.30 lbs. per cu. ft." if it were a measure of weight. The value would be entered simply as a number, and the programmer would have to find some other way to show what the number represented. The method of doing this is explained in this chapter.

The Purpose of a Data Description

It can be said, therefore, that a major purpose of writing a "data description" is to furnish the processing system with a means of identifying each item of data which has been named in the procedure statements. This description must include all items on which the system is to operate.

Actually, the system needs more than a means of merely identifying the data. If the data is numeric, for instance, there must be a means of showing where the decimal point is located. If the system is to print out monetary values, it must have information on where to place the dollar sign, and whether or not to print leading zeros. Details of this sort are usually referred to as "editing." Some of them are handled automatically by the processor, so that the programmer need not concern himself with them. In other cases, the programmer can specify one of several methods for handling a particular situation; in such a case, the data description allows him to give the required instructions.

Writing a data description is not difficult, once a few basic principles are understood, and these are explained in the following pages.