COMTRAN Reconstruction

F28-8043 · June 1960

Page 40

PDF page 46 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 40]

Either form of the GET causes the next record to be made available so that the entire record or any of its parts may be used in processing. Note that the previous record of the file is no longer addressable after the execution of a GET command.

To provide for the execution of an alternate command conditional upon end of file, the optional phrase,

..., AT END any imperative clause

may be appended to either form of the GET. A command thus specified is performed after the last record of a file has been made available for processing and a subsequent GET command has been encountered. The programmer should always use the AT END option if the possibility exists of reaching end of file upon execution of the GET.

When the GET command is executed at object time, the following events take place:

  1. The next record of the file is made available for processing.
  2. If end of tape is reached, the end-of-tape label is read, and checks are made. The input tape is rewound, and provision is made for an alternate tape unit to be substituted.
  3. If end of file is reached, any alternate command specified in the AT END phrase is performed.

Some examples of the use of GET are:

GET RECORD FROM INVOICE.FILE.
GET MASTER, AT END GO TO END.OF.MASTERS.

The FILE Command

The FILE command is used to place records on tape (for subsequent on-line or off-line processing), on cards, or on the printer. The programmer is concerned only with the placing of the unit record. Other considerations, such as

  • blocking
  • tape alternation
  • file identification
  • error checking
  • setting checkpoints

are provided automatically by the data flow control system based upon information supplied through the environment description. There are two forms of the FILE command:

FILE record.name
FILE record.name IN file.name

In the first form the record is filed in the output file with which it has been associated through the environment description. In the second form the named record is filed from storage to the output file even though that record may not have been hitherto associated with that file. Creating new records in working storage and then merging them into a master file is an instance of the latter situation.

When the FILE command is executed at object time, the following events take place:

  1. The named record is added to the list of those awaiting write-out. When the