{"id":374,"date":"2012-01-15T15:06:04","date_gmt":"2012-01-15T21:06:04","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=374"},"modified":"2021-04-17T18:21:14","modified_gmt":"2021-04-17T23:21:14","slug":"unit-control-block-ucb","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=374","title":{"rendered":"Unit Control Block &#8211; @UCB"},"content":{"rendered":"<p>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.<\/p>\n<pre>@UCB     DSECT ,\r\nUCBNEXT  DS    A                  NEXT UCB\r\nUCBCUA   DS    XL2                DEVICE ADDRESS\r\n*\r\nUCBDEVT  DS    X                  DEVICE TYPE\r\nUCBTRDR  EQU   1                  - CARD READER\r\nUCBTPUN  EQU   2                  - CARD PUNCH\r\nUCBTPRT  EQU   3                  - PRINTER\r\nUCBTDASD EQU   4                  - DASD\r\nUCBTTAPE EQU   5                  - TAPE\r\nUCBTTERM EQU   6                  - TERMINAL\r\n*\r\nUCBSTAT  DS    X                  DEVICE STATUS\r\nUCBSONLN EQU   X'80'              DEVICE ONLINE\r\nUCBSMNT  EQU   X'08'              MOUNTED\r\n*\r\nUCBDEVNM DS    CL4                DEVICE TYPE NAME\r\nUCBIOB   DS    A                  PTR TO IOB QUEUE\r\nUCBINTR  DS    A                  INTERRUPT ROUTINE\r\nUCBINTRP DS    F                  INTERRUPT PARAMETER\r\nUCBDVEXT DS    A                  DEVICE EXTENSION\r\nUCBCSW   DS    XL8                CHANNEL STATUS WORD<\/pre>\n<p>The UCB&#8217;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.<\/p>\n<p>The UCBIOB field points to the IORB queue. The first IORB is the currently active request. \u00a0If additional requests are scheduled for the device they are chained off the active request.<\/p>\n<p>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. \u00a0If this field is zero then no action is taken and the interrupt is ignored. \u00a0The UCBINTRP is used to maintain a parameter value to be used the the interrupt routine.<\/p>\n<p>UCBDVEXT is a pointer to a device specific extension. \u00a0If there is no device specific extension associated with a device this field is zero.<\/p>\n<p>The UCBCSW field contains a copy of the Channel Status Word at the time the interrupt occurred.<\/p>\n<pre>@UCBDASD DSECT ,\r\nUCBDVOL  DS    CL6                VOLUME SERIAL\r\nUCBDTRKC DS    H                  TRACKS\/CYLINDER\r\nUCBDTRKZ DS    H                  TRACK SIZE\r\nUCBDVTOC DS    0XL8               VTOC EXTENT\r\nUCBDVTOB DS    XL4                VTOC BEGIN CCHH\r\nUCBDVTOE DS    XL4                VTOC END   CCHH<\/pre>\n<p>This is the initial description of the DASD Device Specific Extension. \u00a0I say initial because it may change as the DASD specific I\/O code is developed.<\/p>\n<p>It contains the Volume Serial, the number of tracks per cylinder, the track size and the VTOC extent description. \u00a0This information will be filled in when the DASD Volume is mounted.<\/p>\n<p>[Next &#8211; <a title=\"I\/O Request Block \u2013 @IORB\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=377\">I\/O Request Block &#8211; @IORB<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=374\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"template-page-builder-no-sidebar.php","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-374","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-62","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=374"}],"version-history":[{"count":5,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":471,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/374\/revisions\/471"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}