<s>
In	O
IBM	B-Device
mainframe	I-Device
operating	B-General_Concept
systems	I-General_Concept
,	O
Execute	B-Application
Channel	I-Application
Program	I-Application
(	O
EXCP	B-Application
)	O
is	O
a	O
macro	O
generating	O
a	O
system	B-Operating_System
call	I-Operating_System
,	O
implemented	O
as	O
a	O
Supervisor	B-Operating_System
Call	I-Operating_System
instruction	I-Operating_System
,	O
for	O
low-level	O
device	O
access	O
,	O
where	O
the	O
programmer	O
is	O
responsible	O
for	O
providing	O
a	O
channel	O
program	O
—	O
a	O
list	O
of	O
device-specific	O
commands	O
(	O
CCWs	O
)	O
—	O
to	O
be	O
executed	O
by	O
I/O	O
channels	O
,	O
control	O
units	O
and	O
devices	O
.	O
</s>
<s>
EXCP	B-Application
for	O
OS/360	B-Application
and	I-Application
successors	I-Application
is	O
more	O
specifically	O
described	O
in	O
the	O
OS	O
System	O
Programmer	O
's	O
Guide	O
.	O
</s>
<s>
;	O
EXCP	B-Application
for	O
DOS/360	B-Application
and	I-Application
successors	I-Application
is	O
more	O
specifically	O
described	O
in	O
DOS	O
Supervisor	O
and	O
I/O	O
Macros	O
.	O
</s>
<s>
This	O
article	O
mostly	O
reflects	O
OS/360	B-Application
through	O
z/OS	B-Application
;	O
some	O
details	O
are	O
different	O
for	O
TOS/360	B-Application
and	O
DOS/360	O
through	O
z/VSE	B-Application
.	O
</s>
<s>
Using	O
EXCP	B-Application
,	O
legacy	O
devices	O
and	O
legacy	O
datasets	O
may	O
be	O
operated	O
on	O
with	O
relatively	O
high	O
performance	O
.	O
</s>
<s>
EXCP	B-Application
devices	O
are	O
OPENed	O
(	O
that	O
is	O
,	O
are	O
made	O
available	O
to	O
the	O
application	O
)	O
by	O
specifying	O
the	O
Data	B-Application
Control	I-Application
Block	I-Application
(	O
DCB	O
)	O
for	O
OS	O
and	O
the	O
DTFPH	O
for	O
DOS	O
.	O
</s>
<s>
For	O
OS/360	B-Application
through	O
z/OS	B-Application
,	O
the	O
program	O
provides	O
an	O
Input/Output	O
Block	O
(	O
IOB	O
)	O
to	O
EXCP	B-Application
;	O
if	O
the	O
program	O
executes	O
an	O
EXCP	B-Application
to	O
multiple	O
IOBs	O
,	O
the	O
system	O
processes	O
them	O
in	O
the	O
order	O
that	O
they	O
were	O
requested	O
.	O
</s>
<s>
For	O
DASD	O
the	O
IOB	O
includes	O
a	O
seek	O
address	O
,	O
IOBSEEK	O
,	O
in	O
the	O
format	O
MBBCCHHR	O
,	O
where	O
M	O
is	O
the	O
extent	B-Application
,	O
BB	O
is	O
the	O
bin	O
for	O
a	O
data	O
cell	O
,	O
CCHH	O
is	O
the	O
cylinder	O
and	O
head	O
,	O
and	O
R	O
is	O
the	O
record	O
number	O
.	O
</s>
<s>
A	O
comprehensive	O
list	O
of	O
appendages	O
(	O
exits	O
in	O
the	O
EXCP	B-Application
context	O
)	O
allows	O
authorized	O
programs	O
to	O
override	O
or	O
augment	O
many	O
of	O
the	O
system	O
security	O
and	O
data	O
integrity	O
checks	O
.	O
</s>
<s>
Normally	O
,	O
when	O
a	O
program	O
OPENs	O
a	O
DCB	O
for	O
EXCP	B-Application
,	O
OPEN	O
creates	O
a	O
Data	O
Extent	B-Application
Block	O
(	O
DEB	O
)	O
containing	O
each	O
extent	B-Application
for	O
the	O
first	O
volume	O
of	O
the	O
associated	O
dataset	O
;	O
however	O
,	O
for	O
parallel	O
mount	O
OPEN	O
creates	O
a	O
DEB	O
containing	O
all	O
extents	B-Application
for	O
all	O
volumes	O
.	O
</s>
<s>
Each	O
DEB	O
is	O
forward	O
-	O
and	O
backward-chained	O
to	O
the	O
DCB	O
,	O
and	O
EXCP	B-Application
checks	O
the	O
chaining	O
as	O
a	O
system	O
security	O
measure	O
,	O
as	O
the	O
DCB	O
resides	O
in	O
unprotected	O
user	O
storage	O
whereas	O
the	O
DEB	O
resides	O
in	O
protected	O
system	O
storage	O
,	O
Subpool	O
253	O
;	O
in	O
OS/VS1	O
and	O
OS/VS2	O
EXCP	B-Application
uses	O
DEBCHK	O
to	O
ensure	O
that	O
the	O
DEB	O
was	O
created	O
by	O
OPEN	O
.	O
</s>
<s>
For	O
DASD	O
,	O
EXCP	B-Application
checks	O
that	O
the	O
seek	O
address	O
in	O
the	O
IOB	O
is	O
within	O
one	O
of	O
the	O
extents	B-Application
,	O
and	O
uses	O
a	O
Set	O
File	O
Mask	O
to	O
,	O
e.g.	O
</s>
<s>
indicate	O
whether	O
the	O
extent	B-Application
is	O
cylinder	O
or	O
track	O
oriented	O
,	O
whether	O
write	O
is	O
permitted	O
;	O
this	O
prevents	O
a	O
seek	O
out	O
of	O
the	O
specified	O
track	O
(	O
cylinder	O
)	O
.	O
</s>
<s>
If	O
the	O
programmer	O
tries	O
to	O
read	O
past	O
the	O
end	O
of	O
the	O
track	O
(	O
cylinder	O
)	O
,	O
a	O
unit	O
check	O
occurs	O
and	O
error	O
recovery	O
restarts	O
the	O
channel	O
program	O
with	O
the	O
next	O
track	O
(	O
cylinder	O
)	O
of	O
the	O
current	O
extent	B-Application
.	O
</s>
<s>
If	O
the	O
operation	O
goes	O
beyond	O
the	O
end	O
of	O
the	O
extent	B-Application
,	O
EXCP	B-Application
calls	O
the	O
end	O
of	O
extent	B-Application
appendage	O
,	O
which	O
may	O
update	O
the	O
IOB	O
and	O
request	O
either	O
that	O
EXCP	B-Application
reissue	O
the	O
request	O
or	O
that	O
EXCP	B-Application
terminate	O
it	O
.	O
</s>
<s>
EXCP	B-Application
is	O
sometimes	O
confused	O
with	O
a	O
direct	O
access	O
storage	O
device	O
access	O
method	O
,	O
but	O
it	O
is	O
not	O
for	O
direct	O
access	O
storage	O
devices	O
exclusively	O
;	O
rather	O
,	O
it	O
is	O
a	O
general	O
purpose	O
low-level	O
device	O
access	O
interface	O
which	O
supports	O
any	O
legacy	O
device	O
type	O
and	O
any	O
legacy	O
dataset	O
organization	O
.	O
</s>
<s>
For	O
accessing	O
all	O
device	O
types	O
and	O
all	O
dataset	O
organizations	O
,	O
the	O
more	O
general	O
Start	B-Application
Input/Output	I-Application
interface	O
(	O
STARTIO	B-Application
)	O
is	O
available	O
in	O
MVS/370	O
and	O
subsequent	O
instances	O
of	O
the	O
OS	O
although	O
it	O
is	O
not	O
an	O
officially	O
supported	O
interface	O
.	O
</s>
<s>
A	O
variation	O
of	O
EXCP	B-Application
is	O
Execute	B-Application
Direct	I-Application
Access	I-Application
Program	I-Application
(	O
XDAP	B-Application
)	O
,	O
which	O
is	O
used	O
for	O
accessing	O
direct	O
access	O
storage	O
only	O
,	O
and	O
is	O
provided	O
for	O
reading	O
and	O
updating	O
existing	O
direct	O
access	O
storage	O
records	O
.	O
</s>
<s>
XDAP	B-Application
cannot	O
be	O
used	O
to	O
add	O
records	O
,	O
but	O
XDAP	B-Application
can	O
be	O
utilized	O
along	O
with	O
BSAM	O
or	O
BPAM	O
to	O
effect	O
record	O
additions	O
to	O
such	O
datasets	O
,	O
and	O
several	O
OS	O
components	O
utilize	O
XDAP	B-Application
in	O
this	O
manner	O
(	O
the	O
Linkage	O
Editor	O
,	O
IEWL	O
,	O
in	O
particular	O
)	O
.	O
</s>
<s>
EXCP	B-Application
may	O
also	O
be	O
used	O
to	O
access	O
communications	O
devices	O
attached	O
to	O
IBM	B-Device
2701	I-Device
,	O
2702	B-Device
and	O
2703	B-Device
communications	O
controllers	O
and	O
IBM	O
370x	O
or	O
Amdahl	O
470x	O
front-end	O
processors	O
(	O
and	O
their	O
respective	O
follow-ons	O
)	O
operating	O
in	O
emulator	O
mode	O
(	O
EP	O
)	O
or	O
partitioned	O
emulator	O
mode	O
(	O
PEP	O
)	O
.	O
</s>
<s>
EXCP	B-Application
's	O
front-end	O
is	O
always	O
in	O
Task	B-Operating_System
Control	I-Operating_System
Block	I-Operating_System
(	O
TCB	O
)	O
mode	O
,	O
The	O
normal	O
mode	O
for	O
applications	O
,	O
as	O
EXCP	B-Application
is	O
a	O
Type	O
1	O
SVC	B-Operating_System
.	O
</s>
<s>
In	O
MVS/370	O
and	O
subsequent	O
instances	O
of	O
the	O
OS	O
,	O
the	O
EXCP	B-Application
processor	O
invokes	O
STARTIO	B-Application
to	O
schedule	O
execution	O
of	O
the	O
channel	O
program	O
.	O
</s>
<s>
Although	O
the	O
EXCP	B-Application
processor	O
's	O
back-end	O
is	O
always	O
in	O
Service	B-Application
Request	I-Application
Block	I-Application
(	O
SRB	O
)	O
mode	O
,	O
the	O
back-end	O
contains	O
emulation	O
code	O
which	O
allows	O
the	O
appendages	O
developed	O
for	O
earlier	O
,	O
pre-MVS	O
instances	O
of	O
the	O
OS	O
,	O
specifically	O
for	O
EXCP	B-Application
,	O
to	O
function	O
largely	O
as	O
before	O
and	O
thereby	O
to	O
appear	O
to	O
be	O
in	O
TCB	O
mode	O
,	O
for	O
which	O
these	O
appendages	O
were	O
originally	O
designed	O
.	O
</s>
<s>
For	O
example	O
,	O
for	O
the	O
IBM	B-Device
2305	I-Device
DASD	O
the	O
write	O
command	O
( 	O
 '	O
MMMMMM01'BX	O
)	O
may	O
have	O
the	O
following	O
values	O
:	O
</s>
