The Interrelationship Of The Physical; And Logical Structures; The Define File Statement - IBM 1130 User Manual

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Section
Subsections
Page
80
30
I
10
01
THE INTERRELA TIONSIDP OF THE PHYSICAL
AND LOGICAL STRUCTURES
The DEFINE FILE Statement
For every data file you wish to access on the disk,
there must be a DEFINE FILE statement in your
FORTRAN program specifying certain details. A
typical DEFINE FILE statement is
DEFINE FILE 47(400,85, U,NEXT)
which indicates a file numbered 47, having 400 rec-
ords of 85 words each. The U is always required
and specifies an unformatted record. NEXT is the
name of an integer variable that will always be set
to the record number of the next record in the file,
a number between 1 and 400. For example, if you
have just given the command
READ (47'K) A, B, I,J
where K was 96, NEXT will equal 97, the record
number of the next record.
The incrementing of
NEXT occurs automatically and you may choose to
ignore it completely. In this case, you are addressing
your file by the symbol K, doing your own manipula-
tion of K, and not using NEXT at all. If you wish to
read the next record, you can say either
READ (47'NEXT) A, B, I,
J
or
K=K+1
READ (47'K) A, B, I, J
An 85-word disk record allows three records per
sector (Figure 80.2), so that your file of 400 records
will require 134 sectors (the exact answer, 133 1/3,
must be adjusted upward to the next higher whole
number).
(If
your record length could somehow be shortened
to 80 words, you could place four records per
sector, reducing the sector requirement from 134 to
100, a substantial savings -- see 80.40.00. )
If you do not want to save this data file for use by
a subsequent program, the DEFINE FILE statement
is the only place you need reference it.
The DEFINE FILE statement specifies a mixture
of physical (actual) and logical (symbolic) sub-
divisions:
File number (symbolic)
Number of records (symbolic)
Number of words per record (actual)
Cylinders, sectors, and fields are nowhere men-
tioned.
The READ (or WRITE) statements specify only
symbolic designations:
File number (symbolic)
Record number (symbolic)
Field names (symbolic)

Advertisement

Table of Contents
loading

Table of Contents