The text read off it
[02.07.11]
2. Example 2
a) Statement of problem
i File consists of records of three fixed lengths.
- REC1 - 64 words
- REC2 - 128 words
- REC3 - 192 words
ii The exact order in which records appear on tape is unknown.
iii Block size is specified as 128 words (BLOCKSIZE 128).
iv Records may span block boundaries (SPANS option taken).
v Record always start at the beginning of new blocks (BEGIN option taken).
b) Illustration of Tape
A portion of the tape might be:
Illustration of tape for Example 2 (page 62).
| Block | Contents | Words |
|---|---|---|
| Block J | REC1 | 64 |
| Block J+1 | REC1 | 64 |
| Block J+2 | REC2 | 128 |
| Block J+3 | REC3 (first part) | 128 |
| Block J+4 | REC3 (latter part) | 62 |
c) Problem Explanation
Blocks J, J+1, J+3, and J+4 are truncated in order to satisfy the BEGIN option. REC3 exists in Blocks J+3 and J+4 since it is too large to be contained in a single block and records are allowed to span blocks in this file.
When input these records will be processed in the transmit mode since they may span block boundaries. The GET record.name form must also be used with this file for reasons outlined in Example 1.