{"id":186,"date":"2011-11-28T16:15:16","date_gmt":"2011-11-28T22:15:16","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=186"},"modified":"2021-04-17T18:27:14","modified_gmt":"2021-04-17T23:27:14","slug":"dasd-volume-label-record-and-vtoc","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=186","title":{"rendered":"DASD Volume Label Record and VTOC"},"content":{"rendered":"<p>Now we can write a program to read and dump some records from our DASD volume.\u00a0 Because I formatted the volume there should be three data records on Cylinder zero, Track zero (R1,R2, and R3).\u00a0 Record 3 is the Volume Label record and will have the address of the Volume Table Of Contents (VTOC).<\/p>\n<p>The Volume Record has a 4-byte key and an 80-byte data area.\u00a0 We are only concerned with the following data fields:<\/p>\n<pre>Key:\r\n     CL4    'VOL1'\r\n\r\nData:\r\n     CL4    'VOL1'\r\n     CL6    volser\r\n     CL1\r\n     XL5    vtoc address (cchhr)<\/pre>\n<p>The VTOC is a special file that describes the data sets and free space on the volume.\u00a0 The records in the VTOC are called Data Set Control Block (DSCB) records.\u00a0 Each record consists of a 44-byte key and a 96-byte data area. There are six different types of DSCB records (Format 1 through Format 6).<\/p>\n<ul>\n<li>Format 1 DSCB &#8211; Describes a data set<\/li>\n<li>Format 2 DSCB &#8211; Describes characteristics of an ISAM data set<\/li>\n<li>Format 3 DSCB &#8211; Describes additional extents of a data set<\/li>\n<li>Format 4 DSCB &#8211; Describes the VTOC data set<\/li>\n<li>Format 5 DSCB &#8211; Describes free space<\/li>\n<li>Format 6 DSCB &#8211; Shared cylinder allocation<\/li>\n<\/ul>\n<p>The first DSCB is always a Format 4.\u00a0 The 44-byte key contains a special string of characters x&#8217;040404&#8230;.04&#8242; which identifies it as the FMT4 DSCB. Data of interest to us include:<\/p>\n<ul>\n<li>DS4HPCHR &#8211; Highest Address of a Format 1 DSCB<\/li>\n<li>DS4DEVSZ &#8211; Cylinders\/Device &amp; Tracks\/Cylinder<\/li>\n<li>DS4DEVTK &#8211; Device Track Length<\/li>\n<li>DS4DEVDT &#8211; Number of DSCB&#8217;s per Track<\/li>\n<li>DS4DEVDB &#8211; Number of Directory Blocks per Track<\/li>\n<li>DS4VTOCE &#8211; VTOC Exten Description<\/li>\n<\/ul>\n<p>This information will allow us to read the VTOC and find other data sets located on this volume.<\/p>\n<p>[Next &#8211; <a title=\"DISK1 Program\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=194\">DISK1 Program<\/a>]<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now we can write a program to read and dump some records from our DASD volume.\u00a0 Because I formatted the volume there should be three data records on Cylinder zero, Track zero (R1,R2, and R3).\u00a0 Record 3 is the Volume &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=186\">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-186","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-30","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/186","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=186"}],"version-history":[{"count":5,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}