<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
record-oriented	B-Application
filesystem	I-Application
is	O
a	O
file	B-Application
system	I-Application
where	O
data	O
is	O
stored	O
as	O
collections	O
of	O
records	B-General_Concept
.	O
</s>
<s>
This	O
is	O
in	O
contrast	O
to	O
a	O
byte-oriented	O
filesystem	B-Application
,	O
where	O
the	O
data	O
is	O
treated	O
as	O
an	O
unformatted	O
stream	O
of	O
bytes	B-Application
.	O
</s>
<s>
In	O
general	O
the	O
formats	O
can	O
be	O
fixed-length	O
or	O
variable	O
length	O
,	O
with	O
different	O
physical	O
organizations	O
or	O
padding	O
mechanisms	O
;	O
metadata	O
may	O
be	O
associated	O
with	O
the	O
file	O
records	B-General_Concept
to	O
define	O
the	O
record	O
length	O
,	O
or	O
the	O
data	O
may	O
be	O
part	O
of	O
the	O
record	O
.	O
</s>
<s>
Different	O
access	B-Application
methods	I-Application
for	O
records	B-General_Concept
may	O
be	O
provided	O
,	O
for	O
example	O
records	B-General_Concept
may	O
be	O
retrieved	O
in	O
sequential	B-General_Concept
order	I-General_Concept
,	O
by	O
key	B-Data_Structure
,	O
or	O
by	O
record	O
number	O
.	O
</s>
<s>
Record-oriented	B-Application
filesystems	I-Application
are	O
frequently	O
associated	O
with	O
mainframe	O
operating	O
systems	O
,	O
such	O
as	O
OS/360	B-Application
and	I-Application
successors	I-Application
and	O
DOS/360	B-Application
and	I-Application
successors	I-Application
,	O
and	O
midrange	O
operating	O
systems	O
,	O
such	O
as	O
RSX-11	B-Application
and	O
VMS	B-Operating_System
.	O
</s>
<s>
However	O
,	O
they	O
originated	O
earlier	O
in	O
software	O
such	O
as	O
Input/Output	B-Application
Control	I-Application
System	I-Application
(	O
IOCS	B-Application
)	O
.	O
</s>
<s>
Record-oriented	B-Application
filesystems	I-Application
can	O
be	O
supported	O
on	O
media	O
other	O
than	O
direct	O
access	O
devices	O
.	O
</s>
<s>
A	O
deck	O
of	O
punched	O
cards	O
can	O
be	O
considered	O
a	O
record-oriented	B-Application
file	I-Application
.	O
</s>
<s>
A	O
magnetic	O
tape	O
is	O
an	O
example	O
of	O
a	O
medium	O
that	O
can	O
support	O
records	B-General_Concept
of	O
uniform	O
length	O
or	O
variable	O
length	O
.	O
</s>
<s>
In	O
a	O
record	O
file	B-Application
system	I-Application
,	O
a	O
programmer	O
designs	O
the	O
records	B-General_Concept
that	O
may	O
be	O
used	O
in	O
a	O
file	O
.	O
</s>
<s>
All	O
application	O
programs	O
accessing	O
the	O
file	O
,	O
whether	O
adding	O
,	O
reading	O
,	O
or	O
updating	O
records	B-General_Concept
share	O
an	O
understanding	O
of	O
the	O
design	O
of	O
the	O
records	B-General_Concept
.	O
</s>
<s>
In	O
DOS/360	O
,	O
OS/360	B-Application
,	O
and	O
their	O
successors	O
there	O
is	O
no	O
restriction	O
on	O
the	O
bit	O
patterns	O
composing	O
the	O
data	O
record	O
,	O
i.e.	O
</s>
<s>
there	O
is	O
no	O
delimiter	B-Algorithm
character	O
;	O
this	O
is	O
not	O
always	O
true	O
in	O
other	O
software	O
,	O
e.g.	O
,	O
certain	O
record	O
types	O
for	O
RCA	O
File	O
Control	O
Processor	O
(	O
FCP	O
)	O
on	O
the	O
301	O
,	O
501	O
,	O
601	O
and	O
3301	O
.	O
</s>
<s>
The	O
file	O
comes	O
into	O
existence	O
when	O
a	O
file	O
create	O
request	O
is	O
issued	O
to	O
the	O
filesystem	B-Application
.	O
</s>
<s>
This	O
information	O
may	O
specify	O
that	O
the	O
file	O
has	O
fixed-length	O
records	B-General_Concept
(	O
all	O
records	B-General_Concept
are	O
the	O
same	O
size	O
)	O
along	O
with	O
the	O
size	O
of	O
the	O
records	B-General_Concept
.	O
</s>
<s>
Alternatively	O
,	O
the	O
specification	O
may	O
state	O
that	O
the	O
records	B-General_Concept
are	O
of	O
variable	O
length	O
,	O
along	O
with	O
the	O
maximum	O
record	O
length	O
.	O
</s>
<s>
Additional	O
information	O
including	O
blocking	O
factor	O
,	O
binary	O
vs.	O
text	O
and	O
the	O
maximum	O
number	O
of	O
records	B-General_Concept
may	O
be	O
specified	O
.	O
</s>
<s>
It	O
may	O
be	O
permitted	O
to	O
read	O
only	O
the	O
beginning	O
of	O
a	O
record	O
;	O
the	O
next	O
sequential	B-General_Concept
read	I-General_Concept
returns	O
the	O
next	O
collection	O
of	O
data	O
(	O
record	O
)	O
that	O
the	O
writer	O
intended	O
to	O
be	O
grouped	O
together	O
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
the	O
record	O
is	O
padded	O
with	O
binary	O
zeros	O
or	O
with	O
spaces	O
,	O
depending	O
on	O
whether	O
the	O
file	O
is	O
recognized	O
as	O
a	O
binary	O
file	O
or	O
a	O
text	B-General_Concept
file	I-General_Concept
.	O
</s>
<s>
These	O
operating	O
systems	O
must	O
provide	O
file	B-Application
system	I-Application
utilities	O
for	O
converting	O
files	O
between	O
one	O
format	O
and	O
another	O
.	O
</s>
<s>
In	O
either	O
case	O
,	O
significant	O
amounts	O
of	O
code	O
to	O
manage	O
records	B-General_Concept
must	O
be	O
provided	O
in	O
protected	O
routines	O
to	O
ensure	O
file	O
integrity	O
.	O
</s>
<s>
An	O
alternative	O
to	O
a	O
Record-oriented	B-Application
file	I-Application
is	O
a	O
stream	O
.	O
</s>
<s>
In	O
a	O
stream	O
file	O
,	O
in	O
which	O
the	O
file	B-Application
system	I-Application
treats	O
files	O
as	O
an	O
unstructured	O
sequence	O
of	O
bytes	B-Application
.	O
</s>
<s>
A	O
common	O
application	O
convention	O
for	O
text	B-General_Concept
files	I-General_Concept
represented	O
as	O
streams	O
is	O
to	O
use	O
a	O
new	O
line	O
delimiter	B-Algorithm
to	O
separate	O
or	O
terminate	O
records	B-General_Concept
,	O
commonly	O
CR	O
,	O
CRLF	O
or	O
LF	O
.	O
</s>
<s>
Unfortunately	O
,	O
the	O
CPU	O
time	O
required	O
to	O
parse	O
for	O
the	O
record	O
delimiter	B-Algorithm
is	O
significant	O
and	O
the	O
exclusion	O
of	O
the	O
record	O
delimiter	B-Algorithm
pattern	O
from	O
the	O
data	O
is	O
frequently	O
undesirable	O
.	O
</s>
<s>
The	O
writer	O
application	O
is	O
responsible	O
for	O
imposing	O
any	O
record	O
structure	O
and	O
the	O
reader	O
application	O
is	O
responsible	O
for	O
separating	O
out	O
the	O
records	B-General_Concept
.	O
</s>
<s>
Although	O
it	O
is	O
permitted	O
to	O
read	O
only	O
the	O
beginning	O
of	O
a	O
record	O
,	O
the	O
next	O
sequential	B-General_Concept
read	I-General_Concept
returns	O
the	O
next	O
collection	O
of	O
data	O
(	O
record	O
)	O
that	O
the	O
writer	O
intended	O
to	O
be	O
grouped	O
together	O
.	O
</s>
<s>
there	O
is	O
no	O
delimiter	B-Algorithm
character	O
.	O
</s>
<s>
This	O
is	O
minimal	O
in	O
a	O
file	O
where	O
all	O
the	O
records	B-General_Concept
are	O
the	O
same	O
length	O
.	O
</s>
<s>
On	O
a	O
file	O
composed	O
of	O
varying	O
length	O
records	B-General_Concept
a	O
maximum	O
record	O
length	O
is	O
defined	O
to	O
determine	O
the	O
size	O
of	O
the	O
length	O
metadata	O
associated	O
with	O
each	O
record	O
.	O
</s>
