<s>
Basic	B-Application
Direct	I-Application
Access	I-Application
Method	I-Application
,	O
or	O
BDAM	B-Application
is	O
an	O
access	B-Application
method	I-Application
for	O
IBM	O
's	O
OS/360	B-Application
and	I-Application
successors	I-Application
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
on	O
System/360	B-Application
and	O
later	O
mainframes	B-Device
.	O
</s>
<s>
BDAM	B-Application
"	O
consists	O
of	O
routines	O
used	O
in	O
retrieving	O
data	O
from	O
,	O
and	O
storing	O
data	O
onto	O
,	O
direct	O
access	O
devices.	O
"	O
</s>
<s>
BDAM	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
high-end	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Basic	O
,	O
in	O
IBM	O
terminology	O
,	O
indicates	O
a	O
lower-level	O
access	B-Application
method	I-Application
that	O
deals	O
with	O
data	B-Application
sets	I-Application
in	O
terms	O
of	O
physical	O
blocks	B-General_Concept
and	O
does	O
not	O
provide	O
either	O
read-ahead	O
,	O
called	O
anticipatory	O
buffering	O
,	O
or	O
synchronization	O
that	O
is	O
,	O
the	O
user	O
program	O
has	O
to	O
explicitly	O
wait	O
for	O
completion	O
of	O
each	O
input/output	O
event	O
.	O
</s>
<s>
its	O
actual	O
device	O
address	O
,	O
its	O
relative	O
position	O
within	O
a	O
data	B-Application
set	I-Application
(	O
relative	O
block	O
number	O
)	O
,	O
or	O
the	O
relative	O
track	O
within	O
a	O
data	B-Application
set	I-Application
at	O
which	O
the	O
system	O
is	O
to	O
begin	O
a	O
search	O
.	O
</s>
<s>
BDAM	B-Application
provides	O
no	O
index	O
or	O
structure	O
to	O
the	O
file	O
except	O
as	O
programmed	O
by	O
the	O
application	O
.	O
</s>
<s>
In	O
many	O
applications	O
,	O
a	O
hashing	B-Error_Name
or	O
randomizing	O
function	O
may	O
be	O
used	O
to	O
assign	O
the	O
block	O
address	O
based	O
on	O
a	O
key	O
in	O
the	O
data	O
.	O
</s>
<s>
If	O
physical	O
keys	B-Application
are	O
used	O
,	O
the	O
key	O
of	O
the	O
last	O
record	O
within	O
the	O
block	O
must	O
be	O
written	O
as	O
the	O
key	O
for	O
that	O
block	O
.	O
</s>
<s>
The	O
BDAM	B-Application
application	O
program	O
interface	O
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>
<s>
BDAM	B-Application
is	O
still	O
supported	O
by	O
IBM	O
as	O
of	O
2012	O
.	O
</s>
<s>
Because	O
of	O
its	O
dependence	O
on	O
physical	O
device	O
geometry	O
new	O
IBM	O
direct-access	O
devices	O
used	O
with	O
z/OS	B-Application
emulate	O
IBM	B-Device
3390	I-Device
devices	O
regardless	O
of	O
their	O
real	O
physical	O
characteristics	O
.	O
</s>
<s>
The	O
programmer	O
specifies	O
DSORG	B-Application
=D	O
A	O
in	O
his	O
Data	B-Application
Control	I-Application
Block	I-Application
(	O
DCB	O
)	O
to	O
indicate	O
use	O
of	O
BDAM	B-Application
.	O
</s>
<s>
Space	O
can	O
be	O
in	O
up	O
to	O
16	O
extents	B-Application
on	O
each	O
volume	B-Application
.	O
</s>
<s>
The	O
data	B-Application
set	I-Application
(	O
equivalent	O
to	O
a	O
"	O
file	O
"	O
)	O
can	O
reside	O
in	O
up	O
to	O
255	O
extents	B-Application
across	O
multiple	O
volumes	O
.	O
</s>
<s>
If	O
the	O
application	O
has	O
a	O
dependency	O
on	O
the	O
space	O
being	O
on	O
contiguous	B-Architecture
tracks	O
,	O
you	O
can	O
allocate	O
space	O
for	O
the	O
direct	O
data	B-Application
set	I-Application
in	O
contiguous	B-Architecture
tracks	O
by	O
coding	O
SPACE	O
=(	O
,,	O
CONTIG	O
)	O
on	O
the	O
DD	O
statement	O
.	O
</s>
<s>
Direct	O
data	B-Application
sets	I-Application
must	O
be	O
preformatted	O
before	O
use	O
by	O
opening	O
them	O
as	O
output	O
and	O
writing	O
all	O
the	O
blocks	B-General_Concept
sequentially	O
.	O
</s>
<s>
As	O
a	O
basic	O
access	B-Application
method	I-Application
BDAM	B-Application
reads	O
and	O
writes	O
member	O
data	O
in	O
blocks	B-General_Concept
and	O
the	O
I/O	O
operation	O
proceeds	O
asynchronously	B-Architecture
and	O
must	O
be	O
tested	O
for	O
completion	O
using	O
the	O
CHECK	O
macro	O
.	O
</s>
<s>
BDAM	B-Application
uses	O
the	O
standard	O
system	O
macros	O
OPEN	O
,	O
CLOSE	O
,	O
READ	O
,	O
WRITE	O
,	O
and	O
CHECK	O
.	O
</s>
<s>
The	O
CHECK	O
macro	O
has	O
to	O
be	O
used	O
to	O
wait	O
for	O
completion	O
of	O
a	O
specific	O
operation	O
before	O
the	O
data	O
can	O
be	O
accessed	O
or	O
the	O
data	B-General_Concept
buffer	I-General_Concept
reused	O
.	O
</s>
<s>
Records	O
in	O
a	O
direct	O
data	B-Application
set	I-Application
can	O
contain	O
user-specified	O
recorded	O
keys	B-Application
of	O
up	O
to	O
255	O
bytes	O
—	O
all	O
keys	B-Application
in	O
a	O
file	O
must	O
be	O
the	O
same	O
length	O
.	O
</s>
<s>
Reads	O
and	O
writes	O
can	O
specify	O
a	O
key	O
in	O
addition	O
to	O
a	O
disk	O
address	O
,	O
and	O
BDAM	B-Application
will	O
search	O
starting	O
at	O
the	O
requested	O
block	O
up	O
to	O
the	O
entire	O
area	O
of	O
the	O
file	O
for	O
a	O
record	O
with	O
a	O
matching	O
key	O
.	O
</s>
<s>
This	O
allows	O
multiple	O
keys	B-Application
hashing	B-Error_Name
to	O
the	O
same	O
track	O
to	O
be	O
handled	O
automatically	O
by	O
the	O
I/O	O
subsystem	O
.	O
</s>
<s>
BDAM	B-Application
accepts	O
disk	O
addresses	O
as	O
either	O
actual	O
device	O
addresses	O
,	O
as	O
relative	O
track	O
addresses	O
,	O
or	O
as	O
relative	O
block	O
numbers	O
.	O
</s>
<s>
M	O
is	O
the	O
extent	O
number	O
for	O
files	O
with	O
more	O
than	O
one	O
extent	O
(	O
non-contiguous	O
files	O
)	O
.	O
</s>
<s>
Previously	O
this	O
indicated	O
the	O
bin	O
on	O
an	O
IBM	B-Device
2321	I-Device
Data	I-Device
Cell	I-Device
.	O
</s>
<s>
This	O
form	O
of	O
addressing	O
can	O
only	O
be	O
used	O
with	O
fixed	O
length	O
blocks	B-General_Concept
(	O
RECFM	O
=	O
F	O
)	O
.	O
</s>
