COMTRAN Reconstruction

F28-8043 · June 1960

Page 76

PDF page 82 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 76]

Suppose, for instance, that the input record contains a field called DESTINATION, and that this field will contain, at object time, a numeric code representing one of the cities listed in the table. If the programmer writes MOVE ONE.WAY (DESTINATION) TO BILL.AMOUNT, the system will obtain whatever number has been placed in the DESTI- NATION field and will use it to determine which item in the table is wanted. It will then find that item and move it to the field called BILL.AMOUNT. The reader will have noted that this number determines the position of data by the simple process of counting lines; the code numbers used, therefore, must be assigned in a sequence corresponding to the lines of the table.

COPY

This type code is used to copy a data description previously defined in the program so that it can be used again elsewhere. This makes it possible to use a data description with new data-names and, if desired, new level numbers.

The COPY type code is used as follows: The new name of the data description entry is written in the "Data Name" columns of the new entry. The code COPY is placed in the "Type" columns. The data description to be copied is specified by writing its original name in the "Description" columns. This description must already have been read into the system for the COPY code to be able to operate on it.

The processor will then obtain the original data description and copy it in its entirety , except for the following modifications: (1) The original name will be replaced by the new name. (2) If a new level number has been specified for the new name, the level numbers of the original data description will be adjusted so that they retain their original relationship to the named entry. Thus, if the original sequence of level numbers had been 01, 03, 04, and if the new name is assigned level 05, the other items would now be placed at levels 07 and 08, respectively.

Suppose the programmer had previously written the following entries in the data description:

Coding form: PAY.RCD.MASTER data description Data description coding form — PAY.RCD.MASTER and, below, the COPY entry for PAY.RCD.DETAIL (page 76).

SERIAL   DATA NAME                    LEVEL  TYPE

         PAY.RCD.MASTER                 01
         EMPLOYEE.NAME                  02
         JOB.TITLE                      02
         HOURLY.RATE                    02
         GROSS.PAY                      02
         TAXES                          02
         FICA                           03
         FED.INCOME                     03
         STATE.INCOME                   03
         NET.PAY                        02

Suppose then that he wishes to set up an identical data description for a detail record, except that the new description is to have the name PAY.RCD.DETAIL and it will be placed at level 02. He could write the following entry:

SERIAL   DATA NAME              LEVEL  TYPE    QUANTITY   MODE  JUSTIFY  DESCRIPTION

         PAY.RCD.DETAIL           02   COPY                                      PAY.RCD.MASTER