Execute Channel Program: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.03b - Bot T20 CW#61 - WP:WCW project (Reference before punctuation)
Use z/OS reference for OS, not z/VSE reference; see also; scare quotes; extents
Line 1:
{{short description|Operating System low level I/O API}}
{{See also|EXCPVR}}
{{refimprove|date=June 2012}}
In [[IBM mainframe]] [[operating system]]s, '''Execute Channel Program''' ('''EXCP''') is a [[Supervisor Call instruction|supervisor call]] for low-level device access, where the programmer is responsible for providing a ''[[Channel program#Channel Program|channel program]]''—a list of device-specific commands (CCWs)—to be executed by I/O channels, control units and devices.<ref name="Hannula1974">{{cite book
Line 28 ⟶ 29:
}}</ref><ref>{{cite manual
| publisher = IBM
| title = IBM z/VSEOS Version 62 Release 1 System4 MacrosDFSMSdfp User'sAdvanced GuideServices
| year date = 2015August 2020
| section = Chapter 4. Executing Your Own Channel Programs
| url = http://publibfp.dhe.ibm.com/epubs/pdf/iesmge40.pdf
| idpages = SC34-2709151-00}}210
| sectionurl = https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236861/$file/idas300_v2r4.pdf#page=181
| url = https://www-01.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 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
| author=Gary A. Stotts
Line 58 ⟶ 62:
==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==
For OS/360 through z/OS, the program provides an 'Input/Output Block'' (IOB) to EXCP; if the program does 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.
 
==Exits (Appendages)==
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).
 
==Dataset integrity==
Normally, when a deviceprogram isOPENs OPENeda DCB for EXCP, onlyOPEN thecreates first "extent" is represented in thea ''Data Extent Block'' (DEB). Among other information each DEB contains information on the ___location and size ofcontaining each ''[[Extent (file systems)|extent]]'' for the first volume of the dataassociated setdataset; however, for ''parallel mount'' OPEN creates a DEB containing all extents for all volumes. (Each DEB is forward- and backward-chained to the DCB, and EXCP checks the chaining as a system security measure, as the DCB resides in unprotected user storage whereas the DEB resides in protected system storage, Subpool 253).; If,in forOS/VS1 example,and theOS/VS2 programmerEXCP triesuses DEBCHK to readensure pastthat the endDEB ofwas ancreated extentby OPEN. For DASD, anEXCP exceptionchecks occursthat andthe seek address in the operationIOB is suppressedwithin one of the extents, therebyand preventinguses a data''Set integrityFile Mask'' to, exposuree.g. Shouldindicate whether the DEBextent includeis additionalcylinder extents,or thetrack channeloriented, programwhether maywrite beis updatedpermitted; bythis theprevents programmera toseek referout toof the nextspecified extenttrack and(cylinder). If the EXCPprogrammer maytries beto reissued,read orpast the end of extentthe exittrack appendage(cylinder), ifa provided,''unit maycheck'' updateoccurs and error recovery restarts the channel program towith the next track (cylinder) of the current extent. andIf the operation goes beyond the end of the extent, EXCP calls the ''end of extent'' appendage, which may beupdate re-driventhe withoutIOB firstand goingrequest througheither that EXCP reissue the request or that EXCP processorterminate it.
 
==Legacy datasets only==
Line 75 ⟶ 82:
 
==Relationship to supervisor==
EXCP's front-end is always in TCB mode, 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 SRB mode, 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 "roll-your-own" access methods and applications to MVS.
 
==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 "''Transfer In Channel"'' (TIC), is executed, or the channel returns a [[IBM_System/360 architecture#CSW Status modifier|status modifier]]. Each CCW is a doubleword (eight bytes) as follows:<ref>{{cite book |last1=IBM Corporation |title=IBM System/360 Principles of Operation |date=January 1967 |pages=84-121 |url=http://bitsavers.org/pdf/ibm/360/princOps/A22-6821-6_360PrincOpsJan67.pdf |accessdate=Dec 4, 2019}}</ref>
<pre>
bit 0 7 8 31