Content deleted Content added
Peterh5322 (talk | contribs) |
|||
(23 intermediate revisions by 15 users not shown) | |||
Line 1:
{{short description|Operating System low level I/O API}}
{{See also|EXCPVR}}
{{
In [[IBM mainframe]] [[operating system]]s, '''Execute Channel Program''' ('''EXCP''') is a [[
| author=Reino Hannula
| title=Computers and Programming: A System/360-370 Assembler Language Approach
Line 26 ⟶ 27:
| isbn=978-0-07-032673-6
| page=558
}}</ref><ref>{{cite
| publisher = IBM
| title =
|
| section = Chapter 4. Executing Your Own Channel Programs
|
| section-url = https://www.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236861/$file/idas300_v2r4.pdf#page=181
</ref> is more specifically described in the OS System Programmer's Guide.<ref>{{cite manual|publisher=IBM|title=IBM System/360 Operating System System Programmer's Guide|id=C28-6550-2|date=March 1967|url=http://www.bitsavers.org/pdf/ibm/360/os/R01-08/C28-6550-2_OSsysPrmg_Mar67.pdf}}</ref>; EXCP for [[DOS/360 and successors]]<ref name="Stotts1990">{{cite book▼
| url = https://www.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236861/$file/idas300_v2r4.pdf
| id = SC23-6861-40}}
▲</ref> is more specifically described in the OS System Programmer's Guide.;<ref>{{cite
| author=Gary A. Stotts
| title=DOS/VSE: Introduction to the Operating System
Line 39 ⟶ 43:
| isbn=978-0-89435-332-1
| page=18
}}</ref> is more specifically described in DOS Supervisor and I/O Macros.<ref name=GC24-S037-12>{{cite
| title = DOS Supervisor and I/O Macros
| id = GC24-S037-12
| publisher = IBM
| url = http://bitsavers.org/pdf/ibm/360/dos/GC24-5037-12_DOS_Supervisor_and_IO_Macros_Oct73.pdf
}}
</ref><ref name=SC34-2709>
{{cite
| publisher = IBM
| title = IBM z/VSE Version 6 Release 1 System Macros User's Guide
Line 52 ⟶ 56:
| url = http://publibfp.dhe.ibm.com/epubs/pdf/iesmge40.pdf
| id = SC34-2709-00}}
</ref>
This article mostly reflects OS/360 through [[z/OS]]; some details are different for TOS/360 and DOS/360 through [[z/VSE]].
==Specifying datasets==
Using EXCP, legacy devices and legacy datasets may be operated on with relatively high performance. EXCP devices are OPENed (that is, are made available to the application) by specifying the [[Data Control Block]] (DCB) for OS and the DTFPH for DOS.
==Specifying I/O operations==
==Exits (Appendages)==▼
For OS/360 through z/OS, the program provides an ''Input/Output Block'' (IOB) to EXCP; if the program executes an EXCP to multiple IOBs, the system processes them in the order that they were requested. For DASD the IOB includes a seek address, ''IOBSEEK'', in the format MBBCCHHR, where M is the extent, BB is the bin for a data cell, CCHH is the cylinder and head, and R is the record number.
A comprehensive list of "[[User exit|exits]]" (called, in the EXCP context, "appendages") allows authorized programs to override or augment many of the system security and data integrity checks. Most of these appendages (really, closed subroutines) are supported for compatibility with earlier instances of the OS, but the functions of several have been modified or extended for MVS. The appendages are specified in the DCB as the last two characters of the module name IGG019xx, where xx = WA to Z9, inclusive. These module names are reserved for installation-written appendages. Any other name of the form IGG019xx is reserved for use by IBM access methods.<ref>IGG = I/O Support component prefix; 019 = Open SVC sub-component; xx = sub-function</ref> Appendages must reside in SYS1.SVCLIB (SYS1.LPALIB in SVS or later instances of the OS).▼
"An appendage is a programmer-written routine that provides additional
control over I/O operations during channel program execution."<ref>{{cite book
| publisher = IBM Corporation
| title = OS Data Management for System Programmers - Release 21
| id = GC28-6550-ll
| date = April 1973
| edition = Twelfth
| section = Appendages
| section-url = http://www.bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6550-11_Data_Management_for_System_Programmers_Rel_21.7_Apr73.pdf#page=43
| page = 46
| url = http://www.bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6550-11_Data_Management_for_System_Programmers_Rel_21.7_Apr73.pdf
| series = IBM Systems Reference Library
| access-date = June 28, 2022
}}
</ref> A comprehensive list of ''appendages''{{sfn|DFSMSdfp|loc=[https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236861/$file/idas300_v2r4.pdf#page=229 EXCP and EXCPVR Appendages]|pp=199-200}} ([[User exit|exits]] in the EXCP context) allows authorized programs{{efn|There are several type of authorization for the use of appendages:
*A program that is APF authorized, running in a system (0-7) key or in Supervisor Mode may use any appendage.
*A program may use any appendage that is automatically selected by OPEN for the use of an access method.
*A program may use any appendage that is defined at IPL time in IEAAPP00.{{sfn|DFSMSdfp|loc=[https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236861/$file/idas300_v2r4.pdf#page=231 The Authorized Appendage List (IEAAPP00)]|pp=201-202}}
▲
==Dataset integrity==
Normally, when a
==Legacy datasets only==
EXCP is sometimes confused with a direct access storage device access method, but it is not for direct access storage devices exclusively; rather, it is a general purpose low-level device access interface which supports any ''legacy'' device type and any ''legacy'' dataset organization. For accessing ''all'' device types and ''all'' dataset organizations, the more general privileged [[Start Input/Output]] interface (STARTIO) is available in MVS/370 and subsequent instances of the OS although it is not an officially supported interface.
==Simplified operations on direct access datasets==
Line 75 ⟶ 99:
==Relationship to supervisor==
EXCP's front-end is always in [[Task Control Block]] (TCB) mode, The normal mode for applications,<ref name="SoftwareAG">{{cite web |last1=Software AG |title=Natural zIIP Processing: TCBs, SRBs and Enclaves| url=https://documentation.softwareag.com/natural/nat825mf/ziip/naz-nat-processing.htm |access-date=Mar 22, 2021}}</ref> as EXCP is a Type 1 [[Supervisor Call instruction|SVC]].
In MVS/370 and subsequent instances of the OS, the EXCP processor invokes [[Start Input/Output|STARTIO]] to schedule execution of the channel program. Although the EXCP processor's back-end is always in [[Service Request Block]]{{efn|In OS/360, OS/VS1 and SVS there is no SRB mode and appendages run with interrupts disabled.}} (SRB) mode,<ref name=SoftwareAG /> the back-end contains emulation code which allows the appendages developed for earlier, pre-MVS instances of the OS, specifically for EXCP, to function largely as before and thereby to appear to be in TCB mode, for which these appendages were originally designed. This distinction can complicate conversion of certain ==Channel programs==
System/360 channel programs are a sequence of commands which are executed by the channel and the I/O device. Channel programs can be located anywhere in main storage. The channel program is a sequence of ''Channel Command Words'' (CCWs), which may be executed sequentially unless a branch, called
;[[IBM System/370|System/370]] with Dynamic Address Translation
:Adds the Channel Indirect Data Addressingfeature{{sfn|S370|loc=[http://bitsavers.org/pdf/ibm/370/princOps/GA22-7000-10_370_Principles_of_Operation_Sep87.pdf#page=396 CHANNEL INDIRECT DATA ADDRESSING]|pp=13-45-13-46}} and the Indirect Data Address{{sfn|S370|loc=[http://bitsavers.org/pdf/ibm/370/princOps/GA22-7000-10_370_Principles_of_Operation_Sep87.pdf#page=389 CHANNEL-COMMAND WORD]|p=13-38}} CCW flag.
;[[IBM System/370-XA|System/370-XA]]
:Adds format 1 CCWs{{sfn|S370-XA|loc=[http://bitsavers.org/pdf/ibm/370/princOps/SA22-7085-1_370-XA_Principles_of_Operation_Jan87.pdf#page=384 Channel-Command Word]|p=[http://bitsavers.org/pdf/ibm/370/princOps/SA22-7085-1_370-XA_Principles_of_Operation_Jan87.pdf#page=#385 15-24-15-25]}} with 31-bit addresses
}}
<pre>
bit 0 7 8 31
Line 88 ⟶ 119:
|Flags |000|reserved| count |
+------+---+--------+------------+
</pre>
Six commands are defined, in the low-order bits of the command field (0-7). The high-order four (or six) bits are ''modifiers'' ('M') for some commands, or are ignored. The commands are:
<pre>
0100 - Sense
1000 - Transfer in Channel (TIC)
Line 117 ⟶ 149:
The count field (48-63) indicate the number of bytes to be transferred by this command.
All eight bits of commands that initiate I/O operations are passed to the device. "The modifier bits specify to the device how the command is to be executed." For example, for the [[IBM 2305]] DASD the ''write'' command ('MMMMMM01'BX) may have the following values:<ref>{{cite book |last1=IBM Corporation |title=Reference Manual for IBM 2835 Storage Control and IBM 2305 Fixed Head Storage Module |date=August 1971 |page=17 |url=http://bitsavers.org/pdf/ibm/dasd/2305/GA26-1589-2_2835_Storage_Control_and_2305_Fixed_Head_Storage_Module_Aug71.pdf |
{| class="wikitable"
|-
Line 136 ⟶ 168:
| 0000 1101 || '0D'X || Write key and data
|}
==Notes==
{{notelist}}
==References==
;S/360
:{{cite book
| title = IBM System/360 Principles of Operation
| id = A22-6821-6
| date = January 1967
| edition = Seventh
| url = http://bitsavers.org/pdf/ibm/360/princOps/A22-6821-6_360PrincOpsJan67.pdf
| ref = {{sfnref|S360}}
| publisher = [[IBM]]
| access-date = Dec 4, 2019
}}
;S/370
:{{cite book
| title = IBM System/370 Principles of Operation
| id = GA22-7000-10
| date = September 1987
| edition = Eleventh
| url = http://bitsavers.org/pdf/ibm/370/princOps/GA22-7000-10_370_Principles_of_Operation_Sep87.pdf
| ref = {{sfnref|S370}}
| publisher = IBM
}}
;S/370-XA
:{{cite book
| title = IBM System/370 - Extended Architecture - Principles of Operation
| id = SA22-7085-1
| date = January 1987
| edition = Second
| url = http://bitsavers.org/pdf/ibm/370/princOps/SA22-7085-1_370-XA_Principles_of_Operation_Jan87.pdf
| ref = {{sfnref|S370-XA}}
| publisher = IBM
}}
;z/ARCH
:{{cite book
| title = z/Architecture - Principles of Operation
| id = SA22-7832-13
| date = May 2022
| edition = Fourteenth
| url = http://bitsavers.org/pdf/ibm/360/princOps/A22-6821-6_360PrincOpsJan67.pdf
| ref = {{sfnref|zArch}}
| publisher = [[IBM]]
| access-date = Dec 4, 2019
}}
;DFSMSdfp
:{{cite book
| title = z/OS Version 2 Release 4 DFSMSdfp Advanced Services
| date = August 2020
| url = https://www.ibm.com/servers/resourcelink/svc00100.nsf
| id = SC23-6861-40
| ref = {{sfnref|DFSMSdfp}}
| publisher = [[IBM]]
}}
<references />
|