<s>
Virtual	B-Application
Storage	I-Application
Access	I-Application
Method	I-Application
(	O
VSAM	O
)	O
is	O
an	O
IBM	O
DASD	B-Application
file	O
storage	O
access	B-Application
method	I-Application
,	O
first	O
used	O
in	O
the	O
OS/VS1	B-Application
,	O
OS/VS2	B-Application
Release	B-Application
1	I-Application
(	O
SVS	O
)	O
and	O
Release	B-Application
2	I-Application
(	O
MVS	B-Application
)	O
operating	O
systems	O
,	O
later	O
used	O
throughout	O
the	O
Multiple	B-Application
Virtual	I-Application
Storage	I-Application
(	O
MVS	B-Application
)	O
architecture	O
and	O
now	O
in	O
z/OS	B-Application
.	O
</s>
<s>
Originally	O
a	O
record-oriented	B-Application
filesystem	I-Application
,	O
VSAM	O
comprises	O
four	O
data	B-Application
set	I-Application
organizations	O
:	O
key-sequenced	B-Application
(	O
KSDS	O
)	O
,	O
relative	B-Application
record	I-Application
(	O
RRDS	B-Application
)	O
,	O
entry-sequenced	B-Application
(	O
ESDS	O
)	O
and	O
linear	B-Application
(	O
LDS	O
)	O
.	O
</s>
<s>
The	O
KSDS	O
,	O
RRDS	B-Application
and	O
ESDS	O
organizations	O
contain	O
records	O
,	O
while	O
the	O
LDS	O
organization	O
(	O
added	O
later	O
to	O
VSAM	O
)	O
simply	O
contains	O
a	O
sequence	O
of	O
pages	O
with	O
no	O
intrinsic	O
record	O
structure	O
,	O
for	O
use	O
as	O
a	O
memory-mapped	B-General_Concept
file	I-General_Concept
.	O
</s>
<s>
An	O
IBM	O
Redbook	O
named	O
"	O
VSAM	O
PRIMER	O
"	O
(	O
especially	O
when	O
used	O
with	O
the	O
"	O
Virtual	B-Application
Storage	I-Application
Access	I-Application
Method	I-Application
(	O
VSAM	O
)	O
Options	O
for	O
Advanced	O
Applications	O
"	O
manual	O
)	O
explains	O
the	O
concepts	O
needed	O
to	O
make	O
use	O
of	O
VSAM	O
.	O
</s>
<s>
IBM	O
uses	O
the	O
term	O
data	B-Application
set	I-Application
in	O
official	O
documentation	O
as	O
a	O
synonym	O
of	O
file	O
,	O
and	O
direct	B-Application
access	I-Application
storage	I-Application
device	I-Application
(	O
DASD	B-Application
)	O
because	O
it	O
supported	O
other	O
devices	O
similar	O
to	O
disk	O
drives	O
.	O
</s>
<s>
Control	O
Areas	O
are	O
the	O
units	O
of	O
allocation	O
so	O
,	O
when	O
a	O
VSAM	O
data	B-Application
set	I-Application
is	O
defined	O
,	O
an	O
integral	O
number	O
of	O
Control	O
Areas	O
will	O
be	O
allocated	O
.	O
</s>
<s>
The	O
Access	B-Application
Method	I-Application
Services	I-Application
utility	O
program	O
IDCAMS	O
is	O
commonly	O
used	O
to	O
manipulate	O
(	O
"	O
delete	O
and	O
define	O
"	O
)	O
VSAM	O
data	B-Application
sets	I-Application
.	O
</s>
<s>
Custom	O
programs	O
can	O
access	O
VSAM	O
datasets	O
through	O
Data	O
Definition	O
(	O
DD	O
)	O
statements	O
in	O
Job	B-Application
Control	I-Application
Language	I-Application
(	O
JCL	O
)	O
,	O
via	O
dynamic	O
allocation	O
or	O
in	O
online	O
regions	O
such	O
as	O
in	O
Customer	B-Application
Information	I-Application
Control	I-Application
System	I-Application
(	O
CICS	B-Application
)	O
.	O
</s>
<s>
Both	O
IMS/DB	B-Application
and	O
Db2	B-Application
are	O
implemented	O
on	O
top	O
of	O
VSAM	O
and	O
use	O
its	O
underlying	O
data	B-General_Concept
structures	I-General_Concept
.	O
</s>
<s>
The	O
physical	O
organization	O
of	O
VSAM	O
data	B-Application
sets	I-Application
differs	O
considerably	O
from	O
the	O
organizations	O
used	O
by	O
other	O
access	B-Application
methods	I-Application
,	O
as	O
follows	O
.	O
</s>
<s>
The	O
size	O
of	O
the	O
CI	O
and	O
CA	O
is	O
determined	O
by	O
the	O
Access	B-Application
Method	I-Application
Services	I-Application
(	O
AMS	O
)	O
,	O
and	O
the	O
way	O
in	O
which	O
they	O
are	O
used	O
is	O
normally	O
not	O
visible	O
to	O
the	O
user	O
.	O
</s>
<s>
You	O
can	O
use	O
three	O
types	O
of	O
record-orientated	O
file	O
organization	O
with	O
VSAM	O
(	O
the	O
contents	O
of	O
linear	B-Application
data	I-Application
sets	I-Application
have	O
no	O
record	O
structure	O
)	O
:	O
</s>
<s>
The	O
data	B-General_Concept
structure	I-General_Concept
used	O
by	O
a	O
KSDS	O
is	O
nowadays	O
known	O
as	O
a	O
B+	O
tree	O
.	O
</s>
<s>
An	O
RRDS	B-Application
may	O
have	O
an	O
index	O
defined	O
to	O
it	O
to	O
enable	O
access	O
via	O
keys	O
,	O
by	O
defining	O
an	O
Alternate	O
Index	O
.	O
</s>
<s>
LSR	O
access	O
is	O
easy	O
to	O
achieve	O
from	O
CICS	B-Application
.	O
</s>
<s>
Distributed	O
File	O
Management	O
(	O
DFM	O
)	O
,	O
an	O
implementation	O
of	O
a	O
Distributed	B-Operating_System
Data	I-Operating_System
Management	I-Operating_System
Architecture	I-Operating_System
server	O
,	O
enables	O
programs	O
on	O
remote	O
computers	O
to	O
create	O
,	O
manage	O
,	O
and	O
access	O
VSAM	O
files	O
.	O
</s>
<s>
Sharing	O
of	O
VSAM	O
data	O
between	O
CICS	B-Application
regions	O
can	O
be	O
done	O
by	O
VSAM	O
Record-Level	O
Sharing	O
(	O
RLS	O
)	O
.	O
</s>
<s>
Logging	O
and	O
commit	O
processing	O
remain	O
the	O
responsibility	O
of	O
CICS	B-Application
which	O
means	O
that	O
sharing	O
of	O
VSAM	O
data	O
outside	O
a	O
CICS	B-Application
environment	O
is	O
severely	O
restricted	O
.	O
</s>
<s>
Sharing	O
between	O
CICS	B-Application
regions	O
and	O
batch	O
jobs	O
requires	O
Transactional	O
VSAM	O
,	O
DFSMStvs	O
.	O
</s>
<s>
This	O
is	O
an	O
optional	O
program	O
that	O
builds	O
on	O
VSAM	O
RLS	O
by	O
adding	O
logging	O
and	O
two-phase	O
commit	O
,	O
using	O
underlying	O
z/OS	B-Application
system	O
services	O
.	O
</s>
<s>
VSAM	O
was	O
introduced	O
as	O
a	O
replacement	O
for	O
older	O
access	B-Application
methods	I-Application
and	O
was	O
intended	O
to	O
add	O
function	O
,	O
to	O
be	O
easier	O
to	O
use	O
and	O
to	O
overcome	O
problems	O
of	O
performance	O
and	O
device-dependence	O
.	O
</s>
<s>
VSAM	O
was	O
introduced	O
in	O
the	O
1970s	O
when	O
IBM	O
announced	O
virtual	B-Architecture
storage	I-Architecture
operating	O
systems	O
(	O
DOS/VS	O
,	O
OS/VS1	B-Application
and	O
OS/VS2	B-Application
)	O
for	O
its	O
new	O
System/370	O
series	O
,	O
as	O
successors	O
of	O
the	O
DOS/360	B-Application
and	O
OS/360	B-Application
operating	O
systems	O
running	O
on	O
its	O
System/360	O
computer	O
series	O
.	O
</s>
<s>
While	O
backwards	O
compatibility	O
was	O
maintained	O
,	O
the	O
older	O
access	B-Application
methods	I-Application
suffered	O
from	O
performance	O
problems	O
due	O
to	O
the	O
address	O
translation	O
required	O
for	O
virtual	B-Architecture
storage	I-Architecture
.	O
</s>
<s>
The	O
KSDS	O
organization	O
was	O
designed	O
to	O
replace	O
ISAM	B-Application
,	O
the	O
Indexed	B-Application
Sequential	I-Application
Access	I-Application
Method	I-Application
.	O
</s>
<s>
Changes	O
in	O
disk	O
technology	O
had	O
meant	O
that	O
searching	O
for	O
data	O
in	O
ISAM	B-Application
data	B-Application
sets	I-Application
had	O
become	O
very	O
inefficient	O
.	O
</s>
<s>
It	O
was	O
also	O
difficult	O
to	O
move	O
ISAM	B-Application
data	B-Application
sets	I-Application
as	O
there	O
were	O
embedded	O
pointers	O
to	O
physical	O
disk	O
locations	O
which	O
became	O
invalid	O
if	O
the	O
data	B-Application
set	I-Application
was	O
moved	O
.	O
</s>
<s>
IBM	O
also	O
provided	O
a	O
compatibility	O
interface	O
to	O
allow	O
programs	O
coded	O
to	O
use	O
ISAM	B-Application
to	O
use	O
a	O
KSDS	O
instead	O
.	O
</s>
<s>
The	O
RRDS	B-Application
organization	O
was	O
designed	O
to	O
replace	O
BDAM	B-Application
,	O
the	O
Basic	B-Application
Direct	I-Application
Access	I-Application
Method	I-Application
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
BDAM	B-Application
data	B-Application
sets	I-Application
contained	O
embedded	O
pointers	O
which	O
prevented	O
them	O
from	O
being	O
moved	O
.	O
</s>
<s>
However	O
,	O
most	O
BDAM	B-Application
data	B-Application
sets	I-Application
did	O
not	O
and	O
the	O
incentive	O
to	O
move	O
from	O
BDAM	B-Application
to	O
VSAM	O
RRDS	B-Application
was	O
much	O
less	O
compelling	O
than	O
that	O
to	O
move	O
from	O
ISAM	B-Application
to	O
VSAM	O
KSDS	O
.	O
</s>
<s>
Linear	B-Application
data	I-Application
sets	I-Application
were	O
added	O
later	O
,	O
followed	O
by	O
VSAM	O
RLS	O
and	O
then	O
Transactional	O
VSAM	O
.	O
</s>
