The Unit Control Block (UCB) maintains the status of an I/O Device. There is one UCB for each I/O device managed by the OS.
@UCB DSECT , UCBNEXT DS A NEXT UCB UCBCUA DS XL2 DEVICE ADDRESS * UCBDEVT DS X DEVICE TYPE UCBTRDR EQU 1 - CARD READER UCBTPUN EQU 2 - CARD PUNCH UCBTPRT EQU 3 - PRINTER UCBTDASD EQU 4 - DASD UCBTTAPE EQU 5 - TAPE UCBTTERM EQU 6 - TERMINAL * UCBSTAT DS X DEVICE STATUS UCBSONLN EQU X'80' DEVICE ONLINE UCBSMNT EQU X'08' MOUNTED * UCBDEVNM DS CL4 DEVICE TYPE NAME UCBIOB DS A PTR TO IOB QUEUE UCBINTR DS A INTERRUPT ROUTINE UCBINTRP DS F INTERRUPT PARAMETER UCBDVEXT DS A DEVICE EXTENSION UCBCSW DS XL8 CHANNEL STATUS WORD
The UCB’s are chained together and must be arranged in ascending sequence based on the Device Address. The UCBDEVT field indicates the class of device. The actual device type is specified in the UCBDEVNM field as a four-byte character field.
The UCBIOB field points to the IORB queue. The first IORB is the currently active request. If additional requests are scheduled for the device they are chained off the active request.
The UCBINTR field contains a pointer to the interrupt routine to receive control if no active IORB is queued when an I/O Interrupt occurs. If this field is zero then no action is taken and the interrupt is ignored. The UCBINTRP is used to maintain a parameter value to be used the the interrupt routine.
UCBDVEXT is a pointer to a device specific extension. If there is no device specific extension associated with a device this field is zero.
The UCBCSW field contains a copy of the Channel Status Word at the time the interrupt occurred.
@UCBDASD DSECT , UCBDVOL DS CL6 VOLUME SERIAL UCBDTRKC DS H TRACKS/CYLINDER UCBDTRKZ DS H TRACK SIZE UCBDVTOC DS 0XL8 VTOC EXTENT UCBDVTOB DS XL4 VTOC BEGIN CCHH UCBDVTOE DS XL4 VTOC END CCHH
This is the initial description of the DASD Device Specific Extension. I say initial because it may change as the DASD specific I/O code is developed.
It contains the Volume Serial, the number of tracks per cylinder, the track size and the VTOC extent description. This information will be filled in when the DASD Volume is mounted.
[Next – I/O Request Block – @IORB]