<s>
In	O
IBM	B-Device
mainframe	I-Device
operating	B-General_Concept
systems	I-General_Concept
,	O
queued	B-Application
sequential	I-Application
access	I-Application
method	I-Application
(	O
QSAM	B-Application
)	O
is	O
an	O
access	B-Application
method	I-Application
to	O
read	O
and	O
write	O
datasets	O
sequentially	O
.	O
</s>
<s>
QSAM	B-Application
is	O
available	O
on	O
OS/360	B-Application
,	O
OS/VS2	B-Application
,	O
MVS	B-Application
,	O
z/OS	B-Application
,	O
and	O
related	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
QSAM	B-Application
is	O
used	O
both	O
for	O
devices	O
that	O
are	O
naturally	O
sequential	O
,	O
such	O
as	O
punched	B-Architecture
card	I-Architecture
readers	O
and	O
punches	O
and	O
line	O
printers	O
,	O
and	O
for	O
data	O
on	O
devices	O
that	O
could	O
also	O
be	O
addressed	O
directly	O
,	O
such	O
as	O
magnetic	B-Architecture
disks	I-Architecture
.	O
</s>
<s>
QSAM	B-Application
offers	O
device	O
independence	O
:	O
to	O
the	O
extent	O
possible	O
,	O
the	O
same	O
API	B-Application
calls	O
are	O
used	O
for	O
different	O
devices	O
.	O
</s>
<s>
QSAM	B-Application
is	O
—	O
as	O
its	O
name	O
says	O
—	O
queued	O
,	O
in	O
this	O
specific	O
context	O
meaning	O
buffered	O
with	O
deblocking	O
of	O
reads	O
and	O
blocking	O
of	O
writes	O
.	O
</s>
<s>
It	O
allows	O
programs	O
to	O
read	O
and	O
write	O
logical	O
records	O
within	O
physical	O
blocks	O
of	O
data	O
,	O
as	O
opposed	O
to	O
the	O
less	O
advanced	O
basic	B-Application
sequential	I-Application
access	I-Application
method	I-Application
(	O
BSAM	O
)	O
which	O
allows	O
programs	O
to	O
access	O
physical	O
blocks	O
of	O
data	O
,	O
but	O
provides	O
no	O
support	O
for	O
accessing	O
logical	O
records	O
within	O
blocks	O
.	O
</s>
<s>
Indeed	O
,	O
QSAM	B-Application
manages	O
truncated	O
final	O
blocks	O
and	O
truncated	O
embedded	O
blocks	O
completely	O
transparently	O
to	O
the	O
user	O
.	O
</s>
<s>
The	O
QSAM	B-Application
application	B-Application
program	I-Application
interface	I-Application
can	O
be	O
compared	O
with	O
the	O
interface	O
offered	O
by	O
open	O
,	O
read	O
,	O
write	O
and	O
close	O
calls	O
(	O
using	O
file	O
handles	O
)	O
in	O
other	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
Unix	B-Application
and	O
Windows	B-Application
.	O
</s>
