{"id":233,"date":"2011-12-05T19:44:34","date_gmt":"2011-12-06T01:44:34","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=233"},"modified":"2021-04-17T18:26:21","modified_gmt":"2021-04-17T23:26:21","slug":"searching-the-vtoc","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=233","title":{"rendered":"Searching The VTOC"},"content":{"rendered":"<p>We can optimize our search of the VTOC for a specific Format 1 DSCB using a Search KEY Equal CCW command instead of reading each record and checking to see if it matches our data set name.<\/p>\n<p>In our CCW program we replace our Search ID to a Search KEY Equal command. \u00a0We need to change our read from a Read Key\/Data to only read the Data. \u00a0Here is our CCW program to search a track for a specific DSCB.<\/p>\n<pre>       DC    X'07',AL3(MBBCCHHR+1),X'@CCW#CC',X'00',AL2(6)  SEEK Cyl\/Trk\r\n       DC    X'29',AL3(DSNAME),X'@CCW#CC',X'00',AL2(44)     Search Key Equal\r\n       DC    X'08',AL3(*-8),X'@CSW#CC',X'00',AL2(0)         TIC\r\n       DC    X'06',AL3(BUFFER),X'00',X'00',AL2(96)          Read Data<\/pre>\n<p>If our channel program completes with normal status (Channel End+Device End) then we located and read the DSCB. \u00a0If the DSCB was not \u00a0located on the track we will receive Channel End + Device End + Unit Check and byte two of the Sense data will have the bit x&#8217;08&#8217; set indicating record not found.<\/p>\n<p>If the record is not found we can increment the track address (TT) and search again. \u00a0We can continue to search track by track until we reach the end of the VTOC extent.<\/p>\n<p>Actually, we can use the high-water mark in the Format 4 DSCB so we don&#8217;t need to search unused tracks. \u00a0The field DS4HPCHR contains the highest address of a Format 1 DSCB in the VTOC (the high-water mark). \u00a0Once we have searched the track indicated DS4HPCHR we can stop searching.<\/p>\n<p><a title=\"Partitioned Data Set Access\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=237\">[Next &#8211; Partitioned Data Set Access]<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can optimize our search of the VTOC for a specific Format 1 DSCB using a Search KEY Equal CCW command instead of reading each record and checking to see if it matches our data set name. In our CCW &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=233\">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-233","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-3L","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/233","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=233"}],"version-history":[{"count":4,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}