COMPILATION LISTING OF SEGMENT vrmu_search Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0927.2 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 vrmu_search: proc (I_search_info_ptr, I_cursor_ptr, O_code); 8 9 /* BEGIN_DESCRIPTION 10* This proceedure must be preceeded by a call to vrmu_search_init for its setup. 11*It will search the given cursors iocb for the tuples that meed the 12*vrm_search_list constraints either using scan records or key search depending 13*on the cursor type. 14* 15* END_DESCRIPTION 16* 17* HISTORY 18* 82-09-23 Roger Lackey : Originally written 19* 83-04-14 Roger Lackey : rewritten to use new vrm_search_list structure. 20* 83-05-24 Roger Lackey: replaced call to record_status to get record_ptr 21* with call to vrmu_cv_vf_desc_to_ptr 22* 83-09-08 Roger Lackey : Modified extensively to use new vrm_search_info 23* structure and new calling sequence . 24* 83-10-01 Roger Lackey : Modified to do seek head on multi-attribute keys 25* 83-10-11 Roger Lackey : Changed calculation of max_items to account for 26* number of items already_returned. 27* 83-10-25 Roger Lackey : Removed init_required = "1"b when 28* vrm_search_list.num_and_groups = 0 29* As vrmu_scan_records$scan_records_init is done in 30* vrmu_search_init. 31* 32**/ 33 34 /* vrmu_search: proc (I_search_info_ptr, I_cursor_ptr, O_tuple_id, O_tuple_ptr, O_code); */ 35 36 37 dcl I_search_info_ptr ptr parameter; /* Pointer vrm_search_info structure */ 38 dcl I_cursor_ptr ptr parameter; /* Pointer to vrm_cursor */ 39 dcl O_code fixed bin (35) parameter; /* Error code */ 40 41 vrm_search_info_ptr = I_search_info_ptr; 42 vrm_cursor_ptr = I_cursor_ptr; 43 O_code = 0; 44 45 vrm_search_info.num_items_returned = 0; 46 tid_required = vrm_search_info.tuple_tid_required; 47 pointer_required = vrm_search_info.tuple_pointer_required; 48 49 if ^pointer_required then max_items = 50 vrm_search_info.max_number_values - vrm_search_info.cur_id_list_ix; 51 else max_items = min (vrm_search_info.max_number_values - vrm_search_info.cur_id_list_ix, MAX_SEARCH_ITEMS); 52 53 vrm_open_info_ptr = vrm_cursor.open_info_ptr; /* Needed local variables */ 54 vrm_rel_desc_ptr = vrm_cursor.vrm_relation_desc_ptr; 55 vrm_search_list_ptr = vrm_cursor.search_list_ptr; 56 file_id = vrm_rel_desc.file_id; 57 if vrm_search_info.meter_sw then vrm_search_info.last_call_stats.num_times_search_called = 58 vrm_search_info.last_call_stats.num_times_search_called + 1; 59 60 iocb_ptr = vrm_cursor.iocb_ptr; 61 62 tuple_ptr = null; 63 scan_records_flag = "0"b; /* Until we decide other wise */ 64 init_required = "0"b; 65 cur_ag = vrm_search_list.current_and_group; 66 67 68 if vrm_search_list.num_and_groups = 0 then do; 69 num_constraints = 0; 70 scan_records_flag = "1"b; 71 end; 72 else do; 73 if vrm_search_list.and_groups (cur_ag).do_not_use_sw then 74 call error (dm_error_$no_tuple); 75 76 num_constraints = vrm_search_list.and_groups (cur_ag).num_cons_in_this_and_group; 77 78 if vrm_search_list.and_groups (cur_ag).collection_id_supplied_sw & 79 vrm_search_list.and_groups (cur_ag).collection_id = RELATION_COLLECTION_ID then 80 scan_records_flag = "1"b; 81 82 if vrm_search_list.and_groups (cur_ag).must_initialize_sw then 83 init_required = "1"b; 84 end; 85 86 if ^scan_records_flag then do; 87 kh.rel_id = vrm_rel_desc.rel_id; 88 kh.index_id = substr (vrm_search_list.and_groups (cur_ag).collection_id, 1, 8); 89 kh.mbz = "0"b; 90 end; 91 92 93 if init_required then do; 94 95 if scan_records_flag then do; 96 call vrmu_scan_records$scan_records_init (iocb_ptr, code); 97 if code ^= 0 then call error (code); 98 if vrm_search_list.num_and_groups > 0 then 99 vrm_search_list.and_groups (cur_ag).must_initialize_sw = "0"b; /* We just did it */ 100 end; 101 else call key_seek_head; 102 end; 103 104 if scan_records_flag then do; /* scan_records looks at all records in the file 105* with out touching the b-tree (key-tree) */ 106 107 vsrn.iocb_ptr = iocb_ptr; 108 vsrn.stationary_rec_expected = vrm_rel_desc.switches.stationary_records; 109 vsrn.scan_records_should_lock = ^vrm_open_info.switches.shared; 110 vsrn.rel_id = vrm_rel_desc.rel_id; 111 112 got_one = "0"b; /* This gets turned on when 113* a tuples that passes all search contraints */ 114 115 do while (vrm_search_info.num_items_returned < max_items); 116 117 call vrmu_scan_records$next (addr (vsrn), code); 118 119 if code ^= 0 then do; 120 if code = error_table_$end_of_info then 121 call error (dm_error_$no_tuple); 122 else call error (code); 123 end; 124 tuple_ptr = vsrn.record_ptr; 125 126 if vrm_search_info.meter_sw then vrm_search_info.last_call_stats.records_searched = 127 vrm_search_info.last_call_stats.records_searched + 1; 128 129 if num_constraints = 0 then got_one = "1"b; /* No search specification */ 130 131 else got_one = and_group_constraints_ok (cur_ag); 132 133 if got_one then do; /* If passes all search constraints */ 134 got_one = "0"b; 135 136 vrm_search_info.num_items_returned = vrm_search_info.num_items_returned + 1; 137 if pointer_required then 138 vrm_search_info.tup_ptr (vrm_search_info.num_items_returned) = tuple_ptr; 139 140 if tid_required then do; 141 if vsrn.descriptor (1) = 0 then /* Cause we gota return tuple id */ 142 call get_tuple_tid (tuple_ptr, vsrn.descriptor (1)); 143 144 vfd_ptr = addr (vsrn.descriptor (1)); 145 tid_ptr = addr (tuple_id); 146 tid.non_std_desc = "1"b; 147 tid.temp = "0"b; 148 tid.file_id = file_id; 149 tid.comp_num = vfd.comp_number; 150 tid.offset = vfd.comp_offset; 151 vrm_search_info.tid_list_ptr -> element_id_list.id (vrm_search_info.num_items_returned + vrm_search_info.cur_id_list_ix) = tuple_id; 152 end; 153 end; 154 end; /* END do while (^got_one) */ 155 end; /* END scan_records */ 156 157 else do; /* Some kind of key search */ 158 159 unspec (gk.flags) = "0"b; 160 gk.flags.position_spec.current = "1"b; 161 162 163 key_templet_ptr = addr (gk.key_len); /* Pointer to key returned from get_key control order */ 164 key_templet.unused = "0"b; 165 166 do while (vrm_search_info.num_items_returned < max_items); 167 168 call get_next; /* Get next tuple 169* that passes key constraints */ 170 end; 171 172 end; /* END else do some kind of key search */ 173 174 exit: return; 175 176 /* * * * * * * * * * * * * * * * * * get_next * * * * * * * * * * */ 177 178 get_next: proc; 179 180 /* 181* If a seek_head was done, this will now read that key. 182* 183* If a search specification with constraints that need to be applied to the 184* key exists they will be done here without reading the record. 185* 186* If non-key-constraints exists, they will also be check after getting a 187* pointer to the tuple. 188* 189* If an attribute fails its search specification constraint, 190* another key is read until one is found that passes or until 191* no more keys exists for the cursor */ 192 193 194 195 got_one = "0"b; 196 197 do while (^got_one); /* Do until we get a tuple that passes 198* the search_specification or exhaust key */ 199 200 call iox_$control (iocb_ptr, "get_key", addr (gk), code); 201 if code ^= 0 then do; 202 if code = error_table_$no_record | 203 code = error_table_$asynch_deletion | 204 code = error_table_$no_key then 205 call error (dm_error_$no_tuple); 206 else call error (code); 207 end; 208 209 if vrm_search_info.meter_sw then vrm_search_info.last_call_stats.keys_read = 210 vrm_search_info.last_call_stats.keys_read + 1; 211 212 /* If first three character are not index id for this collection then we are done */ 213 214 if substr (gk.key, 1, 3) ^= kh_char_3 then /* Exausted this cursors keys */ 215 call error (dm_error_$no_tuple); 216 217 218 /* Apply search_spec constraints to key attributes first */ 219 220 if vrm_search_list.and_groups (cur_ag).num_key_cons_in_this_and_group > 0 then do; 221 222 cons_ok = "1"b; 223 224 if ^vrm_search_list.and_groups (cur_ag).full_key_equal_only_sw then 225 do c = 1 to vrm_search_list.and_groups (cur_ag).num_key_cons_in_this_and_group while (cons_ok); 226 227 if vrm_search_list.and_groups (cur_ag).cons (c).key_attr_sw then do; 228 229 if vrm_search_info.meter_sw then vrm_search_info.last_call_stats.keys_compared = 230 vrm_search_info.last_call_stats.keys_compared + 1; 231 232 spec_val_ptr = vrm_search_list.and_groups (cur_ag).cons (c).encoded_key_ptr; 233 234 if vrm_search_list.and_groups (cur_ag).cons (c).key_offset = 0 then 235 tuple_key_val_ptr = addr (key_templet.key_data); 236 else tuple_key_val_ptr = add_bit_offset_ (addr (key_templet.key_data), 237 (vrm_search_list.and_groups (cur_ag).cons (c).key_offset)); 238 239 vrm_collection_info_ptr = 240 vrm_search_list.and_groups (cur_ag).collection_info_ptr; 241 call key_compare (tuple_key_val_ptr, spec_val_ptr, 242 vrm_search_list.and_groups (cur_ag).cons (c).key_bit_length, 243 vrm_search_list.and_groups (cur_ag).cons (c).operator, cons_ok); 244 if cons_ok & vrm_search_info.meter_sw 245 then vrm_search_info.last_call_stats.key_hits = 246 vrm_search_info.last_call_stats.key_hits + 1; 247 248 if ^cons_ok & vrm_search_list (cur_ag).cons (c).and_group_search_terminator then do; 249 250 251 if vrm_search_list.and_groups (cur_ag).cons (c).operator = 1 then 252 vrm_search_info.upper_limit_exceeded_sw = "1"b; 253 else do; 254 op = terminator_op (vrm_search_list.and_groups (cur_ag).cons (c).operator); 255 256 call key_compare (tuple_key_val_ptr, spec_val_ptr, 257 vrm_search_list.and_groups (cur_ag).cons (c).key_bit_length, 258 op, vrm_search_info.upper_limit_exceeded_sw); 259 260 end; 261 if vrm_search_info.upper_limit_exceeded_sw then do; 262 vrm_search_list.and_groups (cur_ag).do_not_use_sw = "1"b; 263 call error (dm_error_$no_tuple); 264 end; 265 266 end; /* END if ^cons_ok */ 267 268 end; /* END if key_attr */ 269 end; /* END do c = 1 to ** */ 270 271 if cons_ok then do; 272 273 call get_tid_and_tuple_ptr; /* Internal procedure */ 274 if tuple_ptr ^= null then 275 got_one = and_group_constraints_ok (cur_ag); /* Check non-key constraints */ 276 else got_one = "1"b; /* By key comparison only */ 277 end; /* END if cons_ok */ 278 279 end; /* END if vrm_search_list.and_groups (cur_ag).num_key_cons_in_this_and_group > 0 then do */ 280 281 282 else do; /* No key constraints */ 283 call get_tid_and_tuple_ptr; /* Internal procedure */ 284 285 got_one = and_group_constraints_ok (cur_ag); /* Check non-key constraints */ 286 287 end; 288 289 if got_one then do; 290 vrm_search_info.num_items_returned = vrm_search_info.num_items_returned + 1; 291 292 if pointer_required then 293 vrm_search_info.tup_ptr (vrm_search_info.num_items_returned) = tuple_ptr; 294 if tid_required then 295 vrm_search_info.tid_list_ptr -> 296 element_id_list.id (vrm_search_info.num_items_returned + 297 vrm_search_info.cur_id_list_ix) = tuple_id; 298 299 end; 300 301 if vrm_search_list.and_groups (cur_ag).full_key_equal_only_sw then do; 302 vrm_search_list.and_groups (cur_ag).do_not_use_sw = "1"b; 303 call error (dm_error_$no_tuple); 304 end; 305 306 /* In all cases position to next key */ 307 308 call iox_$position (iocb_ptr, 0, 1, code); 309 if code ^= 0 then do; /* Maybe EOF */ 310 if code = error_table_$end_of_info | 311 code = error_table_$asynch_deletion 312 then call error (dm_error_$no_tuple); 313 else call error (code); 314 end; 315 316 end; /* end do while (^got_one); */ 317 318 /* If we get here we have a tuple that has passed all constraints of current and group */ 319 320 end get_next; 321 322 /* * * * * * * * * * * * get_tid_and_tuple_ptr * * * * * * * * * * * * * */ 323 324 get_tid_and_tuple_ptr: proc; 325 326 if gk.desc < 0 then do; /* If negative it is a tid (non standard vfile desc ) */ 327 unspec (tuple_id) = unspec (gk.desc); 328 tid_ptr = addr (gk.desc); 329 vfd_ptr = addr (vfile_desc); 330 331 vfile_desc = 0; 332 vfd.comp_number = tid.comp_num; 333 vfd.comp_offset = tid.offset; 334 335 end; 336 else do; /* It is a real vfile desc */ 337 vfile_desc = gk.desc; 338 vfd_ptr = addr (gk.desc); 339 tid_ptr = addr (tuple_id); 340 tid.non_std_desc = "1"b; 341 tid.temp = "0"b; 342 tid.file_id = file_id; 343 tid.comp_num = vfd.comp_number; 344 tid.offset = vfd.comp_offset; 345 346 end; 347 348 if pointer_required | 349 (vrm_search_list.and_groups (cur_ag).num_cons_in_this_and_group - 350 vrm_search_list.and_groups (cur_ag).num_key_cons_in_this_and_group) > 0 351 then do; /* Convert vfile desc to record ptr */ 352 353 call vrmu_cv_vf_desc_to_ptr (iocb_ptr, vfile_desc, tuple_ptr, rec_len, code); 354 if code ^= 0 then call error (code); 355 356 end; 357 358 end get_tid_and_tuple_ptr; 359 360 /* * * * * * * * * * * * * * key_compare * * * * * * * * * * * * */ 361 362 /* Compares two key values using one of six operators */ 363 364 key_compare: proc (I_key_one_ptr, I_key_two_ptr, I_key_len, I_operator, O_result); 365 366 dcl I_key_one_ptr ptr parameter; /* Pointer to first key value */ 367 dcl I_key_two_ptr ptr parameter; /* Pointer to second key value */ 368 dcl I_key_len fixed bin (17) unal parameter; /* Length of both key values in bits */ 369 dcl I_operator fixed bin (17) unal parameter; /* Comparison operator */ 370 dcl O_result bit (1) aligned parameter; /* Returned results One = true */ 371 372 dcl key_one bit (I_key_len) unaligned based (I_key_one_ptr); 373 dcl key_two bit (I_key_len) unaligned based (I_key_two_ptr); 374 375 goto k_compare (I_operator); 376 377 k_compare (1): /* Operator: = */ 378 if key_one = key_two then O_result = "1"b; 379 else O_result = "0"b; 380 return; 381 382 k_compare (2): /* Operator: > */ 383 if key_one > key_two then O_result = "1"b; 384 else O_result = "0"b; 385 return; 386 387 k_compare (3): /* Operator: >= */ 388 if key_one >= key_two then O_result = "1"b; 389 else O_result = "0"b; 390 return; 391 392 k_compare (5): /* Operator: ^= */ 393 if key_one ^= key_two then O_result = "1"b; 394 else O_result = "0"b; 395 return; 396 397 k_compare (6): /* Operator: <= */ 398 if key_one <= key_two then O_result = "1"b; 399 else O_result = "0"b; 400 return; 401 402 k_compare (7): /* Operator: < */ 403 if key_one < key_two then O_result = "1"b; 404 else O_result = "0"b; 405 return; 406 407 end key_compare; 408 409 /* * * * * * * * * * * * * * * * get_tuple_tid * * * * * * * * * * * * */ 410 411 /* Gets a tid given the tuple pointer */ 412 413 get_tuple_tid: proc (I_tuple_ptr, O_vf_desc); 414 415 dcl I_tuple_ptr ptr parameter; 416 dcl O_vf_desc fixed bin (35) parameter; 417 418 tuple_ptr = I_tuple_ptr; 419 420 bit_len = 9 * vrm_rel_desc.maximum_data_length; 421 bd_ptr = addr (tuple.data); 422 key_source_list.number_of_values = vrm_rel_desc.number_primary_key_attrs; 423 424 do i = 1 to vrm_rel_desc.number_primary_key_attrs;/* copy out values and build key source list */ 425 vrm_attr_info_ptr = addr (vrm_rel_desc.attr (vrm_open_info.primary_key_info_ptr -> 426 vrm_collection_info.attribute (i).attr_index)); /* to attr info */ 427 key_source_list.val_info.val_ptr (i) = addr (key_vals (i)); /* set source value ptr */ 428 key_source_list.val_info.desc_ptr (i) = addr (vrm_attr_info.descriptor); /* and ptr to descr. */ 429 if vrm_attr_info.varying then do; /* if var. attr. */ 430 offset = tuple.var_offsets (vrm_attr_info.bit_offset); /* bit offset */ 431 key_source_list.val_info.val_ptr (i) = addr (bit_data (offset)); 432 end; /* if varying */ 433 else 434 key_source_list.val_info.val_ptr (i) -> bit_str = 435 substr (data_str, vrm_attr_info.bit_offset, vrm_attr_info.bit_length); 436 end; /* building key source list */ 437 438 439 call vrmu_encode_key (addr (key_source_list), pgk.key, (0), code); 440 if code ^= 0 then call error (code); 441 442 /* Now finish up the header on the primary key */ 443 444 index_ptr = addrel (addr (pgk.key), 1); /* past length word of varying string */ 445 index_value_length = 0; /* save warning flag */ 446 index.rel_id = vrm_rel_desc.rel_id; 447 index.index_id = "0"b; 448 449 unspec (pgk.flags) = "0"b; 450 pgk.input_key = "1"b; 451 pgk.flags.pspec.head_size = length (pgk.key); 452 453 call iox_$control (vrm_cursor.iocb_ptr, "get_key", addr (pgk), code); 454 if code ^= 0 then call error (code); 455 456 O_vf_desc = pgk.descriptor; 457 return; 458 459 end get_tuple_tid; 460 461 /* * * * * * * * * * * * * * and_group_constraints_ok * * * * * * * * * * * */ 462 463 and_group_constraints_ok: proc (and_group_ix) returns (bit (1)); 464 465 dcl and_group_ix fixed bin parameter; 466 467 ret_val = "0"b; 468 469 if num_constraints > 0 then do; 470 471 cons_ok = "1"b; 472 473 do c = 1 to vrm_search_list.and_groups (and_group_ix).num_cons_in_this_and_group while (cons_ok); 474 check_it = "0"b; 475 476 if vrm_search_list.and_groups (and_group_ix).num_key_cons_in_this_and_group > 0 then do; 477 if ^vrm_search_list.and_groups (and_group_ix).cons (c).key_attr_sw then 478 check_it = "1"b; 479 end; 480 else check_it = "1"b; 481 482 if check_it then do; /* Check this constraint */ 483 if vrm_search_info.meter_sw then vrm_search_info.last_call_stats.non_key_compares = 484 vrm_search_info.last_call_stats.non_key_compares + 1; 485 486 compare_op = vrm_search_list.and_groups (and_group_ix).cons (c).operator; 487 spec_val_ptr = vrm_search_list.and_groups (and_group_ix).cons (c).val_ptr; 488 desc_ptr = vrm_search_list.and_groups (and_group_ix).cons (c).attr_desc_ptr; 489 fx = vrm_search_list.and_groups (and_group_ix).cons (c).attr_index; 490 491 if vrm_rel_desc.attr (fx).varying then /* Set pointer to attribute in tuple */ 492 tuple_attr_ptr = 493 add_bit_offset_ (addr (tuple.data), 494 tuple.var_offsets (vrm_rel_desc.attr (fx).bit_offset) - 1); 495 496 else tuple_attr_ptr = 497 add_bit_offset_ (addr (tuple.data), vrm_rel_desc.attr (fx).bit_offset - 1); 498 /* Note that a -1 is needed because a bit_offset = 1 indicate 499* the first bit which is realy an off set of 0 */ 500 501 call vrmu_compare_values (tuple_attr_ptr, desc_ptr, spec_val_ptr, desc_ptr, 502 compare_op, cons_ok, code); 503 if code ^= 0 then call error (code); 504 if vrm_search_info.meter_sw & cons_ok then vrm_search_info.last_call_stats.non_key_hits = 505 vrm_search_info.last_call_stats.non_key_hits + 1; 506 end; 507 end; /* END DO c = 1 to */ 508 509 if cons_ok then ret_val = "1"b; 510 511 end; /* END if num_constrainsts > 0 */ 512 else ret_val = "1"b; /* No search specification */ 513 return (ret_val); 514 515 end and_group_constraints_ok; 516 517 /* * * * * * * * * * * * key_seek_head * * * * * * * * * * * * * * * */ 518 519 520 key_seek_head: proc; 521 522 key_source_list.number_of_values = 0; 523 seek_head_type = 0; /* Until we know differnt */ 524 seek_head_key = kh_char_3; 525 526 if vrm_search_list.and_groups (cur_ag).seek_key_con_ix ^= 0 then do; 527 528 if vrm_search_list.and_groups (cur_ag).multi_attr_seek_head_sw then do; 529 num_key_head_attrs = 0; 530 531 do z = 1 to vrm_search_list.and_groups (cur_ag).num_key_cons_in_this_and_group; 532 533 if vrm_search_list.and_groups (cur_ag).cons (z).seek_head_sw then do; 534 num_key_head_attrs = num_key_head_attrs + 1; 535 536 shx = vrm_search_list.and_groups (cur_ag).cons (z).attr_position_in_key; 537 key_source_list.val_info (shx).val_ptr = 538 vrm_search_list.and_groups (cur_ag).cons (z).val_ptr; 539 key_source_list.val_info (shx).desc_ptr = 540 vrm_search_list.and_groups (cur_ag).cons (z).attr_desc_ptr; 541 end; 542 end; /* END do z */ 543 544 key_source_list.number_of_values = num_key_head_attrs; 545 call vrmu_encode_key (addr (key_source_list), temp_key, (0), code); 546 if code ^= 0 then call error (code); 547 548 key_ptr = addcharno (addr (temp_key), 7); 549 key_len = length (temp_key) - 3; 550 end; 551 552 else do; /* key_source_list.number_of_values = 0 */ 553 shx = vrm_search_list.and_groups (cur_ag).seek_key_con_ix; 554 555 key_ptr = vrm_search_list.and_groups (cur_ag).cons (shx).encoded_key_ptr; 556 key_len = vrm_search_list.and_groups (cur_ag).cons (shx).encoded_key_length; 557 end; 558 559 seek_head_key = seek_head_key || key; /* seek_head_key already had the vrm_cursor.key_head prefix 560* for this cursor in it */ 561 562 563 if vrm_search_list.and_groups (cur_ag).cons (shx).operator = 1 then 564 seek_head_type = 0; 565 else if vrm_search_list.and_groups (cur_ag).cons (shx).operator = 3 then 566 seek_head_type = 1; 567 else seek_head_type = 2; 568 569 if vrm_search_info.meter_sw then 570 vrm_search_info.last_call_stats.special_seek_heads = 571 vrm_search_info.last_call_stats.special_seek_heads + 1; 572 end; 573 574 else if vrm_search_info.meter_sw then 575 vrm_search_info.last_call_stats.seek_heads = 576 vrm_search_info.last_call_stats.seek_heads + 1; 577 578 579 seek_head.rel_type = seek_head_type; 580 seek_head.num_head_chars = length (seek_head_key); 581 seek_head.key_chars = seek_head_key; 582 583 call iox_$control (iocb_ptr, "seek_head", addr (seek_head), code); 584 if code ^= 0 then do; 585 if code = error_table_$no_record | code = error_table_$no_key then 586 call error (dm_error_$no_tuple); 587 else call error (code); 588 end; 589 590 vrm_search_list.and_groups (cur_ag).must_initialize_sw = "0"b; /* We just did it */ 591 592 end key_seek_head; 593 594 /* * * * * * * * * * * * * * * error * * * * * * * * * * * * * * * */ 595 596 error: proc (cd); 597 598 dcl cd fixed bin (35) parameter; 599 600 O_code = cd; 601 goto exit; 602 603 end error; 604 1 1 /* BEGIN INCLUDE vrm_cursor.incl.pl1 */ 1 2 1 3 /* 83-05-26 Roger Lackey : Modifyed for relation cursors */ 1 4 1 5 dcl vrm_cursor_ptr pointer; /* Pointer to this structure */ 1 6 1 7 dcl 1 vrm_cursor aligned based (vrm_cursor_ptr), /* vfile relation manager cursor */ 1 8 2 opening_id bit (36) aligned, /* ID of opening associated with this cursor */ 1 9 2 debug_sw unal, /* Undefined MBZ */ 1 10 3 trace_open bit (1) unal, /* Show opening of iocb cursor creation time */ 1 11 3 pad bit (35) unal, 1 12 2 switches, 1 13 3 shared bit (1) unal, /* Other processes can use this relation */ 1 14 3 meter_sw bit (1) unal, /* On = Keep meters for this cursor */ 1 15 3 pad bit (7) unal, /* Unsed */ 1 16 2 opening_mode fixed bin, /* Opening mode for this cursor (8 = KSQR 10 = KSQU) */ 1 17 2 open_info_ptr pointer, /* Pointer to parent opening info structure */ 1 18 2 vrm_relation_desc_ptr pointer, /* Pointer to parent rel desc */ 1 19 2 iocb_ptr pointer, /* Pointer to attach iocb */ 1 20 2 secondary_iocb_ptr ptr, /* Second iocb_ptr used by vrmu_search */ 1 21 2 search_list_ptr ptr, /* Pointer to search_list */ 1 22 2 search_keys_ptr ptr, /* Pointer to search_keys array */ 1 23 2 meter_ptr pointer, /* Pointer metering str if metering is on or null */ 1 24 2 vrm_iocb_list_block_ptr pointer, /* Pointer to vrm_iocb_list_block that contains this cursors iocb */ 1 25 2 vrm_iocb_list_block_iocbs_ix fixed bin; /* Index into list_block.iocbs for location of iocb */ 1 26 1 27 1 28 /* END INCLUDE vrm_cursor.incl.pl1 */ 605 606 2 1 /* BEGIN INCLUDE vrm_search_list.incl.pl1 */ 2 2 2 3 dcl vrm_search_list_ptr pointer; 2 4 dcl vsl_number_of_and_groups fixed bin; 2 5 dcl vsl_max_number_of_constraints fixed bin; 2 6 2 7 dcl 1 vrm_search_list aligned based (vrm_search_list_ptr), 2 8 2 num_and_groups fixed bin (17) unal, /* Number of and groups in list */ 2 9 2 max_num_constraints fixed bin (17) unal, /* Maximum number of constraints in any search spec and group */ 2 10 2 current_and_group fixed bin (17) unal, 2 11 2 and_groups (vsl_number_of_and_groups refer (vrm_search_list.num_and_groups)), 2 12 3 num_cons_in_this_and_group fixed bin (17) unal, /* Number of constriants in this and group */ 2 13 3 num_key_cons_in_this_and_group fixed bin (17) unal, /* Number of key constraints in this and group */ 2 14 3 num_seek_key_attr_count fixed bin (17) unal, /* Number of attributes in seek key */ 2 15 3 pos_of_first_bad_key_tail_attr fixed bin (17) unal, /* Key attribute position of first bad key_tail attr */ 2 16 3 seek_key_con_ix fixed bin (17) unal, /* Constraint index to be used for seek key */ 2 17 3 do_not_use_sw bit (1) unal, /* ON = Do not use this and group 2 18* it has been optimized out */ 2 19 3 collection_id_supplied_sw bit (1) unal, /* ON IF collection id was supplied in search_spec */ 2 20 3 must_initialize_sw bit (1) unal, /* ON = init must be done */ 2 21 3 multi_attr_seek_head_sw bit (1) unal, /* ON = Seek head is a multi-attribute key */ 2 22 3 full_key_equal_only_sw bit (1) unal, /* ON = All operators in seek head key were = 2 23* and it was the full key */ 2 24 3 unused bit (13) unal, 2 25 3 collection_id bit (36) aligned, /* Collection id if supplied_sw is ON */ 2 26 3 collection_info_ptr ptr unal, /* IF collection_id_supplied_sw = ON then 2 27* this is vrm_collection_info_ptr */ 2 28 2 29 3 cons (vsl_max_number_of_constraints refer (vrm_search_list.max_num_constraints)) 2 30 like constraint_info; 2 31 2 32 dcl 1 constraint_info based, 2 33 2 34 2 val_ptr pointer unal, /* Pointer to data value */ 2 35 2 attr_desc_ptr pointer unal, /* Pointer to vrm_rel_desc attribute descriptor 2 36* for this attribute */ 2 37 2 encoded_key_ptr pointer unal, /* Pointer to encoded key value if this field 2 38* is a key for this cursor */ 2 39 2 encoded_key_length fixed bin (17) unal, /* Length in char of encoded key */ 2 40 2 search_keys_ix fixed bin (17) unal, /* Index into encoded_key table for this key */ 2 41 2 key_offset fixed bin (17) unal, /* Offset to first bit in key of this encoded key */ 2 42 2 key_bit_length fixed bin (17) unal, /* Length of key in bits */ 2 43 2 attr_position_in_key fixed bin (17) unal, /* Attribute position in multi key collection */ 2 44 2 operator fixed bin (17) unal, /* Operator for this constraint */ 2 45 2 attr_index fixed bin (17) unal, /* Index into vrm_rel_desc.attr array */ 2 46 2 attr_bit_length fixed bin (35), /* Bit length of attribute */ 2 47 2 valid_sw bit (1) unal, /* ON = This constraint is valid for spec */ 2 48 2 key_head_sw bit (1) unal, /* ON = this attribute can be used as a key head with 2 49* this cursor */ 2 50 2 key_attr_sw bit (1) unal, /* ON = This attribute is a key in this cursor */ 2 51 2 and_group_search_terminator bit (1) unal, /* ON = If this attribute is an and group teminator */ 2 52 2 seek_head_sw bit (1) unal, /* ON = this attribute was used 2 53* for seek_head */ 2 54 2 seek_head_tail_sw bit (1) unal, /* ON = This attr can be used for the last attribute of a seek head */ 2 55 2 unused bit (30) unal; /* Unused bits */ 2 56 2 57 2 58 dcl search_keys_ptr ptr; 2 59 dcl alloc_num_search_keys fixed bin (17); 2 60 dcl search_keys (alloc_num_search_keys) char (256) varying based (search_keys_ptr); 2 61 2 62 /* END INCLUDE vrm_search_list.incl.pl1 */ 607 608 3 1 /* BEGIN INCLUDE vrm_open_info.incl.pl1 */ 3 2 3 3 /* R. Harvey 82-11-02 3 4* 82-09-82 Roger Lackey: added iocb_list_ptr */ 3 5 3 6 dcl 1 vrm_open_info aligned based (vrm_open_info_ptr), /* Vfile relation description */ 3 7 2 version char (8), /* Version number of this structure */ 3 8 2 opening_id bit (36) aligned, /* Opening id associated with this desc */ 3 9 2 file_uid bit (36) aligned, /* Unique id of msf dir */ 3 10 2 number_of_openings fixed bin, /* Number of separate calls to vrm$open */ 3 11 2 switches, 3 12 3 shared bit (1) unal, /* Open relation in shared mode */ 3 13 3 pad bit (35) unal init ("0"b), /* Unused must be zero */ 3 14 2 database_dir_path char (168) varying, /* Absolute path of database */ 3 15 2 relation_name char (30) varying, /* Name of relation */ 3 16 2 relation_model_ptr pointer, /* Pointer to the relation_model in the relation itself or a temp seg */ 3 17 2 com_ptr pointer, /* Temp seg for cursors and scratch space */ 3 18 2 iocb_list_ptr pointer, /* Pointer to first vrm_iocb_list_block */ 3 19 2 primary_key_info_ptr pointer, /* Special case collection info ptr */ 3 20 2 number_of_index_collections fixed bin, /* Count of index collections (include primary key) */ 3 21 2 index_collection (voi_no_of_index_collections 3 22 refer (vrm_open_info.number_of_index_collections)), 3 23 3 id bit (36), 3 24 3 info_ptr ptr unal; /* Points to more detailed info */ 3 25 3 26 3 27 dcl VRM_OPEN_INFO_VERSION_1 char (8) int static options (constant) init (" 1"); 3 28 dcl vrm_open_info_ptr ptr; 3 29 dcl voi_no_of_index_collections fixed bin; 3 30 3 31 /* END INCLUDE vrm_open_info.incl.pl1 */ 609 610 4 1 /* BEGIN INCLUDE vrm_rel_desc.incl.pl1 */ 4 2 4 3 /* 83-05-26 Roger Lackey : Added vrm_attr_info.key_head bit for relation_cursors */ 4 4 4 5 dcl 1 vrm_rel_desc based (vrm_rel_desc_ptr), 4 6 2 record_id bit (12) unal, /* Distinguish us from tuples and collection records */ 4 7 2 version char (8), /* Version of this structure */ 4 8 2 file_id bit (7), /* Value of file id from model */ 4 9 2 rel_id bit (12), /* Relation id */ 4 10 2 switches, 4 11 3 MRDS_compatible bit (1) unal, /* For pre-relation_manager_ MRDS */ 4 12 3 stationary_records 4 13 bit (1) unal, /* On = stationary */ 4 14 3 indexed bit (1) unal, /* This relation has attributes with secondary indices */ 4 15 3 pad bit (33) unal, 4 16 2 var_offset fixed bin (35), /* Position of first varying attr */ 4 17 2 maximum_data_length 4 18 fixed bin (35), /* Maximum size of tuple in characters */ 4 19 2 number_primary_key_attrs 4 20 fixed bin, /* Number of attributes which make up the primary key */ 4 21 2 number_sec_indexes fixed bin, /* Number of attributes which have a secondary index */ 4 22 2 last_var_attr_no fixed bin, /* Attr index of last varying attribute */ 4 23 2 number_var_attrs fixed bin, /* Number of varying attributes */ 4 24 2 number_attrs fixed bin, /* Number of attribute in rel */ 4 25 2 attr (vrd_no_of_attrs /* Description of each attribute */ 4 26 refer (vrm_rel_desc.number_attrs)) aligned like vrm_attr_info; 4 27 4 28 dcl 1 vrm_attr_info based (vrm_attr_info_ptr), 4 29 /* Attribute specific info */ 4 30 2 name char (32), /* Name of the attribute */ 4 31 2 descriptor bit (36) aligned, /* domain descriptor */ 4 32 2 varying bit (1) unal, /* ON = This is a varying string */ 4 33 2 key_head bit (1) unal, /* ON = This attr can be a keyhead */ 4 34 2 primary_key_attr bit (1) unal, /* ON = This is a primary key attribute */ 4 35 2 pad bit (15) unal, /* unused */ 4 36 2 index_collextion_ix fixed bin (17) unal, /* Index into vrm_open_info.index_collection array if key_head is on */ 4 37 2 bit_length fixed bin (35), /* Maximum bit length of tuple */ 4 38 2 bit_offset fixed bin (35); /* Offset in tuple if fixed, index to offset in tuple if varying */ 4 39 4 40 4 41 dcl vrm_rel_desc_ptr pointer; 4 42 dcl vrd_no_of_attrs fixed bin; 4 43 dcl VRM_REL_DESC_RECORD_ID bit (12) unal int static options (constant) init ("100000000000"b); 4 44 dcl VRM_REL_DESC_VERSION_1 char (8) int static options (constant) init (" 1"); 4 45 dcl vrm_attr_info_ptr pointer; 4 46 dcl VRM_REL_DESC_KEY char (256) varying int static options (constant) init ("@relation_description"); 4 47 4 48 /* END INCLUDE vrm_rel_desc.incl.pl1 */ 611 612 5 1 /* BEGIN INCLUDE vrm_collection_info.incl.pl1 */ 5 2 5 3 /* R. Harvey 82-11-02 */ 5 4 5 5 5 6 dcl 1 vrm_collection_info aligned based (vrm_collection_info_ptr), 5 7 /* Index collection description */ 5 8 2 record_id unal, 5 9 3 header bit (4) unal, /* collection type */ 5 10 3 id bit (8) unal, /* index id */ 5 11 2 unique bit (1) unal, 5 12 2 primary_key bit (1) unal, /* This is the MRDS primary key collection */ 5 13 2 pad bit (26) unal, 5 14 2 number_of_attributes 5 15 fixed bin, 5 16 2 attribute (vci_no_of_attributes refer (vrm_collection_info.number_of_attributes)), 5 17 3 attr_index fixed bin, /* Attribute number in relation description */ 5 18 3 key_offset fixed bin, /* Offset within key in bits */ 5 19 3 key_bit_len fixed bin ; /* Length of key in bits */ 5 20 5 21 dcl vrm_collection_info_ptr 5 22 ptr; 5 23 dcl vci_no_of_attributes fixed bin; 5 24 dcl vrm_collection_header_type 5 25 bit (4) unal int static options (constant) init ("1100"b); 5 26 dcl VRM_COLLECTION_KEY_HEAD char (16) int static options (constant) init ("@collection_info"); 5 27 5 28 /* END INCLUDE vrm_collection_info.incl.pl1 */ 613 614 6 1 /* BEGIN INCLUDE vrm_meter.incl.pl1 */ 6 2 6 3 dcl vrm_meter_ptr pointer; 6 4 6 5 dcl 1 vrm_meter aligned based (vrm_meter_ptr), 6 6 2 cursor_name char (32), /* Name of cursor */ 6 7 2 meter_start_time fixed bin (71), 6 8 2 switches, 6 9 3 metering bit (1) unal, /* On = meter being done */ 6 10 3 mbz bit (35) unal, 6 11 2 cursor_ptr ptr, /* Pointer to vrm_cursor structure */ 6 12 2 last_call_stats like statistics, 6 13 2 total_stats like statistics; 6 14 6 15 dcl 1 statistics based, /* Used in like above */ 6 16 2 last_time_of_stats fixed bin (71), /* Last clock value for stats taken */ 6 17 2 vcpu_time float bin (63), /* The vcpu for this cursor */ 6 18 2 page_faults fixed bin (70), /* Page faults for this cursor */ 6 19 2 number_times_locked fixed bin (70), /* Number of time a lock was set */ 6 20 2 number_times_used fixed bin (70), /* Number of time cursor was used */ 6 21 2 num_times_search_called fixed bin (70), /* Number of time vrm_search was called */ 6 22 2 records_searched fixed bin (70), /* The records searched */ 6 23 2 seek_heads fixed bin (70), /* The seek heads done for key searches */ 6 24 2 special_seek_heads fixed bin (70), /* The seek heads done for key searches */ 6 25 2 keys_read fixed bin (70), /* The keys read by key search */ 6 26 2 keys_compared fixed bin (70), /* The keys compared in key search */ 6 27 2 key_hits fixed bin (70), /* The key hits for key search */ 6 28 2 non_key_compares fixed bin (70), /* The non_key compares done for this cursor */ 6 29 2 non_key_hits fixed bin (70), /* The non_key hits for this cursor */ 6 30 2 upper_limit_found_count fixed bin (70), /* The number of times upper limit was exceeded */ 6 31 2 number_items_returned fixed bin (70), /* Number of tuples or tid returned */ 6 32 2 number_tuples_deleted fixed bin (70), /* Number of tuples deleted */ 6 33 2 number_tuples_modified fixed bin (70), /* Number of tuples modified */ 6 34 2 number_tuples_stored fixed bin (70); /* Number of tuples stored */ 6 35 6 36 /* END INCLUDE vrm_meter.incl.pl1 */ 615 616 7 1 /* BEGIN INCLUDE FILE - dm_element_id_list.incl.pl1 */ 7 2 7 3 /* DESCRIPTION: 7 4* The element_id_list structure contains an array of element 7 5* identifiers. These identifiers are used as tuple, record or 7 6* element identifiers. This structure is used across the relation_manager_, 7 7* record_manager_ and index_manager_ interfaces. At some time the 7 8* version should be changed to be char(8)aligned, when such a conversion 7 9* can be coordinated with the other structures used at these interfaces. 7 10**/ 7 11 7 12 /* HISTORY: 7 13*Written by Matthew Pierret, 06/06/82. 7 14*Modified: 7 15*12/16/82 by Roger Lackey: Changed number_of_elements to fixed bin (35). 7 16* Did not change version. 7 17*02/11/85 by Matthew Pierret: Added DESCRIPTION, Written by. 7 18**/ 7 19 7 20 /* format: style2,ind3 */ 7 21 dcl 1 element_id_list aligned based (element_id_list_ptr), 7 22 2 version fixed bin (35), 7 23 2 number_of_elements fixed bin (35), 7 24 2 id (eil_number_of_elements refer (element_id_list.number_of_elements)) bit (36) aligned; 7 25 7 26 dcl element_id_list_ptr ptr; 7 27 dcl eil_number_of_elements fixed bin (35); 7 28 dcl ELEMENT_ID_LIST_VERSION_1 7 29 init (1) fixed bin (35); 7 30 7 31 7 32 /* END INCLUDE FILE - dm_element_id_list.incl.pl1 */ 617 618 8 1 /* BEGIN INCLUDE dm_typed_vector_list.incl.pl1 * * * * * * * * * * * * * * * * */ 8 2 8 3 /* Written by R. Harvey, 09/24/82 8 4*Modified: 8 5*09/27/82 by Matthew Pierret: Changed "max" to "maximum", tvl_number_of_vectors 8 6* to tvl_maximum_number_of_vectors. 8 7**/ 8 8 8 9 /* format: style2,ind3 */ 8 10 dcl 1 typed_vector_list aligned based (typed_vector_list_ptr), 8 11 2 version fixed bin (17), 8 12 2 maximum_number_of_vectors 8 13 fixed bin (35), /* vectors available */ 8 14 2 number_of_vectors fixed bin (35), /* number of vector_ptrs used */ 8 15 2 pad fixed bin (35), /* (even word boundary) */ 8 16 2 vector_ptr (tvl_maximum_number_of_vectors refer (typed_vector_list.maximum_number_of_vectors)) ptr; 8 17 8 18 dcl typed_vector_list_ptr ptr; 8 19 dcl TYPED_VECTOR_LIST_VERSION_1 8 20 fixed bin (17) int static options (constant) init (1); 8 21 dcl tvl_maximum_number_of_vectors fixed bin (35); 8 22 8 23 /* END INCLUDE dm_typed_vector_list.incl.pl1 * * * * * * * * * * * * * * * * */ 619 620 9 1 /* BEGIN vrm_tuple.incl.pl1 -- jaw, 7/25/78 */ 9 2 9 3 /* 82-08-27 R. Harvey: taken from mdbm_tuple.incl.pl1 for vfile_relmgr_. 9 4* Modified dimension references to point to entries in vrm_rel_desc. */ 9 5 9 6 9 7 dcl 1 tuple aligned based (tuple_ptr), /* tuple format, all file types */ 9 8 2 rel_id bit (12) unal, /* relation id */ 9 9 2 attr_exists (vrm_rel_desc.number_attrs) bit (1) unal, /* existance flags */ 9 10 2 var_offsets (vrm_rel_desc.number_var_attrs) fixed bin (35) unal, /* offsets for variable attr.; stored as len|value */ 9 11 2 force_even_word (tuple_pad_length) fixed bin (71) aligned, /* pad to even word boundary */ 9 12 2 data char (vrm_rel_desc.maximum_data_length) unal; /* space for data */ 9 13 9 14 9 15 dcl tuple_ptr ptr; 9 16 dcl tuple_length fixed bin (21); /* byte count */ 9 17 9 18 declare tuple_pad_length fixed bin internal static init (0) ; /* minimum array size needed for even word padding */ 9 19 9 20 9 21 9 22 /* END vrm_tuple.incl.pl1 */ 9 23 621 622 10 1 /* BEGIN INCLUDE vrm_search_info.incl.pl1 */ 10 2 10 3 dcl vrm_search_info_ptr pointer; 10 4 10 5 dcl 1 vrm_search_info aligned based (vrm_search_info_ptr), 10 6 2 tuple_pointer_required bit (1) unal, /* ON = Tuple pointer needs to be returned by search */ 10 7 2 tuple_tid_required bit (1) unal, /* ON = Tuple id needs to be returned by search */ 10 8 2 meter_sw bit (1) unal, /* ON = Metering is being done */ 10 9 2 mbz bit (33) init ("0"b), 10 10 2 upper_limit_exceeded_sw bit (1) aligned, /* ON = Upper limit on search was exceeded */ 10 11 2 last_call_stats like statistics, /* Statistics is found in vrm_cursor.incl.pl1 */ 10 12 2 max_number_values fixed bin (35), /* Maximum number of values allowed by get_by_spec */ 10 13 2 cur_id_list_ix fixed bin (35), /* Index in to id_list */ 10 14 2 num_items_returned fixed bin, /* Number of items retruned by vrmu_search */ 10 15 2 tid_list_ptr ptr, /* Pointer to list of tids returned */ 10 16 2 tup_ptr (1001) ptr unal; 10 17 10 18 dcl MAX_SEARCH_ITEMS fixed bin int static options (constant) init (1001); 10 19 10 20 /* END INCLUDE vrm_search_info.incl.pl1 */ 623 624 11 1 /* BEGIN INCLUDE vrmu_scan_rec_next.incl.pl1 */ 11 2 11 3 /* Parameter list for vrmu_scan_records_next */ 11 4 11 5 /* History: 11 6* 11 7* 83-03-24 R. Lackey: Created 11 8* 83-04-07 R. Harvey: Added the rel_id field for tuple validation 11 9* 11 10**/ 11 11 11 12 dcl vrmu_scan_rec_next_ptr pointer; 11 13 11 14 dcl 1 vrmu_scan_rec_next aligned based (vrmu_scan_rec_next_ptr), 11 15 2 iocb_ptr pointer, /* (INPUT) Iocb_ptr to be used */ 11 16 2 stationary_rec_expected bit (1) unal, /* (INPUT) ON = This relation suppose to have stationary records */ 11 17 2 scan_records_should_lock bit (1) unal, /* (INPUT) ON = scan_records must do the locking */ 11 18 2 rel_id bit (12) unal, /* relation id for tuple checking */ 11 19 2 pad bit (22) unal, /* Unused */ 11 20 2 block_ptr pointer, 11 21 2 record_ptr pointer, /* (OUTPUT) Pointer to vfile_ record */ 11 22 2 descriptor (1) fixed bin (35), /* (OUTPUT) Vfile rec desc */ 11 23 2 record_len fixed bin (21); /* (OUTPUT) Length of record */ 11 24 11 25 11 26 /* END INCLUDE vrmu_scan_rec_next.incl.pl1 */ 625 626 12 1 /* BEGIN vrm_index.incl.pl1 -- jaw, 5/12/78 */ 12 2 12 3 /* Renamed 9/29/82 by R. Harvey */ 12 4 12 5 /* This structure defines the header that gets put onto the beginning of 12 6* each key stored into a database */ 12 7 12 8 12 9 dcl 1 index aligned based (index_ptr), /* layout of mdbm_index for all file types */ 12 10 2 rel_id bit (12) unal, /* relation id */ 12 11 2 index_id bit (8) unal, /* id of index within rel */ 12 12 2 mbz bit (7) unal, /* pad to char. */ 12 13 2 index_value char (index_value_length) unal; /* index value; max 253 chars */ 12 14 12 15 dcl index_ptr ptr; 12 16 dcl index_value_length fixed bin (35); 12 17 12 18 /* END vrm_index.incl.pl1 */ 12 19 627 628 629 630 dcl 1 vsrn aligned like vrmu_scan_rec_next; 631 632 633 dcl 1 gk, 634 2 flags aligned, 635 3 input_key bit (1) unal, 636 3 input_desc bit (1) unal, 637 3 desc_code fixed bin (2) unal, 638 3 position_spec unal, 639 4 current bit (1) unal, /* Want info about current index */ 640 4 rel_type fixed bin (2) unal, 641 4 head_size fixed bin (9) unsigned unal, 642 3 reset_pos bit (1) unal, 643 3 mbz bit (8) unal, 644 3 version fixed bin (8) unal, 645 2 desc fixed bin (35), 646 2 key_len fixed bin, 647 2 key char (256); 648 649 dcl key_templet_ptr ptr; 650 651 dcl 1 key_templet based (key_templet_ptr), 652 2 unused bit (12) unal, 653 2 len fixed bin (23) unal, 654 2 prefix char (3) unal, 655 2 key_data char (253); 656 657 dcl 1 tid aligned based (tid_ptr), /* MRDS tuple id (tid) */ 658 2 non_std_desc bit (1) unal, /* Non-standard descriptor bit */ 659 2 temp bit (1) unal, /* On if temp relation */ 660 2 file_id bit (7) unal, /* File id from mrds db_model file_id_list */ 661 2 comp_num bit (10) unal, /* Component number */ 662 2 offset bit (17) unal; /* Offset within component */ 663 664 dcl tid_ptr pointer; 665 666 667 dcl 1 vfd aligned based (vfd_ptr), /* Vfile desc */ 668 2 pad_1 bit (8) unal, 669 2 comp_number bit (10) unal, /* Component number */ 670 2 comp_offset bit (17) unal, /* Offset with in component */ 671 2 pade_2 bit (1) unal; 672 673 dcl vfd_ptr pointer; /* Pointer to vfd structure */ 674 675 dcl 1 kh unaligned, /* Key prefix head */ 676 2 rel_id bit (12) unaligned, 677 2 index_id bit (8) unaligned, 678 2 mbz bit (7) unaligned; 679 680 dcl kh_char_3 char (3) based (addr (kh)); 681 682 dcl 1 seek_head, /* Seek head info */ 683 2 rel_type fixed bin, 684 2 num_head_chars fixed bin, 685 2 key_chars char (256); 686 687 688 689 dcl 1 pgk, /* Primary get_key info Like gk_info */ 690 2 flags aligned, 691 3 input_key bit (1) unal init ("1"b), 692 3 input_desc bit (1) unal, 693 3 desc_code bit (3) unal, 694 3 pspec unal, 695 4 current bit (1) unal, 696 4 rel_type bit (3) unal, 697 4 head_size fixed bin (9) unsigned unal, 698 3 reset_pos bit (1) unal, 699 3 mbz bit (8) unal, 700 3 version bit (8) unal, 701 2 descriptor fixed bin (35), 702 2 key char (256) varying; 703 704 dcl 1 key_source_list aligned, 705 2 number_of_values fixed bin, /* Number of attributes in primary key */ 706 2 val_info (253), /* FROM vrm_data_$max_kattr_length 707* it is uses as a constant because of performance */ 708 3 val_ptr ptr, /* Pointer to attr value */ 709 3 desc_ptr ptr; /* Pointer to attr desc */ 710 711 712 dcl addbitno builtin; 713 dcl add_bit_offset_ entry (ptr, fixed bin (24)) 714 returns (ptr) reducible; 715 dcl addcharno builtin; 716 dcl addr builtin; 717 dcl addrel builtin; 718 dcl bd_ptr ptr; 719 dcl bit_data (bit_len) bit (1) unal based (bd_ptr); 720 dcl bit_len fixed bin (35); 721 dcl bit_str bit (vrm_attr_info.bit_length) based; 722 dcl c fixed bin; 723 dcl check_it bit (1) aligned; 724 dcl code fixed bin (35); 725 dcl compare_op fixed bin; 726 dcl cons_ok bit (1) aligned; 727 dcl cur_ag fixed bin; 728 dcl data_str bit (bit_len) based (bd_ptr); 729 dcl dm_error_$no_tuple fixed bin (35) ext static; 730 dcl error_table_$asynch_deletion fixed bin (35) ext static; 731 dcl error_table_$end_of_info fixed bin (35) ext static; 732 dcl error_table_$no_key fixed bin (35) ext static; 733 dcl error_table_$no_record fixed bin (35) ext static; 734 dcl file_id bit (7) aligned; 735 dcl fx fixed bin; 736 dcl got_one bit (1); 737 dcl i fixed bin; 738 dcl tid_required bit (1) aligned; 739 dcl init_required bit (1) aligned; 740 dcl iocb_ptr ptr; 741 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 742 dcl iox_$position entry (ptr, fixed bin, fixed bin (21), fixed bin (35)); 743 dcl key char (key_len) based (key_ptr); 744 dcl key_len fixed bin; 745 dcl key_ptr ptr; 746 dcl key_vals (253) char (253); /* to hold values so they are aligned */ 747 dcl length builtin; 748 dcl max_items fixed bin (35); 749 dcl min builtin; 750 dcl null builtin; 751 dcl num_constraints fixed bin; 752 dcl num_key_head_attrs fixed bin; 753 dcl offset fixed bin (35); /* temp attr offset */ 754 dcl op fixed bin (17) unal; 755 dcl pointer_required bit (1) aligned; 756 dcl rec_len fixed bin (21); 757 dcl RELATION_COLLECTION_ID bit (36) int static options (constant) init ("111111111111111111111111111111111111"b); 758 dcl ret_val bit (1) aligned; 759 dcl scan_records_flag bit (1) aligned; 760 dcl seek_head_key char (256) varying; 761 dcl seek_head_type fixed bin; 762 dcl shx fixed bin; 763 dcl spec_val_ptr ptr; 764 dcl substr builtin; 765 dcl terminator_op (7) fixed bin int static options (constant) init (2, 0, 0, 0, 0, 2, 3); 766 dcl tuple_attr_ptr ptr; 767 dcl tuple_id bit (36) aligned; 768 dcl tuple_key_val_ptr ptr; 769 dcl unspec builtin; 770 dcl vfile_desc fixed bin (35) aligned; 771 dcl vrmu_compare_values entry (ptr, ptr, ptr, ptr, fixed bin, bit (1) aligned, fixed bin (35)); 772 dcl vrmu_cv_vf_desc_to_ptr entry (ptr, fixed bin (35), ptr, fixed bin (21), fixed bin (35)); 773 dcl vrmu_encode_key entry (ptr, char (256) varying, fixed bin (35), fixed bin (35)); 774 dcl vrmu_scan_records$next entry (ptr, fixed bin (35)); 775 dcl vrmu_scan_records$scan_records_init entry (ptr, fixed bin (35)); 776 dcl temp_key char (256) varying; 777 dcl z fixed bin; 778 779 dcl desc_ptr ptr; 780 781 782 end vrmu_search; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0836.6 vrmu_search.pl1 >spec>on>7138.pbf>vrmu_search.pl1 605 1 10/14/83 1609.1 vrm_cursor.incl.pl1 >ldd>include>vrm_cursor.incl.pl1 607 2 10/14/83 1609.1 vrm_search_list.incl.pl1 >ldd>include>vrm_search_list.incl.pl1 609 3 10/14/83 1609.1 vrm_open_info.incl.pl1 >ldd>include>vrm_open_info.incl.pl1 611 4 10/14/83 1609.1 vrm_rel_desc.incl.pl1 >ldd>include>vrm_rel_desc.incl.pl1 613 5 10/14/83 1609.1 vrm_collection_info.incl.pl1 >ldd>include>vrm_collection_info.incl.pl1 615 6 10/14/83 1609.1 vrm_meter.incl.pl1 >ldd>include>vrm_meter.incl.pl1 617 7 03/05/85 0800.2 dm_element_id_list.incl.pl1 >spec>on>7138.pbf>dm_element_id_list.incl.pl1 619 8 10/14/83 1609.1 dm_typed_vector_list.incl.pl1 >ldd>include>dm_typed_vector_list.incl.pl1 621 9 10/14/83 1609.1 vrm_tuple.incl.pl1 >ldd>include>vrm_tuple.incl.pl1 623 10 10/14/83 1609.1 vrm_search_info.incl.pl1 >ldd>include>vrm_search_info.incl.pl1 625 11 10/14/83 1609.1 vrmu_scan_rec_next.incl.pl1 >ldd>include>vrmu_scan_rec_next.incl.pl1 627 12 10/14/83 1609.1 vrm_index.incl.pl1 >ldd>include>vrm_index.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. ELEMENT_ID_LIST_VERSION_1 000114 automatic fixed bin(35,0) initial dcl 7-28 set ref 7-28* I_cursor_ptr parameter pointer dcl 38 ref 7 42 I_key_len parameter fixed bin(17,0) unaligned dcl 368 ref 364 377 377 382 382 387 387 392 392 397 397 402 402 I_key_one_ptr parameter pointer dcl 366 ref 364 377 382 387 392 397 402 I_key_two_ptr parameter pointer dcl 367 ref 364 377 382 387 392 397 402 I_operator parameter fixed bin(17,0) unaligned dcl 369 ref 364 375 I_search_info_ptr parameter pointer dcl 37 ref 7 41 I_tuple_ptr parameter pointer dcl 415 ref 413 418 MAX_SEARCH_ITEMS constant fixed bin(17,0) initial dcl 10-18 ref 51 O_code parameter fixed bin(35,0) dcl 39 set ref 7 43* 600* O_result parameter bit(1) dcl 370 set ref 364 377* 379* 382* 384* 387* 389* 392* 394* 397* 399* 402* 404* O_vf_desc parameter fixed bin(35,0) dcl 416 set ref 413 456* RELATION_COLLECTION_ID 003232 constant bit(36) initial unaligned dcl 757 ref 78 add_bit_offset_ 000010 constant entry external dcl 713 ref 236 491 496 addcharno builtin function dcl 715 ref 548 addr builtin function dcl 716 ref 117 117 144 145 163 200 200 214 234 236 236 328 329 338 339 421 425 427 428 431 439 439 444 453 453 491 491 496 496 524 545 545 548 583 583 addrel builtin function dcl 717 ref 444 and_group_ix parameter fixed bin(17,0) dcl 465 ref 463 473 476 477 486 487 488 489 and_group_search_terminator 17(03) based bit(1) array level 4 packed unaligned dcl 2-7 ref 248 and_groups 2 based structure array level 2 dcl 2-7 attr 14 based structure array level 2 dcl 4-5 set ref 425 attr_desc_ptr 10 based pointer array level 4 packed unaligned dcl 2-7 ref 488 539 attr_index 3 based fixed bin(17,0) array level 3 in structure "vrm_collection_info" dcl 5-6 in procedure "vrmu_search" ref 425 attr_index 15 based fixed bin(17,0) array level 4 in structure "vrm_search_list" packed unaligned dcl 2-7 in procedure "vrmu_search" ref 489 attr_position_in_key 14 based fixed bin(17,0) array level 4 packed unaligned dcl 2-7 ref 536 attribute 3 based structure array level 2 dcl 5-6 bd_ptr 002446 automatic pointer dcl 718 set ref 421* 431 433 bit_data based bit(1) array unaligned dcl 719 set ref 431 bit_len 002450 automatic fixed bin(35,0) dcl 720 set ref 420* 433 bit_length 12 based fixed bin(35,0) level 2 dcl 4-28 ref 433 433 bit_offset 13 based fixed bin(35,0) level 2 in structure "vrm_attr_info" dcl 4-28 in procedure "vrmu_search" ref 430 433 bit_offset 27 based fixed bin(35,0) array level 3 in structure "vrm_rel_desc" dcl 4-5 in procedure "vrmu_search" set ref 491 496 bit_str based bit unaligned dcl 721 set ref 433* c 002451 automatic fixed bin(17,0) dcl 722 set ref 224* 227 232 234 236 241 241 248 251 254 256* 473* 477 486 487 488 489* cd parameter fixed bin(35,0) dcl 598 ref 596 600 check_it 002452 automatic bit(1) dcl 723 set ref 474* 477* 480* 482 code 002453 automatic fixed bin(35,0) dcl 724 set ref 96* 97 97* 117* 119 120 122* 200* 201 202 202 202 206* 308* 309 310 310 313* 353* 354 354* 439* 440 440* 453* 454 454* 501* 503 503* 545* 546 546* 583* 584 585 585 587* collection_id 5 based bit(36) array level 3 dcl 2-7 ref 78 88 collection_id_supplied_sw 4(19) based bit(1) array level 3 packed unaligned dcl 2-7 ref 78 collection_info_ptr 6 based pointer array level 3 packed unaligned dcl 2-7 ref 239 comp_num 0(09) based bit(10) level 2 packed unaligned dcl 657 set ref 149* 332 343* comp_number 0(08) based bit(10) level 2 packed unaligned dcl 667 set ref 149 332* 343 comp_offset 0(18) based bit(17) level 2 packed unaligned dcl 667 set ref 150 333* 344 compare_op 002454 automatic fixed bin(17,0) dcl 725 set ref 486* 501* cons 7 based structure array level 3 dcl 2-7 cons_ok 002455 automatic bit(1) dcl 726 set ref 222* 224 241* 244 248 271 471* 473 501* 504 509 constraint_info based structure level 1 unaligned dcl 2-32 cur_ag 002456 automatic fixed bin(17,0) dcl 727 set ref 65* 73 76 78 78 82 88 98 131* 220 224 224 227 232 234 236 239 241 241 248 251 254 256 262 274* 285* 301 302 348 348 526 528 531 533 536 537 539 553 555 556 563 565 590 cur_id_list_ix 53 based fixed bin(35,0) level 2 dcl 10-5 ref 49 51 151 294 current 0(05) 000140 automatic bit(1) level 4 packed unaligned dcl 633 set ref 160* current_and_group 1 based fixed bin(17,0) level 2 packed unaligned dcl 2-7 ref 65 data based char level 2 packed unaligned dcl 9-7 set ref 421 491 491 496 496 data_str based bit unaligned dcl 728 ref 433 desc 1 000140 automatic fixed bin(35,0) level 2 dcl 633 set ref 326 327 328 337 338 desc_ptr 4 000460 automatic pointer array level 3 in structure "key_source_list" dcl 704 in procedure "vrmu_search" set ref 428* 539* desc_ptr 042130 automatic pointer dcl 779 in procedure "vrmu_search" set ref 488* 501* 501* descriptor 10 based bit(36) level 2 in structure "vrm_attr_info" dcl 4-28 in procedure "vrmu_search" set ref 428 descriptor 1 000355 automatic fixed bin(35,0) level 2 in structure "pgk" dcl 689 in procedure "vrmu_search" set ref 456 descriptor 10 000126 automatic fixed bin(35,0) array level 2 in structure "vsrn" dcl 630 in procedure "vrmu_search" set ref 141 141* 144 dm_error_$no_tuple 000012 external static fixed bin(35,0) dcl 729 set ref 73* 120* 202* 214* 263* 303* 310* 585* do_not_use_sw 4(18) based bit(1) array level 3 packed unaligned dcl 2-7 set ref 73 262* 302* element_id_list based structure level 1 dcl 7-21 encoded_key_length 12 based fixed bin(17,0) array level 4 packed unaligned dcl 2-7 ref 556 encoded_key_ptr 11 based pointer array level 4 packed unaligned dcl 2-7 ref 232 555 error_table_$asynch_deletion 000014 external static fixed bin(35,0) dcl 730 ref 202 310 error_table_$end_of_info 000016 external static fixed bin(35,0) dcl 731 ref 120 310 error_table_$no_key 000020 external static fixed bin(35,0) dcl 732 ref 202 585 error_table_$no_record 000022 external static fixed bin(35,0) dcl 733 ref 202 585 file_id 2(18) based bit(7) level 2 in structure "vrm_rel_desc" packed unaligned dcl 4-5 in procedure "vrmu_search" ref 56 file_id 002457 automatic bit(7) dcl 734 in procedure "vrmu_search" set ref 56* 148 342 file_id 0(02) based bit(7) level 2 in structure "tid" packed unaligned dcl 657 in procedure "vrmu_search" set ref 148* 342* flags 000355 automatic structure level 2 in structure "pgk" dcl 689 in procedure "vrmu_search" set ref 449* flags 000140 automatic structure level 2 in structure "gk" dcl 633 in procedure "vrmu_search" set ref 159* full_key_equal_only_sw 4(22) based bit(1) array level 3 packed unaligned dcl 2-7 ref 224 301 fx 002460 automatic fixed bin(17,0) dcl 735 set ref 489* 491 491 496 gk 000140 automatic structure level 1 unaligned dcl 633 set ref 200 200 got_one 002461 automatic bit(1) unaligned dcl 736 set ref 112* 129* 131* 133 134* 195* 197 274* 276* 285* 289 head_size 0(09) 000355 automatic fixed bin(9,0) level 4 packed unsigned unaligned dcl 689 set ref 451* i 002462 automatic fixed bin(17,0) dcl 737 set ref 424* 425 427 427 428 431 433* id 2 based bit(36) array level 2 dcl 7-21 set ref 151* 294* index based structure level 1 dcl 12-9 index_id 0(12) based bit(8) level 2 in structure "index" packed unaligned dcl 12-9 in procedure "vrmu_search" set ref 447* index_id 0(12) 000252 automatic bit(8) level 2 in structure "kh" packed unaligned dcl 675 in procedure "vrmu_search" set ref 88* index_ptr 000122 automatic pointer dcl 12-15 set ref 444* 446 447 index_value_length 000124 automatic fixed bin(35,0) dcl 12-16 set ref 445* init_required 002464 automatic bit(1) dcl 739 set ref 64* 82* 93 input_key 000355 automatic bit(1) initial level 3 packed unaligned dcl 689 set ref 450* 689* iocb_ptr 000126 automatic pointer level 2 in structure "vsrn" dcl 630 in procedure "vrmu_search" set ref 107* iocb_ptr 002466 automatic pointer dcl 740 in procedure "vrmu_search" set ref 60* 96* 107 200* 308* 353* 583* iocb_ptr 10 based pointer level 2 in structure "vrm_cursor" dcl 1-7 in procedure "vrmu_search" set ref 60 453* iox_$control 000024 constant entry external dcl 741 ref 200 453 583 iox_$position 000026 constant entry external dcl 742 ref 308 key 3 000140 automatic char(256) level 2 in structure "gk" packed unaligned dcl 633 in procedure "vrmu_search" set ref 214 key 2 000355 automatic varying char(256) level 2 in structure "pgk" dcl 689 in procedure "vrmu_search" set ref 439* 444 451 key based char unaligned dcl 743 in procedure "vrmu_search" ref 559 key_attr_sw 17(02) based bit(1) array level 4 packed unaligned dcl 2-7 ref 227 477 key_bit_length 13(18) based fixed bin(17,0) array level 4 packed unaligned dcl 2-7 set ref 241* 256* key_chars 2 000253 automatic char(256) level 2 packed unaligned dcl 682 set ref 581* key_data 1(27) based char(253) level 2 packed unaligned dcl 651 set ref 234 236 236 key_hits 32 based fixed bin(70,0) level 3 dcl 10-5 set ref 244* 244 key_len 2 000140 automatic fixed bin(17,0) level 2 in structure "gk" dcl 633 in procedure "vrmu_search" set ref 163 key_len 002470 automatic fixed bin(17,0) dcl 744 in procedure "vrmu_search" set ref 549* 556* 559 key_offset 13 based fixed bin(17,0) array level 4 packed unaligned dcl 2-7 ref 234 236 key_one based bit unaligned dcl 372 ref 377 382 387 392 397 402 key_ptr 002472 automatic pointer dcl 745 set ref 548* 555* 559 key_source_list 000460 automatic structure level 1 dcl 704 set ref 439 439 545 545 key_templet based structure level 1 packed unaligned dcl 651 key_templet_ptr 000244 automatic pointer dcl 649 set ref 163* 164 234 236 236 key_two based bit unaligned dcl 373 ref 377 382 387 392 397 402 key_vals 002474 automatic char(253) array unaligned dcl 746 set ref 427 keys_compared 30 based fixed bin(70,0) level 3 dcl 10-5 set ref 229* 229 keys_read 26 based fixed bin(70,0) level 3 dcl 10-5 set ref 209* 209 kh 000252 automatic structure level 1 packed unaligned dcl 675 set ref 214 524 kh_char_3 based char(3) unaligned dcl 680 ref 214 524 last_call_stats 4 based structure level 2 dcl 10-5 length builtin function dcl 747 ref 451 549 580 max_items 041677 automatic fixed bin(35,0) dcl 748 set ref 49* 51* 115 166 max_num_constraints 0(18) based fixed bin(17,0) level 2 packed unaligned dcl 2-7 ref 73 73 76 76 78 78 78 78 82 82 88 88 98 98 220 220 224 224 224 224 227 227 232 232 234 234 236 236 239 239 241 241 241 241 248 248 251 251 254 254 256 256 262 262 301 301 302 302 348 348 348 348 473 473 476 476 477 477 486 486 487 487 488 488 489 489 526 526 528 528 531 531 533 533 536 536 537 537 539 539 553 553 555 555 556 556 563 563 565 565 590 590 max_number_values 52 based fixed bin(35,0) level 2 dcl 10-5 ref 49 51 maximum_data_length 6 based fixed bin(35,0) level 2 dcl 4-5 ref 420 421 491 491 496 496 mbz 0(20) 000252 automatic bit(7) level 2 packed unaligned dcl 675 set ref 89* meter_sw 0(02) based bit(1) level 2 packed unaligned dcl 10-5 ref 57 126 209 229 244 483 504 569 574 min builtin function dcl 749 ref 51 multi_attr_seek_head_sw 4(21) based bit(1) array level 3 packed unaligned dcl 2-7 ref 528 must_initialize_sw 4(20) based bit(1) array level 3 packed unaligned dcl 2-7 set ref 82 98* 590* non_key_compares 34 based fixed bin(70,0) level 3 dcl 10-5 set ref 483* 483 non_key_hits 36 based fixed bin(70,0) level 3 dcl 10-5 set ref 504* 504 non_std_desc based bit(1) level 2 packed unaligned dcl 657 set ref 146* 340* null builtin function dcl 750 ref 62 274 num_and_groups based fixed bin(17,0) level 2 packed unaligned dcl 2-7 ref 68 98 num_cons_in_this_and_group 2 based fixed bin(17,0) array level 3 packed unaligned dcl 2-7 ref 76 348 473 num_constraints 041700 automatic fixed bin(17,0) dcl 751 set ref 69* 76* 129 469 num_head_chars 1 000253 automatic fixed bin(17,0) level 2 dcl 682 set ref 580* num_items_returned 54 based fixed bin(17,0) level 2 dcl 10-5 set ref 45* 115 136* 136 137 151 166 290* 290 292 294 num_key_cons_in_this_and_group 2(18) based fixed bin(17,0) array level 3 packed unaligned dcl 2-7 ref 220 224 348 476 531 num_key_head_attrs 041701 automatic fixed bin(17,0) dcl 752 set ref 529* 534* 534 544 num_times_search_called 16 based fixed bin(70,0) level 3 dcl 10-5 set ref 57* 57 number_attrs 13 based fixed bin(17,0) level 2 dcl 4-5 ref 421 430 491 491 491 496 496 number_of_values 000460 automatic fixed bin(17,0) level 2 dcl 704 set ref 422* 522* 544* number_primary_key_attrs 7 based fixed bin(17,0) level 2 dcl 4-5 ref 422 424 number_var_attrs 12 based fixed bin(17,0) level 2 dcl 4-5 ref 421 491 491 496 496 offset 0(19) based bit(17) level 2 in structure "tid" packed unaligned dcl 657 in procedure "vrmu_search" set ref 150* 333 344* offset 041702 automatic fixed bin(35,0) dcl 753 in procedure "vrmu_search" set ref 430* 431 op 041703 automatic fixed bin(17,0) unaligned dcl 754 set ref 254* 256* open_info_ptr 4 based pointer level 2 dcl 1-7 ref 53 operator 14(18) based fixed bin(17,0) array level 4 packed unaligned dcl 2-7 set ref 241* 251 254 486 563 565 pgk 000355 automatic structure level 1 unaligned dcl 689 set ref 453 453 pointer_required 041704 automatic bit(1) dcl 755 set ref 47* 49 137 292 348 position_spec 0(05) 000140 automatic structure level 3 packed unaligned dcl 633 primary_key_info_ptr 100 based pointer level 2 dcl 3-6 ref 425 pspec 0(05) 000355 automatic structure level 3 packed unaligned dcl 689 rec_len 041705 automatic fixed bin(21,0) dcl 756 set ref 353* record_ptr 6 000126 automatic pointer level 2 dcl 630 set ref 124 records_searched 20 based fixed bin(70,0) level 3 dcl 10-5 set ref 126* 126 rel_id 000252 automatic bit(12) level 2 in structure "kh" packed unaligned dcl 675 in procedure "vrmu_search" set ref 87* rel_id 2(02) 000126 automatic bit(12) level 2 in structure "vsrn" packed unaligned dcl 630 in procedure "vrmu_search" set ref 110* rel_id based bit(12) level 2 in structure "index" packed unaligned dcl 12-9 in procedure "vrmu_search" set ref 446* rel_id 2(25) based bit(12) level 2 in structure "vrm_rel_desc" packed unaligned dcl 4-5 in procedure "vrmu_search" ref 87 110 446 rel_type 000253 automatic fixed bin(17,0) level 2 dcl 682 set ref 579* ret_val 041706 automatic bit(1) dcl 758 set ref 467* 509* 512* 513 scan_records_flag 041707 automatic bit(1) dcl 759 set ref 63* 70* 78* 86 95 104 scan_records_should_lock 2(01) 000126 automatic bit(1) level 2 packed unaligned dcl 630 set ref 109* search_list_ptr 14 based pointer level 2 dcl 1-7 ref 55 seek_head 000253 automatic structure level 1 unaligned dcl 682 set ref 583 583 seek_head_key 041710 automatic varying char(256) dcl 760 set ref 524* 559* 559 580 581 seek_head_sw 17(04) based bit(1) array level 4 packed unaligned dcl 2-7 ref 533 seek_head_type 042011 automatic fixed bin(17,0) dcl 761 set ref 523* 563* 565* 567* 579 seek_heads 22 based fixed bin(70,0) level 3 dcl 10-5 set ref 574* 574 seek_key_con_ix 4 based fixed bin(17,0) array level 3 packed unaligned dcl 2-7 ref 526 553 shared 5 based bit(1) level 3 packed unaligned dcl 3-6 ref 109 shx 042012 automatic fixed bin(17,0) dcl 762 set ref 536* 537 539 553* 555 556 563 565 spec_val_ptr 042014 automatic pointer dcl 763 set ref 232* 241* 256* 487* 501* special_seek_heads 24 based fixed bin(70,0) level 3 dcl 10-5 set ref 569* 569 stationary_rec_expected 2 000126 automatic bit(1) level 2 packed unaligned dcl 630 set ref 108* stationary_records 3(02) based bit(1) level 3 packed unaligned dcl 4-5 ref 108 statistics based structure level 1 unaligned dcl 6-15 substr builtin function dcl 764 ref 88 214 433 switches 5 based structure level 2 in structure "vrm_open_info" dcl 3-6 in procedure "vrmu_search" switches 3(01) based structure level 2 in structure "vrm_rel_desc" packed unaligned dcl 4-5 in procedure "vrmu_search" temp 0(01) based bit(1) level 2 packed unaligned dcl 657 set ref 147* 341* temp_key 042025 automatic varying char(256) dcl 776 set ref 545* 548 549 terminator_op 000007 constant fixed bin(17,0) initial array dcl 765 ref 254 tid based structure level 1 dcl 657 tid_list_ptr 56 based pointer level 2 dcl 10-5 ref 151 294 tid_ptr 000246 automatic pointer dcl 664 set ref 145* 146 147 148 149 150 328* 332 333 339* 340 341 342 343 344 tid_required 002463 automatic bit(1) dcl 738 set ref 46* 140 294 tup_ptr 60 based pointer array level 2 packed unaligned dcl 10-5 set ref 137* 292* tuple based structure level 1 dcl 9-7 tuple_attr_ptr 042016 automatic pointer dcl 766 set ref 491* 496* 501* tuple_id 042020 automatic bit(36) dcl 767 set ref 145 151 294 327* 339 tuple_key_val_ptr 042022 automatic pointer dcl 768 set ref 234* 236* 241* 256* tuple_pad_length constant fixed bin(17,0) initial dcl 9-18 ref 421 491 491 496 496 tuple_pointer_required based bit(1) level 2 packed unaligned dcl 10-5 ref 47 tuple_ptr 000116 automatic pointer dcl 9-15 set ref 62* 124* 137 141* 274 292 353* 418* 421 430 491 491 491 496 496 tuple_tid_required 0(01) based bit(1) level 2 packed unaligned dcl 10-5 ref 46 unspec builtin function dcl 769 set ref 159* 327* 327 449* unused based bit(12) level 2 packed unaligned dcl 651 set ref 164* upper_limit_exceeded_sw 2 based bit(1) level 2 dcl 10-5 set ref 251* 256* 261 val_info 2 000460 automatic structure array level 2 dcl 704 val_ptr 2 000460 automatic pointer array level 3 in structure "key_source_list" dcl 704 in procedure "vrmu_search" set ref 427* 431* 433 537* val_ptr 7 based pointer array level 4 in structure "vrm_search_list" packed unaligned dcl 2-7 in procedure "vrmu_search" ref 487 537 var_offsets based fixed bin(35,0) array level 2 packed unaligned dcl 9-7 ref 430 491 varying 25 based bit(1) array level 3 in structure "vrm_rel_desc" packed unaligned dcl 4-5 in procedure "vrmu_search" set ref 491 varying 11 based bit(1) level 2 in structure "vrm_attr_info" packed unaligned dcl 4-28 in procedure "vrmu_search" ref 429 vfd based structure level 1 dcl 667 vfd_ptr 000250 automatic pointer dcl 673 set ref 144* 149 150 329* 332 333 338* 343 344 vfile_desc 042024 automatic fixed bin(35,0) dcl 770 set ref 329 331* 337* 353* vrm_attr_info based structure level 1 unaligned dcl 4-28 vrm_attr_info_ptr 000110 automatic pointer dcl 4-45 set ref 425* 428 429 430 433 433 433 vrm_collection_info based structure level 1 dcl 5-6 vrm_collection_info_ptr 000112 automatic pointer dcl 5-21 set ref 239* vrm_cursor based structure level 1 dcl 1-7 vrm_cursor_ptr 000100 automatic pointer dcl 1-5 set ref 42* 53 54 55 60 453 vrm_open_info based structure level 1 dcl 3-6 vrm_open_info_ptr 000104 automatic pointer dcl 3-28 set ref 53* 109 425 vrm_rel_desc based structure level 1 unaligned dcl 4-5 vrm_rel_desc_ptr 000106 automatic pointer dcl 4-41 set ref 54* 56 87 108 110 420 421 421 421 422 424 425 430 446 491 491 491 491 491 491 491 491 491 496 496 496 496 496 496 496 vrm_relation_desc_ptr 6 based pointer level 2 dcl 1-7 ref 54 vrm_search_info based structure level 1 dcl 10-5 vrm_search_info_ptr 000120 automatic pointer dcl 10-3 set ref 41* 45 46 47 49 49 51 51 57 57 57 115 126 126 126 136 136 137 137 151 151 151 166 209 209 209 229 229 229 244 244 244 251 256 261 290 290 292 292 294 294 294 483 483 483 504 504 504 569 569 569 574 574 574 vrm_search_list based structure level 1 dcl 2-7 vrm_search_list_ptr 000102 automatic pointer dcl 2-3 set ref 55* 65 68 73 76 78 78 82 88 98 98 220 224 224 227 232 234 236 239 241 241 248 251 254 256 262 301 302 348 348 473 476 477 486 487 488 489 526 528 531 533 536 537 539 553 555 556 563 565 590 vrmu_compare_values 000030 constant entry external dcl 771 ref 501 vrmu_cv_vf_desc_to_ptr 000032 constant entry external dcl 772 ref 353 vrmu_encode_key 000034 constant entry external dcl 773 ref 439 545 vrmu_scan_rec_next based structure level 1 dcl 11-14 vrmu_scan_records$next 000036 constant entry external dcl 774 ref 117 vrmu_scan_records$scan_records_init 000040 constant entry external dcl 775 ref 96 vsrn 000126 automatic structure level 1 dcl 630 set ref 117 117 z 042126 automatic fixed bin(17,0) dcl 777 set ref 531* 533 536 537 539* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. TYPED_VECTOR_LIST_VERSION_1 internal static fixed bin(17,0) initial dcl 8-19 VRM_COLLECTION_KEY_HEAD internal static char(16) initial unaligned dcl 5-26 VRM_OPEN_INFO_VERSION_1 internal static char(8) initial unaligned dcl 3-27 VRM_REL_DESC_KEY internal static varying char(256) initial dcl 4-46 VRM_REL_DESC_RECORD_ID internal static bit(12) initial unaligned dcl 4-43 VRM_REL_DESC_VERSION_1 internal static char(8) initial unaligned dcl 4-44 addbitno builtin function dcl 712 alloc_num_search_keys automatic fixed bin(17,0) dcl 2-59 eil_number_of_elements automatic fixed bin(35,0) dcl 7-27 element_id_list_ptr automatic pointer dcl 7-26 search_keys based varying char(256) array dcl 2-60 search_keys_ptr automatic pointer dcl 2-58 tuple_length automatic fixed bin(21,0) dcl 9-16 tvl_maximum_number_of_vectors automatic fixed bin(35,0) dcl 8-21 typed_vector_list based structure level 1 dcl 8-10 typed_vector_list_ptr automatic pointer dcl 8-18 vci_no_of_attributes automatic fixed bin(17,0) dcl 5-23 voi_no_of_index_collections automatic fixed bin(17,0) dcl 3-29 vrd_no_of_attrs automatic fixed bin(17,0) dcl 4-42 vrm_collection_header_type internal static bit(4) initial unaligned dcl 5-24 vrm_meter based structure level 1 dcl 6-5 vrm_meter_ptr automatic pointer dcl 6-3 vrmu_scan_rec_next_ptr automatic pointer dcl 11-12 vsl_max_number_of_constraints automatic fixed bin(17,0) dcl 2-5 vsl_number_of_and_groups automatic fixed bin(17,0) dcl 2-4 NAMES DECLARED BY EXPLICIT CONTEXT. and_group_constraints_ok 002256 constant entry internal dcl 463 ref 131 274 285 error 003214 constant entry internal dcl 596 ref 73 97 120 122 202 206 214 263 303 310 313 354 440 454 503 546 585 587 exit 000607 constant label dcl 174 ref 601 get_next 000610 constant entry internal dcl 178 ref 168 get_tid_and_tuple_ptr 001441 constant entry internal dcl 324 ref 273 283 get_tuple_tid 002000 constant entry internal dcl 413 ref 141 k_compare 000000 constant label array(7) dcl 377 ref 375 key_compare 001602 constant entry internal dcl 364 ref 241 256 key_seek_head 002625 constant entry internal dcl 520 ref 101 vrmu_search 000041 constant entry external dcl 7 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3422 3464 3233 3432 Length 4122 3233 42 421 167 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vrmu_search 17758 external procedure is an external procedure. get_next internal procedure shares stack frame of external procedure vrmu_search. get_tid_and_tuple_ptr internal procedure shares stack frame of external procedure vrmu_search. key_compare internal procedure shares stack frame of external procedure vrmu_search. get_tuple_tid internal procedure shares stack frame of external procedure vrmu_search. and_group_constraints_ok internal procedure shares stack frame of external procedure vrmu_search. key_seek_head internal procedure shares stack frame of external procedure vrmu_search. error internal procedure shares stack frame of external procedure vrmu_search. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vrmu_search 000100 vrm_cursor_ptr vrmu_search 000102 vrm_search_list_ptr vrmu_search 000104 vrm_open_info_ptr vrmu_search 000106 vrm_rel_desc_ptr vrmu_search 000110 vrm_attr_info_ptr vrmu_search 000112 vrm_collection_info_ptr vrmu_search 000114 ELEMENT_ID_LIST_VERSION_1 vrmu_search 000116 tuple_ptr vrmu_search 000120 vrm_search_info_ptr vrmu_search 000122 index_ptr vrmu_search 000124 index_value_length vrmu_search 000126 vsrn vrmu_search 000140 gk vrmu_search 000244 key_templet_ptr vrmu_search 000246 tid_ptr vrmu_search 000250 vfd_ptr vrmu_search 000252 kh vrmu_search 000253 seek_head vrmu_search 000355 pgk vrmu_search 000460 key_source_list vrmu_search 002446 bd_ptr vrmu_search 002450 bit_len vrmu_search 002451 c vrmu_search 002452 check_it vrmu_search 002453 code vrmu_search 002454 compare_op vrmu_search 002455 cons_ok vrmu_search 002456 cur_ag vrmu_search 002457 file_id vrmu_search 002460 fx vrmu_search 002461 got_one vrmu_search 002462 i vrmu_search 002463 tid_required vrmu_search 002464 init_required vrmu_search 002466 iocb_ptr vrmu_search 002470 key_len vrmu_search 002472 key_ptr vrmu_search 002474 key_vals vrmu_search 041677 max_items vrmu_search 041700 num_constraints vrmu_search 041701 num_key_head_attrs vrmu_search 041702 offset vrmu_search 041703 op vrmu_search 041704 pointer_required vrmu_search 041705 rec_len vrmu_search 041706 ret_val vrmu_search 041707 scan_records_flag vrmu_search 041710 seek_head_key vrmu_search 042011 seek_head_type vrmu_search 042012 shx vrmu_search 042014 spec_val_ptr vrmu_search 042016 tuple_attr_ptr vrmu_search 042020 tuple_id vrmu_search 042022 tuple_key_val_ptr vrmu_search 042024 vfile_desc vrmu_search 042025 temp_key vrmu_search 042126 z vrmu_search 042130 desc_ptr vrmu_search THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. add_bit_offset_ iox_$control iox_$position vrmu_compare_values vrmu_cv_vf_desc_to_ptr vrmu_encode_key vrmu_scan_records$next vrmu_scan_records$scan_records_init THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$no_tuple error_table_$asynch_deletion error_table_$end_of_info error_table_$no_key error_table_$no_record LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 7 000035 7 28 000046 689 000050 41 000052 42 000056 43 000061 45 000062 46 000063 47 000067 49 000073 51 000104 53 000120 54 000122 55 000124 56 000126 57 000132 60 000141 62 000144 63 000146 64 000147 65 000150 68 000153 69 000156 70 000157 71 000161 73 000162 76 000204 78 000223 82 000240 86 000245 87 000247 88 000254 89 000273 93 000275 95 000277 96 000301 97 000313 98 000324 100 000343 101 000344 104 000345 107 000350 108 000352 109 000360 110 000370 112 000376 115 000377 117 000405 119 000421 120 000423 122 000436 124 000445 126 000447 129 000456 131 000464 133 000475 134 000500 136 000502 137 000504 140 000512 141 000514 144 000527 145 000531 146 000534 147 000536 148 000540 149 000545 150 000552 151 000557 154 000565 155 000566 159 000567 160 000570 163 000572 164 000574 166 000577 168 000605 170 000606 174 000607 178 000610 195 000612 197 000614 200 000617 201 000652 202 000654 206 000673 209 000702 214 000711 220 000731 222 000751 224 000753 227 000771 229 001011 232 001021 234 001024 236 001036 239 001060 241 001067 244 001113 248 001125 251 001152 254 001165 256 001171 261 001224 262 001230 263 001244 269 001254 271 001256 273 001261 274 001262 276 001300 279 001302 283 001303 285 001304 289 001315 290 001320 292 001322 294 001330 301 001337 302 001354 303 001356 308 001366 309 001410 310 001412 313 001427 316 001436 320 001437 324 001441 326 001443 327 001445 328 001447 329 001451 331 001453 332 001454 333 001461 335 001466 337 001467 338 001470 339 001472 340 001474 341 001476 342 001500 343 001505 344 001512 348 001517 353 001547 354 001567 358 001600 364 001602 375 001605 377 001614 379 001635 380 001636 382 001637 384 001661 385 001662 387 001663 389 001704 390 001705 392 001706 394 001727 395 001730 397 001731 399 001753 400 001754 402 001755 404 001776 405 001777 413 002000 418 002003 420 002006 421 002012 422 002031 424 002033 425 002044 427 002052 428 002063 429 002065 430 002071 431 002107 432 002114 433 002115 436 002124 439 002126 440 002147 444 002160 445 002164 446 002165 447 002172 449 002174 450 002175 451 002177 453 002202 454 002240 456 002251 457 002255 463 002256 467 002261 469 002262 471 002264 473 002266 474 002315 476 002316 477 002335 479 002346 480 002347 482 002351 483 002353 486 002362 487 002373 488 002401 489 002403 491 002406 496 002472 501 002534 503 002561 504 002572 507 002604 509 002606 511 002613 512 002614 513 002616 520 002625 522 002627 523 002630 524 002631 526 002636 528 002655 529 002665 531 002666 533 002700 534 002721 536 002722 537 002725 539 002731 542 002733 544 002735 545 002737 546 002760 548 002771 549 002776 550 003001 553 003002 555 003004 556 003011 559 003014 563 003030 565 003056 567 003063 569 003065 572 003074 574 003075 579 003104 580 003106 581 003110 583 003115 584 003151 585 003153 587 003170 590 003177 592 003213 596 003214 600 003217 601 003222 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved