TnPmAV>tape_mult_ rR AV0112 TnkTɃAVptape_mult_ rRAV0172 Tnh2Tn}ѼAVtape_mult_ R AV0083 TH %Tɹ@iAVStape_mult_ (GR AV0037 Tm/T%\AV%tape_mult_ m1R AV0201 T=m]T{OAVtape_mult_ (*RAV0187 Th}>T{AVtape_mult_ sRAV0240 TDT:AVtape_mult_ sR'AV0151 T Q%T dAVtape_mult_ rR-AV0060 T ?IT P4+AV-8TZOM=AV tape_mult_ RPπAV0012 TtTuAV tape_mult_ RQ; AV0133 TxTAVtape_mult_ wRQAV0133 T`-TflAVtape_mult_ sRQQAV0133 T`OYTf]AVtape_mult_ sRQrAV0133 Tc(Tj'}AVtape_mult_ sRQyAV0146 TR-NTiDAVtape_mult_ RR8AV0146 T5x3T5AAVtape_mult_ RSAV0146 TkTs$AVtape_mult_ sRSVAV0146 T#=TAVtape_mult_ sRTrAV0146 T'T'#HAVtape_mult_ sRT=AV0146 TwqTw!nAVtape_mult_ sRUAV0044 TvT\AV,tape 5) the element which holds the index CI header is updated. 60* 61* It is possible that the control interval will have to be compacted to get 62* rid of scattered free space and concentrate all free space in the free 63* pool. This module is not equipped to handle this and must call 64* collection_manager_$compact_control_interval. It is important that any 65* information copied out of the control interval into local storage prior 66* to the compaction be copied out again after the compaction as its value 67* may have changed during the compaction. 68* 69* Both the bci_header and the slots from the slot for the new key to the 70* last slot (the trailing slots) are copied into local buffers. This is 71* because the bci_header will be modified. The trailing slots are not 72* modified, just moved, so it would seem that they need not be copied out 73* of the control interval. In fact, when shifting slots to the left, one 74* can give file_manager_ a pointer to the beginning of the slots and 75* pretend they are in a local buffer. When shifting to the right, 76* file_manager_ is implemented such that it would over-write the buffer if 77* a pointer into the control interval were given as the local buffer 78* pointer. For this reason the trailing slots must be copied out of the 79* control interval into local storage. 80* 81* The parameter p_index_opening_info_ptr points to an index_opening_info 82* structure. This contains general information about the index and 83* information specific to this process's activity relative to the index. 84* 85* The parameter p_common_ci_header_ptr points to the index CI header 86* (the structure common_ci_header and one of leaf_ci_header or 87* branch_ci_header). This must not point directly into the control 88* interval but point to some local copy of the index CI header. The index 89* CI header is stored as the first element in the control interval. 90* 91* The parameter p_insert_key is a flag which, if on, indicates that the 92* input key is to be inserted as a new key. If off, the input key is to 93* replace an existing key. 94* 95* The parameter p_key_id_string consists of two parts, the control interval 96* id of the control interval to which p_node_ptr points and the index in 97* the slot table (datum_position_table) of the key to be inserted/replaced. 98* If a key is inserted, slots to the right of the specified slot must be 99* shifted one slot to the right to make room for the new slot. 100* 101* The output parameter p_additional_storage_required has one of two 102* meanings. If the operation is successful (p_code is equal to 0), it is 103* the amount of free space in bits left in the control interval after the 104* insertion; if the operation fails for a lack of room (p_code is equal to 105* dm_error_$long_element), it is the amount of used space in bits that must 106* be removed from the control interval in order for the key to fit; if the 107* operation fails for any other reason, the parameter has no meaning. 108* 109**/ 110 111 /* HISTORY: 112* 113*Written by Lindsey Spratt, 04/07/82. 114*Modified: 115*06/16/82 by Matthew Pierret: Removed the beginning_offset argument from 116* calls to collection_manager_$put_element. 117*10/28/82 by Lindsey Spratt: Changed to not modify the key_count. This is 118* now done by im_put_key. 119*11/01/82 by Lindsey Spratt: Changed to use the index_opening_info instead of 120* the index_cursor and index_header. 121*11/16/82 by Matthew Pierret: Changed the meaning of total_storage_available. 122* cm_$(allocate put)_element now returns a negative value for 123* total_storage_available, it is the additional space required. 124*11/08/83 by Lindsey L. Spratt: Changed to use the "buffered" access method 125* when p_insert_new_key is "1"b. This was forced by 126* im_update_branches requiring a node_buffer. 127*04/03/84 by Matthew Pierret: Changed extensively to do its own storage 128* management. This module was taught about control interval 129* format so that it could bypass collection_manager_ 130* $allocate_element and $put_element. 131*06/12/84 by Matthew Pierret: Re-named cm_$put_element to cm_$modify. 132*10/12/84 by Matthew Pierret: Changed to use new dm_cm_basic_ci and 133* dm_cm_basic_ci_const include files. 134*10/28/84 by Lindsey L. Spratt: Changed to use the version 2 135* index_opening_info structure. Changed CHECK_VERSION to take 136* char(8) aligned parameters, and changed it use ACTION_CANT_RESTART 137* instead of the obsolete "s" flag. 138*03/07/85 by R. Michael Tague: Changed opening info version to version 3. 139**/ 140 141 /* format: style2,ind3 */ 142 143 im_simple_insert: 144 proc (p_index_opening_info_ptr, p_common_ci_header_ptr, p_insert_new_key, p_key_string, p_key_id_string, 145 p_additional_storage_required, p_code); 146 147 /* START OF DECLARATIONS */ 148 /* Parameter */ 149 150 dcl p_index_opening_info_ptr 151 ptr parameter; 152 dcl p_common_ci_header_ptr ptr; 153 dcl p_insert_new_key bit (1) aligned; 154 dcl p_key_string bit (*); 155 dcl p_key_id_string bit (36) aligned; 156 dcl p_additional_storage_required 157 fixed bin (35); 158 dcl p_code fixed bin (35); 159 160 /* Automatic */ 161 162 dcl code fixed bin (35) init (0); 163 dcl free_bytes_in_ci fixed bin (35) init (-1); 164 dcl free_bytes_in_pool fixed bin (35) init (-1); 165 dcl index_ci_header_slot_offset_in_bytes 166 fixed bin; 167 dcl index_ci_header_slot_ptr 168 ptr init (null); 169 dcl key_ci_id fixed bin (24) unsigned; 170 dcl key_index fixed bin (12) unsigned; 171 dcl key_slot_offset_in_bytes 172 fixed bin (35); 173 dcl key_string_offset_in_bytes 174 fixed bin (35); 175 dcl key_string_length_in_bits 176 fixed bin (35); 177 dcl key_string_length_in_bytes 178 fixed bin (35); 179 dcl key_string_ptr ptr init (null); 180 dcl local_ci_parts_buffer (12) fixed bin (71) init ((12) 0); 181 /* 5 parts */ 182 dcl 1 local_bci_header aligned like bci_header; 183 dcl 1 local_key_slot aligned like datum_slot; 184 dcl local_slots_buffer (404) fixed bin (71); /* Largest possible slot table */ 185 dcl new_number_of_slots fixed bin; 186 dcl node_ptr ptr init (null); 187 dcl number_of_new_slots fixed bin; 188 dcl number_of_slots_to_shift 189 fixed bin (35); 190 dcl slots_in_ci_ptr ptr init (null); 191 dcl slots_in_local_ptr ptr init (null); 192 dcl total_storage_available 193 fixed bin (35) init (0); 194 195 /* Based */ 196 197 dcl 1 p_key_id aligned like element_id based (addr (p_key_id_string)); 198 dcl 1 index_ci_header_slot aligned like datum_slot based (index_ci_header_slot_ptr); 199 dcl key_string bit (key_string_length_in_bits) based (key_string_ptr); 200 dcl 1 shifted_slots aligned based, 201 2 slot (number_of_slots_to_shift) fixed bin (35); 202 203 /* Builtin */ 204 205 dcl (length, null, addr, abs, unspec) 206 builtin; 207 208 /* Controlled */ 209 /* Constant */ 210 211 dcl ( 212 BITS_PER_BYTE init (9), 213 BYTES_PER_WORD init (4), 214 BEGINNING_OF_ELEMENT init (-1) 215 ) fixed bin (35) internal static options (constant); 216 dcl myname init ("im_simple_insert") char (32) varying internal static options (constant); 217 dcl ( 218 BCI_HEADER_PART_IDX init (1), 219 INDEX_CI_HEADER_PART_IDX 220 init (2), 221 KEY_SLOT_PART_IDX init (3), 222 KEY_PART_IDX init (4), 223 SHIFTED_SLOTS_PART_IDX init (5), 224 DEFAULT_NUMBER_OF_PARTS 225 init (5) 226 ) fixed bin internal static options (constant); 227 228 /* Entry */ 229 230 dcl file_manager_$get_ci_ptr 231 entry (bit (36) aligned, fixed bin (27), ptr, fixed bin (35)); 232 dcl file_manager_$put entry (bit (36) aligned, fixed bin (27), ptr, fixed bin (35)); 233 dcl im_update_branches entry (ptr, bit (36) aligned, bit (36) aligned, ptr, fixed bin (24) unsigned unal, 234 fixed bin (12) unsigned unal, fixed bin (35)); 235 dcl sub_err_ entry () options (variable); 236 237 /* External */ 238 239 dcl dm_error_$long_element fixed bin (35) ext; 240 dcl dm_error_$programming_error 241 fixed bin (35) ext; 242 dcl error_table_$unimplemented_version 243 fixed bin (35) ext; 244 245 /* END OF DECLARATIONS */ 246 247 /* format: indcomtxt,^indblkcom */ 248 249 /**** Copy parameters into local storage. */ 250 251 index_opening_info_ptr = p_index_opening_info_ptr; 252 call CHECK_VERSION (index_opening_info.version, INDEX_OPENING_INFO_VERSION_3, "index_opening_info"); 253 254 common_ci_header_ptr = p_common_ci_header_ptr; 255 leaf_ci_header_ptr, branch_ci_header_ptr = null; 256 257 key_string_ptr = addr (p_key_string); 258 key_string_length_in_bits = length (p_key_string); 259 key_string_length_in_bytes = ceil (divide (key_string_length_in_bits, BITS_PER_BYTE, 35, 18)); 260 261 key_ci_id = p_key_id.control_interval_id; 262 key_index = p_key_id.index; 263 264 /**** Insert or replace key. */ 265 266 if p_insert_new_key 267 then 268 INSERT_KEY: 269 do; 270 271 /*** Get a pointer to the control interval which is the node which 272* is to contain the new key. */ 273 274 call file_manager_$get_ci_ptr (index_opening_info.file_opening_id, (key_ci_id), node_ptr, code); 275 if code ^= 0 276 then call ERROR_RETURN (code); 277 278 /*** Copy bci_header from control interval to local storage. This is necessary 279* because the control interval cannot be modified directly. A local copy is 280* made and updated, then replaced in the control interval by file_manager_. */ 281 282 unspec (local_bci_header) = unspec (node_ptr -> bci_header); 283 284 /*** Init ci_parts structure. */ 285 286 ci_parts_ptr = addr (local_ci_parts_buffer); 287 ci_parts.number_of_parts = DEFAULT_NUMBER_OF_PARTS; 288 289 290 new_number_of_slots = max (key_index, local_bci_header.number_of_datums + 1); 291 /* Is the max really necessary? */ 292 293 /*** Determine if there is enough space in the control interval for the key. */ 294 295 number_of_new_slots = new_number_of_slots - local_bci_header.number_of_datums; 296 free_bytes_in_pool = 297 local_bci_header.start_of_used_space 298 - (DATUM_POSITION_TABLE_OFFSET_IN_BYTES + new_number_of_slots * BYTES_PER_WORD); 299 free_bytes_in_ci = 300 free_bytes_in_pool + local_bci_header.scattered_free_space - key_string_length_in_bytes 301 - (number_of_new_slots * BYTES_PER_WORD); 302 303 if free_bytes_in_ci < 0 304 then 305 do; 306 p_additional_storage_required = abs (free_bytes_in_ci) * BITS_PER_BYTE; 307 call ERROR_RETURN (dm_error_$long_element); 308 end; 309 310 /* Must the control interval be compacted? */ 311 if free_bytes_in_pool < key_string_length_in_bytes 312 then 313 do; 314 call collection_manager_$compact_control_interval (index_opening_info.file_opening_id, key_ci_id, code); 315 if code ^= 0 316 then call ERROR_RETURN (code); 317 unspec (local_bci_header) = unspec (node_ptr -> bci_header); 318 /* The bci_header may have been modified by the previous call */ 319 /* so refresh it. */ 320 end; 321 322 /*** The key can now be inserted in the free pool. */ 323 324 key_string_offset_in_bytes = local_bci_header.start_of_used_space - key_string_length_in_bytes; 325 326 ci_parts.part (KEY_PART_IDX).offset_in_bytes = key_string_offset_in_bytes; 327 ci_parts.part (KEY_PART_IDX).length_in_bytes = key_string_length_in_bytes; 328 ci_parts.part (KEY_PART_IDX).local_ptr = key_string_ptr; 329 330 unspec (local_key_slot) = "0"b; 331 local_key_slot.offset_in_bytes = key_string_offset_in_bytes; 332 local_key_slot.length_in_bits = key_string_length_in_bits; 333 334 key_slot_offset_in_bytes = DATUM_POSITION_TABLE_OFFSET_IN_BYTES + BYTES_PER_WORD * (key_index - 1); 335 336 ci_parts.part (KEY_SLOT_PART_IDX).offset_in_bytes = key_slot_offset_in_bytes; 337 ci_parts.part (KEY_SLOT_PART_IDX).length_in_bytes = BYTES_PER_WORD; 338 ci_parts.part (KEY_SLOT_PART_IDX).local_ptr = addr (local_key_slot); 339 340 /*** If necessary, shift trailing slots one to the rigth to make room. */ 341 342 if key_index < new_number_of_slots 343 then 344 do; /* Slots to the right must be shifted to make room */ 345 346 /*** Copy slots from control interval to local buffer. This copy must be done 347* after the potential call to collection_manager_$compact_control_interval 348* since that routine alters the values of the slots. */ 349 350 slots_in_ci_ptr = addcharno (node_ptr, key_slot_offset_in_bytes); 351 slots_in_local_ptr = addr (local_slots_buffer); 352 number_of_slots_to_shift = new_number_of_slots - key_index; 353 354 unspec (slots_in_local_ptr -> shifted_slots) = unspec (slots_in_ci_ptr -> shifted_slots); 355 356 /* Setup part for shifted slots. */ 357 ci_parts.part (SHIFTED_SLOTS_PART_IDX).offset_in_bytes = key_slot_offset_in_bytes + BYTES_PER_WORD; 358 ci_parts.part (SHIFTED_SLOTS_PART_IDX).length_in_bytes = number_of_slots_to_shift * BYTES_PER_WORD; 359 ci_parts.part (SHIFTED_SLOTS_PART_IDX).local_ptr = slots_in_local_ptr; 360 end; 361 else if key_index > new_number_of_slots 362 then call sub_err_ (dm_error_$programming_error, myname, ACTION_CANT_RESTART, null, 0); 363 364 /*** Update the bci_header to reflect the new state of the control interval. */ 365 366 local_bci_header.start_of_used_space = key_string_offset_in_bytes; 367 local_bci_header.number_of_datums = new_number_of_slots; 368 369 ci_parts.part (BCI_HEADER_PART_IDX).offset_in_bytes = 0; 370 ci_parts.part (BCI_HEADER_PART_IDX).length_in_bytes = BCI_HEADER_LENGTH_IN_BYTES; 371 ci_parts.part (BCI_HEADER_PART_IDX).local_ptr = addr (local_bci_header); 372 373 /*** Since the key fits, no more storage is required. */ 374 375 p_additional_storage_required = 0; 376 377 /*** Update the index ci header to include new key. */ 378 379 if common_ci_header.key_range.last = 0 380 then common_ci_header.key_range.last, common_ci_header.key_range.first = key_index; 381 else common_ci_header.key_range.last = common_ci_header.key_range.last + 1; 382 common_ci_header.key_tail_space_used_since_last_prefix_compaction = 383 common_ci_header.key_tail_space_used_since_last_prefix_compaction + key_string_length_in_bits; 384 385 index_ci_header_slot_offset_in_bytes = 386 DATUM_POSITION_TABLE_OFFSET_IN_BYTES + (DEFAULT_INDEX_CONTROL_INTERVAL_HEADER_SLOT - 1) * BYTES_PER_WORD; 387 index_ci_header_slot_ptr = addcharno (node_ptr, index_ci_header_slot_offset_in_bytes); 388 389 ci_parts.part (INDEX_CI_HEADER_PART_IDX).offset_in_bytes = index_ci_header_slot.offset_in_bytes; 390 ci_parts.part (INDEX_CI_HEADER_PART_IDX).length_in_bytes = 391 divide (index_ci_header_slot.length_in_bits, BITS_PER_BYTE, 17, 0); 392 ci_parts.part (INDEX_CI_HEADER_PART_IDX).local_ptr = common_ci_header_ptr; 393 394 /*** Finally, make the actual modification to the control interval in the file. */ 395 396 call file_manager_$put (index_opening_info.file_opening_id, (key_ci_id), ci_parts_ptr, code); 397 if code ^= 0 398 then call ERROR_RETURN (code); 399 400 /*** Update branches if this is a branch key and some branch keys have shifted. */ 401 402 if ^common_ci_header.is_leaf & common_ci_header.key_range.last > key_index 403 then 404 do; 405 call im_update_branches (node_ptr, index_opening_info.file_opening_id, index_opening_info.collection_id, 406 common_ci_header_ptr, (key_ci_id), key_index + 1, code); 407 if code ^= 0 408 then call ERROR_RETURN (code); 409 end; 410 411 end INSERT_KEY; 412 else 413 REPLACE_KEY: 414 do; 415 call collection_manager_$modify (index_opening_info.file_opening_id, index_opening_info.collection_id, 416 addr (p_key_string), length (p_key_string), p_key_id_string, total_storage_available, code); 417 if code ^= 0 418 then call CHECK_ERROR (code); 419 end REPLACE_KEY; 420 421 p_code = 0; 422 MAIN_RETURN: 423 return; 424 425 426 FINISH: 427 proc (); 428 end FINISH; 429 430 431 ERROR_RETURN: 432 proc (er_p_code); 433 dcl er_p_code fixed bin (35); 434 call FINISH; 435 p_code = er_p_code; 436 goto MAIN_RETURN; 437 end ERROR_RETURN; 438 439 440 CHECK_ERROR: 441 proc (ce_p_code); 442 dcl ce_p_code fixed bin (35); 443 if ce_p_code = dm_error_$long_element 444 then p_additional_storage_required = abs (total_storage_available); 445 446 call ERROR_RETURN (ce_p_code); 447 end CHECK_ERROR; 448 449 CHECK_VERSION: 450 proc (cv_p_received_version, cv_p_expected_version, cv_p_structure_name); 451 dcl cv_p_received_version char (8) aligned parameter; 452 dcl cv_p_expected_version char (8) aligned parameter; 453 dcl cv_p_structure_name char (*) parameter; 454 455 if cv_p_received_version ^= cv_p_expected_version 456 then call sub_err_ (error_table_$unimplemented_version, myname, ACTION_CANT_RESTART, null, 0, 457 "^/Expected version ^a of the ^a structure. 458 Received version ^a instead.", cv_p_expected_version, cv_p_structure_name, cv_p_received_version); 459 460 end CHECK_VERSION; 461 1 1 /* BEGIN INCLUDE FILE - dm_im_ci_header.incl.pl1 */ 1 2 1 3 /* DESCRIPTION: 1 4* 1 5* Each node (control interval) in the index has a header which 1 6* describes the contents of that node. Although there are two different 1 7* kinds of headers, leaf and branch, they have a great deal in common, the 1 8* common_ci_header. The common_ci_header states which slots are used by 1 9* the keys (leaf or branch) in the key_range substructure. There is an 1 10* "upward pointer" to the node's parent branch key (parent_id_string). 1 11* There are pointers to the previous and next nodes (previous_id and 1 12* next_id) on the same level to facilitate rotation of keys, and sequential 1 13* searching. There is also a count of how much space is in use by the keys. 1 14* 1 15**/ 1 16 1 17 /* HISTORY: 1 18* 1 19*Written by Lindsey Spratt, 03/29/82. 1 20*Modified: 1 21*10/25/84 by Lindsey L. Spratt: Added a description and fixed the history 1 22* section format. 1 23**/ 1 24 1 25 /* format: style2,ind3 */ 1 26 dcl 1 common_ci_header based (common_ci_header_ptr), 1 27 2 flags unaligned, 1 28 3 is_leaf bit (1) unaligned, /* ON for leaf_ci, OFF for branch_ci. */ 1 29 3 pad bit (17) unaligned, /* Must be zero. */ 1 30 2 key_tail_space_used_since_last_prefix_compaction 1 31 fixed bin (18) unsigned unal, 1 32 2 key_range unaligned, 1 33 3 first fixed bin (18) unsigned, 1 34 3 last fixed bin (18) unsigned, 1 35 2 parent_id_string bit (36) aligned, 1 36 2 previous_id fixed bin (24) unsigned unaligned, 1 37 2 next_id fixed bin (24) unsigned unaligned, 1 38 2 pad bit (24) unaligned; 1 39 1 40 1 41 dcl common_ci_header_ptr ptr; 1 42 1 43 dcl 1 leaf_ci_header based (leaf_ci_header_ptr), 1 44 2 common like common_ci_header; 1 45 1 46 dcl leaf_ci_header_ptr ptr; 1 47 1 48 dcl 1 branch_ci_header based (branch_ci_header_ptr), 1 49 2 common like common_ci_header, 1 50 2 low_branch_id fixed bin (24) unsigned unaligned, 1 51 2 pad bit (12) unaligned; 1 52 1 53 dcl branch_ci_header_ptr ptr; 1 54 1 55 1 56 dcl ( 1 57 DEFAULT_INITIAL_KEY_SLOT 1 58 init (2), 1 59 DEFAULT_INDEX_CONTROL_INTERVAL_HEADER_SLOT 1 60 init (1), 1 61 LEAF_CI_HEADER_LENGTH_IN_BITS 1 62 init (180), 1 63 BRANCH_CI_HEADER_LENGTH_IN_BITS 1 64 init (216) 1 65 ) internal static options (constant) fixed bin; 1 66 1 67 /* END INCLUDE FILE - dm_im_ci_header.incl.pl1 */ 462 463 2 1 /* BEGIN INCLUDE FILE dm_collmgr_entry_dcls.incl.pl1 */ 2 2 2 3 /* DESCRIPTION: 2 4* This include file contains declarations of all collection_manager_ 2 5* entrypoints. 2 6**/ 2 7 2 8 /* HISTORY: 2 9*Written by Matthew Pierret 2 10*Modified: 2 11*04/14/82 by Lindsey Spratt: Changed the control_interval_id parameter of the 2 12* allocate_control_interval operation to be unaligned, as well as 2 13* unsigned. 2 14*06/17/82 by Matthew Pierret: Added the put_element_portion opertion and 2 15* removed the beginning_location parameter from the put_element 2 16* operation. Added the create_page_file_operation. 2 17*08/09/82 by Matthew Pierret: Changed "fixed bin (17)"s to "bit (36) aligned"s 2 18* wherever collection_id was required. 2 19* Also changed the control_interval_id parameter of the 2 20* allocate_control_interval operation back to be aligned. So there. 2 21*10/20/82 by Matthew Pierret: Changed $create_page_file to $create_file, 2 22* added the argument file_create_info_ptr to $create_file. 2 23*12/13/82 by Lindsey Spratt: Corrected $free_control_interval to 2 24* include the zero_on_free bit. 2 25*12/17/82 by Matthew Pierret: Added cm_$get_id. 2 26*01/07/83 by Matthew Pierret: Added cm_$put_element_buffered, 2 27* cm_$allocate_element_buffered, cm_$free_element_buffered. 2 28*04/27/83 by Matthew Pierret: Added cm_$put_unprotected_element, 2 29* cm_$put_unprotected_header. 2 30*11/07/83 by Matthew Pierret: Added $get_element_portion_buffered, 2 31* $simple_get_buffered_element. 2 32*02/08/84 by Matthew Pierret: Changed $get_id to have only one bit(1)aligned 2 33* parameter for specifying absolute/relative nature of search. 2 34*03/16/84 by Matthew Pierret: Added cm_$get_control_interval_ptr, 2 35* $get_element_ptr, $get_element_portion_ptr, $simple_get_element_ptr 2 36*04/03/84 by Matthew Pierret: Added cm_$compact_control_interval. 2 37*06/06/84 by Matthew Pierret: Re-named free_element* to delete and 2 38* delete_from_ci_buffer. 2 39* Re-named *_buffered_ci to =_ci_buffer. 2 40* get entries. 2 41* modify entries. 2 42* Changed calling sequence of modify entries to have a ptr/length 2 43* instead of length/ptr parameter pair. 2 44*03/11/85 by R. Michael Tague: Added $postcommit_increments. 2 45**/ 2 46 2 47 /* This include file contains declarations of collection_manager_ entrypoints */ 2 48 2 49 /* format: style2,ind3 */ 2 50 dcl collection_manager_$allocate_control_interval 2 51 entry (bit (36) aligned, bit (36) aligned, fixed bin (24) unsigned, fixed bin (35)); 2 52 dcl collection_manager_$compact_control_interval 2 53 entry (bit (36) aligned, fixed bin (24) uns, fixed bin (35)); 2 54 dcl collection_manager_$create_collection 2 55 entry (bit (36) aligned, ptr, ptr, bit (36) aligned, fixed bin (35)); 2 56 dcl collection_manager_$create_file 2 57 entry (char (*), char (*), ptr, bit (36) aligned, fixed bin (35)); 2 58 dcl collection_manager_$destroy_collection 2 59 entry (bit (36) aligned, bit (36) aligned, fixed bin (35)); 2 60 dcl collection_manager_$free_control_interval 2 61 entry (bit (36) aligned, bit (36) aligned, fixed bin (24) unsigned, bit (1) aligned, 2 62 fixed bin (35)); 2 63 2 64 dcl collection_manager_$delete 2 65 entry (bit (36) aligned, bit (36) aligned, bit (36) aligned, bit (1) aligned, 2 66 fixed bin (35)); 2 67 dcl collection_manager_$delete_from_ci_buffer 2 68 entry (ptr, bit (36) aligned, bit (36) aligned, bit (36) aligned, bit (1) aligned, 2 69 fixed bin (35)); 2 70 2 71 dcl collection_manager_$get 2 72 entry (bit (36) aligned, bit (36) aligned, bit (36) aligned, fixed bin (17), ptr, 2 73 fixed bin (35), ptr, bit (1) aligned, ptr, fixed bin (35), fixed bin (35)); 2 74 dcl collection_manager_$get_control_interval_ptr 2 75 entry (bit (36) aligned, bit (36) aligned, fixed bin (24) unsigned, ptr, 2 76 fixed bin (35)); 2 77 dcl collection_manager_$get_from_ci_buffer 2 78 entry (ptr, bit (36) aligned, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), 2 79 ptr, bit (1) aligned, ptr, fixed bin (35), fixed bin (35)); 2 80 dcl collection_manager_$get_by_ci_ptr 2 81 entry (ptr, bit (36) aligned, bit (36) aligned, bit (36) aligned, fixed bin, ptr, 2 82 fixed bin (35), ptr, bit (1) aligned, ptr, fixed bin (35), ptr, fixed bin (35)); 2 83 dcl collection_manager_$get_header 2 84 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (17), ptr, bit (1) aligned, 2 85 ptr, fixed bin (35), fixed bin (35)); 2 86 dcl collection_manager_$get_id 2 87 entry (bit (36) aligned, bit (36) aligned, bit (36) aligned, fixed bin (17), 2 88 bit (1) aligned, bit (36) aligned, fixed bin (35)); 2 89 dcl collection_manager_$get_portion 2 90 entry (bit (36) aligned, bit (36) aligned, bit (36) aligned, fixed bin, ptr, 2 91 fixed bin (35), ptr, fixed bin (35), fixed bin (35), bit (1) aligned, ptr, 2 92 fixed bin (35), fixed bin (35)); 2 93 dcl collection_manager_$get_portion_from_ci_buffer 2 94 entry (ptr, bit (36) aligned, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), 2 95 ptr, fixed bin (35), fixed bin (35), bit (1) aligned, ptr, fixed bin (35), 2 96 fixed bin (35)); 2 97 dcl collection_manager_$get_portion_by_ci_ptr 2 98 entry (ptr, bit (36) aligned, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), 2 99 ptr, fixed bin (35), fixed bin (35), bit (1) aligned, ptr, fixed bin (35), 2 100 fixed bin (35)); 2 101 dcl collection_manager_$modify 2 102 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), bit (36) aligned, 2 103 fixed bin (35), fixed bin (35)); 2 104 dcl collection_manager_$modify_unprotected 2 105 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), bit (36) aligned, 2 106 fixed bin (35), fixed bin (35)); 2 107 dcl collection_manager_$modify_in_ci_buffer 2 108 entry (ptr, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), bit (36) aligned, 2 109 fixed bin (35), fixed bin (35)); 2 110 dcl collection_manager_$modify_portion 2 111 entry (bit (36) aligned, bit (36) aligned, fixed bin (35), fixed bin (35), ptr, 2 112 fixed bin (35), bit (36) aligned, fixed bin (35), fixed bin (35)); 2 113 dcl collection_manager_$postcommit_increments 2 114 entry (bit (36) aligned, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35)); 2 115 dcl collection_manager_$put 2 116 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), bit (36) aligned, 2 117 fixed bin (35), fixed bin (35)); 2 118 dcl collection_manager_$put_in_ci_buffer 2 119 entry (ptr, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), bit (36) aligned, 2 120 fixed bin (35), fixed bin (35)); 2 121 dcl collection_manager_$put_header 2 122 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), fixed bin (35)); 2 123 dcl collection_manager_$put_unprotected_header 2 124 entry (bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), fixed bin (35)); 2 125 2 126 dcl collection_manager_$replace_ci_buffer 2 127 entry (bit (36) aligned, bit (36) aligned, fixed bin (24) uns, ptr, fixed bin (35), 2 128 fixed bin (35)); 2 129 dcl collection_manager_$setup_ci_buffer 2 130 entry (bit (36) aligned, bit (36) aligned, fixed bin (24) uns, ptr, fixed bin (35), 2 131 fixed bin (35)); 2 132 dcl collection_manager_$simple_get_by_ci_ptr 2 133 entry (ptr, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), fixed bin (35), 2 134 fixed bin (35)); 2 135 dcl collection_manager_$simple_get_from_ci_buffer 2 136 entry (ptr, bit (36) aligned, bit (36) aligned, ptr, fixed bin (35), fixed bin (35), 2 137 fixed bin (35)); 2 138 2 139 /* END INCLUDE FILE dm_collmgr_entry_dcls.incl.pl1 */ 464 465 3 1 /* BEGIN INCLUDE FILE - dm_im_header.incl.pl1 */ 3 2 3 3 /* DESCRIPTION: 3 4* 3 5* The index_header structure is stored in the header element of an 3 6* index collection and describes basic information about the index. 3 7**/ 3 8 3 9 /* HISTORY: 3 10* 3 11*Written by Lindsey Spratt, 04/02/82. 3 12*Modified: 3 13*10/28/82 by Lindsey Spratt: Changed to version 3. Added the key_count_array. 3 14* count(0) is the number of keys in the index. count(N) is the 3 15* number of keys in the index which have at least fields 1 through N 3 16* having the same value as another key in the index, i.e. count(N) 3 17* is the number of partial duplicates with number of partial 3 18* duplication fields equal to N. 3 19*10/24/84 by Lindsey L. Spratt: Added a description. Converted to version 4. 3 20* Replaced the key_count_array with a key_count_array_element_id. 3 21* Changed the version field to char(8). Aligned the structure. 3 22**/ 3 23 3 24 /* format: style2,ind3 */ 3 25 dcl 1 index_header aligned based (index_header_ptr), 3 26 2 version char (8) aligned, 3 27 2 field_table_element_id 3 28 like element_id, 3 29 2 root_id fixed bin (24) unsigned unaligned, 3 30 2 pad1 bit (12) unaligned, 3 31 2 number_of_duplication_fields 3 32 fixed bin (17) unal, 3 33 2 pad2 bit (18) unal, 3 34 2 key_count_array_element_id 3 35 like element_id; 3 36 3 37 dcl index_header_ptr ptr; 3 38 dcl INDEX_HEADER_VERSION_4 init ("IdxHdr 4") char (8) aligned internal static options (constant); 3 39 3 40 /* END INCLUDE FILE - dm_im_header.incl.pl1 */ 466 467 4 1 /* BEGIN INCLUDE FILE dm_element_id.incl.pl1 */ 4 2 4 3 /* DESCRIPTION: 4 4* 4 5* Contains the declaration of an element identifier. Element 4 6* identifiers consist of two parts, the id (number) of the control interval 4 7* in which the element resides, and the index into the slot table of 4 8* the element in the control interval. The declaration of the element_id 4 9* structure reflects this division of the element identifier. The structure 4 10* is based on the automatic bit string element_id_string because programs 4 11* generally pass bit strings (element_id_string) to each other, then 4 12* interpret the bit string by overlaying the element_id structure ony if 4 13* it is necessary to access the parts of the id. Basing element_id on 4 14* addr(element_id_string) instead of on a pointer removes the necessity 4 15* for always setting that pointer explicitly and guarantees that changes 4 16* made to the string or structure do not get inconsistent. 4 17* 4 18* Changes made to element_id must also be made to datum_id, declared in 4 19* dm_cm_datum.incl.pl1. 4 20**/ 4 21 4 22 /* HISTORY: 4 23*Written by Matthew Pierret, 04/01/82. 4 24*Modified: 4 25*09/24/84 by Matthew Pierret: Added DESCRIPTION section. 4 26**/ 4 27 4 28 /* format: style2,ind3,ll79 */ 4 29 4 30 dcl element_id_string bit (36) aligned; 4 31 4 32 dcl 1 element_id aligned based (addr (element_id_string)), 4 33 2 control_interval_id 4 34 fixed bin (24) unal unsigned, 4 35 2 index fixed bin (12) unal unsigned; 4 36 4 37 4 38 /* END INCLUDE FILE dm_element_id.incl.pl1 */ 468 469 5 1 /* BEGIN INCLUDE FILE - dm_im_opening_info.incl.pl1 */ 5 2 5 3 /* DESRIPTION: 5 4* 5 5* The index_opening_info is per-process information, stored in a 5 6* hash_table managed by the opening_manager_, which allows the 5 7* index_manager_ to quickly reference certain unchanging pieces of 5 8* information rapidly. 5 9**/ 5 10 5 11 /* HISTORY: 5 12* 5 13*Written by Lindsey Spratt, 10/28/82. 5 14*Modified: 5 15*10/26/84 by Lindsey L. Spratt: Changed version to char(8). Added a 5 16* description. Added the current_rollback_count. Added the 5 17* key_count_array_ptr. 5 18*03/07/85 by R. Michael Tague: Added key_count_increments_ptr and 5 19* key_counts_postcommit_written. Changed to version 3. 5 20*03/25/85 by R. Michael Tague: Added key_count_unprotected_file. This 5 21* flag is used by im_update_opening_info to help it maintain the 5 22* key count array info. 5 23**/ 5 24 5 25 /* format: style2,ind3 */ 5 26 dcl 1 index_opening_info based (index_opening_info_ptr) aligned, 5 27 2 version char (8) aligned, 5 28 2 file_opening_id bit (36) aligned, 5 29 2 collection_id bit (36) aligned, 5 30 2 index_header_ptr ptr init (null), 5 31 2 field_table_ptr ptr init (null), 5 32 2 key_count_array_ptr 5 33 ptr init (null), 5 34 2 key_count_increments_ptr 5 35 ptr init (null), 5 36 2 flags, 5 37 3 key_count_postcommit_written 5 38 bit (1) unal init ("0"b), 5 39 3 key_count_unprotected_file 5 40 bit (1) unal init ("0"b), 5 41 3 pad bit (34) unal init (""b), 5 42 2 current_txn_id fixed bin (35) init (0), 5 43 2 current_rollback_count 5 44 fixed bin (35) init (0); 5 45 5 46 dcl index_opening_info_ptr ptr init (null); 5 47 dcl INDEX_OPENING_INFO_VERSION_3 5 48 init ("IdxOpn 3") char (8) aligned internal static options (constant); 5 49 5 50 /* END INCLUDE FILE - dm_im_opening_info.incl.pl1 */ 470 471 6 1 /* BEGIN INCLUDE FILE dm_cm_basic_ci.incl.pl1 */ 6 2 6 3 /* DESCRIPTION: 6 4* 6 5* The collection_manager_ manages the structure of the addressable 6 6* portion of a control interval. The addressable portion is that portion of 6 7* a control interval which the file_manager_ will allow the 6 8* collection_manager_ to address. In this description control interval will 6 9* be used to mean the addressable portion of a control interval. 6 10* 6 11* A control interval is divided into four parts: the header, the datum 6 12* position table (also known as the slot table or slots), un-used space and 6 13* used space. The beginning of the header is at offset 0, and the end of the 6 14* used space is at the end of the control interval (curently offset 4072). 6 15* Pictoriarly, a control interval is structured as follows: 6 16* 6 17* ---------------------------------------------------------------------- 6 18* | || | | | | | || || | / / | |/| | | 6 19* | Header || | slot | || un-used space || |/ / /| |/| | | 6 20* | || | table | || || | / / | |/| | | 6 21* | || | | | | | || || |/ / /| |/| | | 6 22* ---------------------------------------------------------------------- 6 23* ^ ^ ^ ^ ^ ^ ^ 6 24* | | | | | | | 6 25* | |...........|.......|...| 6 26* start of used space| | | | 6 27* | | each| 6 28* scattered free space| is a used 6 29* datum 6 30* 6 31* The basic_control_interval structure describes the header 6 32* (basic_control_interval.header, bci_header) and the slots 6 33* (basic_control_interval.datum_position_table, datum_slot for one only). 6 34* Each datum_slot contains the offset (in bytes) and the length (in bits) of 6 35* a datum in the used space. If the offset is equal to FREE_SLOT (declared 6 36* in dm_cm_basic_ci_const.incl.pl1), the slot is un-used. The slot also 6 37* contains flags describing the type of datum (see dm_cm_datum.incl.pl1). 6 38**/ 6 39 6 40 /* HISTORY: 6 41*Written by Matthew Pierret, 02/07/82. 6 42*Modified: 6 43*03/25/82 by Matthew Pierret: Fixed alignment differences basic_control_interval 6 44* and its sub-structures. 6 45*06/14/82 by Matthew Pierret: Removed common header and buffers. Changed 6 46* basic_ci_header to bci_header. Added previous_control_interval. 6 47*07/12/82 by Matthew Pierret: Changed collection_id to be bit (36) aligned. 6 48*10/29/82 by Matthew Pierret: Added flags to datum slots. 6 49*11/10/82 by Matthew Pierret: Removed continued_datum_is_present flag, as it 6 50* is not used. 6 51*03/28/84 by Matthew Pierret: Added the constants BCI_HEADER_LENGTH_IN_BYTES 6 52* and DATUM_POSITION_TABLE_OFFSET_IN_BYTES. 6 53**/ 6 54 6 55 /* format: style2 */ 6 56 dcl 1 basic_control_interval 6 57 aligned based (basic_control_interval_ptr), 6 58 2 header like bci_header, 6 59 2 datum_position_table 6 60 (0 refer (basic_control_interval.number_of_datums)) like datum_slot; 6 61 6 62 6 63 dcl 1 bci_header aligned based (bci_header_ptr), 6 64 2 layout_type char (4) aligned, 6 65 2 collection_id bit (36) aligned, 6 66 2 next_control_interval 6 67 fixed bin (24) uns unal, 6 68 2 previous_control_interval 6 69 fixed bin (24) uns unal, 6 70 2 flags unal, 6 71 3 continuation_datum_is_present 6 72 bit (1) unal, 6 73 3 free_slot_is_present 6 74 bit (1) unal, 6 75 3 must_be_zero bit (4) unal, /* reserved */ 6 76 2 scattered_free_space 6 77 fixed bin (17) unal, 6 78 2 start_of_used_space 6 79 fixed bin (17) unal, 6 80 2 number_of_datums fixed bin (17) unal; 6 81 6 82 dcl 1 datum_slot aligned based (datum_slot_ptr), 6 83 2 flags unal, 6 84 3 special_format_datum 6 85 bit (1) unal, /* reserved */ 6 86 3 is_continued bit (1) unal, 6 87 3 is_continuation bit (1) unal, 6 88 3 mbz bit (1) unal, /* reserved */ 6 89 2 offset_in_bytes fixed bin (15) uns unal, 6 90 2 length_in_bits fixed bin (17) uns unal; 6 91 6 92 dcl basic_control_interval_ptr 6 93 ptr; 6 94 dcl bci_header_ptr ptr; 6 95 dcl datum_slot_ptr ptr; 6 96 6 97 dcl BASIC_CI_LAYOUT_1 char (4) aligned init ("bci1") internal static options (constant); 6 98 6 99 /* END INCLUDE FILE dm_cm_basic_ci.incl.pl1 */ 472 473 7 1 /* BEGIN INCLUDE FILE dm_cm_basic_ci_const.incl.pl1 */ 7 2 7 3 /* DESCRIPTION: 7 4* 7 5* Contains constants useful in describing parts of a basic control interval. 7 6**/ 7 7 7 8 /* HISTORY: 7 9*Written by Matthew Pierret, 09/20/84. 7 10*Modified: 7 11**/ 7 12 7 13 dcl FREE_SLOT init (0) fixed bin (15) uns internal static options (constant); 7 14 dcl BCI_HEADER_LENGTH_IN_BYTES 7 15 init (20) fixed bin internal static options (constant); 7 16 dcl DATUM_POSITION_TABLE_OFFSET_IN_BYTES 7 17 init (20) fixed bin internal static options (constant); 7 18 7 19 7 20 /* END INCLUDE FILE dm_cm_basic_ci_const.incl.pl1 */ 474 475 8 1 /* BEGIN INCLUDE FILE: dm_ci_parts.incl.pl1 */ 8 2 8 3 /* DESCRIPTION: 8 4* 8 5* This include file contains the ci_parts structure. This structure 8 6* is used across the file_manager_ interface to specify the parts of a 8 7* control interval to get or put. If the number_of parts is equal to 0, 8 8* modules which take ci_parts interpret this case to mean to do everything 8 9* except the actual requested operation, i.e., lock the control interval 8 10* but don't get anything. offset_in_bytes is the 0-originned offset in 8 11* bytes from the beginning of the addressable portion of the control interval. 8 12* An offset_in_bytes which is in the addressable portion is in error. 8 13* Likewise, if offset_in_bytes + length_in_bytes is outside of the addressable 8 14* portion, it is in error. 8 15**/ 8 16 8 17 /* HISTORY: 8 18*Written by Matthew Pierret, 01/28/82. 8 19* (01/28/82 Andre Bensoussan, Design.) 8 20*Modified: 8 21*11/07/84 by Matthew Pierret: To add must_be_zero, initial attributes on 8 22* automatic storge. 8 23**/ 8 24 8 25 /* format: style2,ind3 */ 8 26 8 27 dcl 1 ci_parts aligned based (ci_parts_ptr), 8 28 2 number_of_parts fixed bin (17), 8 29 2 must_be_zero fixed bin, 8 30 2 part (cip_number_of_parts refer (ci_parts.number_of_parts)), 8 31 3 offset_in_bytes fixed bin (17), 8 32 3 length_in_bytes fixed bin (17), 8 33 3 local_ptr ptr; 8 34 8 35 dcl ci_parts_ptr ptr init (null ()); 8 36 dcl cip_number_of_parts fixed bin (17) init (0); 8 37 8 38 8 39 /* BEGIN INCLUDE FILE: dm_ci_parts.incl.pl1 */ 476 477 9 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 9 2 /* format: style3 */ 9 3 9 4 /* These constants are to be used for the flags argument of sub_err_ */ 9 5 /* They are just "string (condition_info_header.action_flags)" */ 9 6 9 7 declare ( 9 8 ACTION_CAN_RESTART init (""b), 9 9 ACTION_CANT_RESTART init ("1"b), 9 10 ACTION_DEFAULT_RESTART 9 11 init ("01"b), 9 12 ACTION_QUIET_RESTART 9 13 init ("001"b), 9 14 ACTION_SUPPORT_SIGNAL 9 15 init ("0001"b) 9 16 ) bit (36) aligned internal static options (constant); 9 17 9 18 /* End include file */ 478 479 end im_simple_insert; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0823.4 im_simple_insert.pl1 >spec>on>7192.pbf-04/04/85>im_simple_insert.pl1 462 1 01/07/85 0858.8 dm_im_ci_header.incl.pl1 >ldd>include>dm_im_ci_header.incl.pl1 464 2 04/04/85 0819.0 dm_collmgr_entry_dcls.incl.pl1 >spec>on>7192.pbf-04/04/85>dm_collmgr_entry_dcls.incl.pl1 466 3 01/07/85 0858.9 dm_im_header.incl.pl1 >ldd>include>dm_im_header.incl.pl1 468 4 01/07/85 0858.5 dm_element_id.incl.pl1 >ldd>include>dm_element_id.incl.pl1 470 5 04/04/85 0818.8 dm_im_opening_info.incl.pl1 >spec>on>7192.pbf-04/04/85>dm_im_opening_info.incl.pl1 472 6 01/07/85 0858.0 dm_cm_basic_ci.incl.pl1 >ldd>include>dm_cm_basic_ci.incl.pl1 474 7 01/07/85 0858.1 dm_cm_basic_ci_const.incl.pl1 >ldd>include>dm_cm_basic_ci_const.incl.pl1 476 8 01/07/85 0900.8 dm_ci_parts.incl.pl1 >ldd>include>dm_ci_parts.incl.pl1 478 9 04/16/82 0958.1 sub_err_flags.incl.pl1 >ldd>include>sub_err_flags.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. ACTION_CANT_RESTART 000000 constant bit(36) initial dcl 9-7 set ref 361* 455* BCI_HEADER_LENGTH_IN_BYTES constant fixed bin(17,0) initial dcl 7-14 ref 370 BCI_HEADER_PART_IDX constant fixed bin(17,0) initial dcl 217 ref 369 370 371 BITS_PER_BYTE 001112 constant fixed bin(35,0) initial dcl 211 ref 259 306 390 BYTES_PER_WORD constant fixed bin(35,0) initial dcl 211 ref 296 299 334 337 357 358 385 DATUM_POSITION_TABLE_OFFSET_IN_BYTES constant fixed bin(17,0) initial dcl 7-16 ref 296 334 385 DEFAULT_INDEX_CONTROL_INTERVAL_HEADER_SLOT constant fixed bin(17,0) initial dcl 1-56 ref 385 DEFAULT_NUMBER_OF_PARTS constant fixed bin(17,0) initial dcl 217 ref 287 INDEX_CI_HEADER_PART_IDX constant fixed bin(17,0) initial dcl 217 ref 389 390 392 INDEX_OPENING_INFO_VERSION_3 000002 constant char(8) initial dcl 5-47 set ref 252* KEY_PART_IDX constant fixed bin(17,0) initial dcl 217 ref 326 327 328 KEY_SLOT_PART_IDX constant fixed bin(17,0) initial dcl 217 ref 336 337 338 SHIFTED_SLOTS_PART_IDX constant fixed bin(17,0) initial dcl 217 ref 357 358 359 abs builtin function dcl 205 ref 306 443 addr builtin function dcl 205 ref 257 261 262 286 338 351 371 415 415 bci_header based structure level 1 dcl 6-63 ref 282 317 branch_ci_header_ptr 001644 automatic pointer dcl 1-53 set ref 255* ce_p_code parameter fixed bin(35,0) dcl 442 set ref 440 443 446* ci_parts based structure level 1 dcl 8-27 ci_parts_ptr 001650 automatic pointer initial dcl 8-35 set ref 286* 287 326 327 328 336 337 338 357 358 359 369 370 371 389 390 392 396* 8-35* cip_number_of_parts 001652 automatic fixed bin(17,0) initial dcl 8-36 set ref 8-36* code 000100 automatic fixed bin(35,0) initial dcl 162 set ref 162* 274* 275 275* 314* 315 315* 396* 397 397* 405* 407 407* 415* 417 417* collection_id 3 based bit(36) level 2 dcl 5-26 set ref 405* 415* collection_manager_$compact_control_interval 000026 constant entry external dcl 2-52 ref 314 collection_manager_$modify 000030 constant entry external dcl 2-101 ref 415 common_ci_header based structure level 1 unaligned dcl 1-26 common_ci_header_ptr 001640 automatic pointer dcl 1-41 set ref 254* 379 379 379 381 381 382 382 392 402 402 405* control_interval_id based fixed bin(24,0) level 2 packed unsigned unaligned dcl 197 ref 261 cv_p_expected_version parameter char(8) dcl 452 set ref 449 455 455* cv_p_received_version parameter char(8) dcl 451 set ref 449 455 455* cv_p_structure_name parameter char unaligned dcl 453 set ref 449 455* datum_slot based structure level 1 dcl 6-82 dm_error_$long_element 000020 external static fixed bin(35,0) dcl 239 set ref 307* 443 dm_error_$programming_error 000022 external static fixed bin(35,0) dcl 240 set ref 361* element_id based structure level 1 dcl 4-32 er_p_code parameter fixed bin(35,0) dcl 433 ref 431 435 error_table_$unimplemented_version 000024 external static fixed bin(35,0) dcl 242 set ref 455* file_manager_$get_ci_ptr 000010 constant entry external dcl 230 ref 274 file_manager_$put 000012 constant entry external dcl 232 ref 396 file_opening_id 2 based bit(36) level 2 dcl 5-26 set ref 274* 314* 396* 405* 415* first 1 based fixed bin(18,0) level 3 packed unsigned unaligned dcl 1-26 set ref 379* flags based structure level 2 packed unaligned dcl 1-26 free_bytes_in_ci 000101 automatic fixed bin(35,0) initial dcl 163 set ref 163* 299* 303 306 free_bytes_in_pool 000102 automatic fixed bin(35,0) initial dcl 164 set ref 164* 296* 299 311 im_update_branches 000014 constant entry external dcl 233 ref 405 index 0(24) based fixed bin(12,0) level 2 packed unsigned unaligned dcl 197 ref 262 index_ci_header_slot based structure level 1 dcl 198 index_ci_header_slot_offset_in_bytes 000103 automatic fixed bin(17,0) dcl 165 set ref 385* 387 index_ci_header_slot_ptr 000104 automatic pointer initial dcl 167 set ref 167* 387* 389 390 index_opening_info based structure level 1 dcl 5-26 index_opening_info_ptr 001646 automatic pointer initial dcl 5-46 set ref 251* 252 274 314 396 405 405 415 415 5-46* is_leaf based bit(1) level 3 packed unaligned dcl 1-26 ref 402 key_ci_id 000106 automatic fixed bin(24,0) unsigned dcl 169 set ref 261* 274 314* 396 405 key_index 000107 automatic fixed bin(12,0) unsigned dcl 170 set ref 262* 290 334 342 352 361 379 402 405 key_range 1 based structure level 2 packed unaligned dcl 1-26 key_slot_offset_in_bytes 000110 automatic fixed bin(35,0) dcl 171 set ref 334* 336 350 357 key_string_length_in_bits 000112 automatic fixed bin(35,0) dcl 175 set ref 258* 259 332 382 key_string_length_in_bytes 000113 automatic fixed bin(35,0) dcl 177 set ref 259* 299 311 324 327 key_string_offset_in_bytes 000111 automatic fixed bin(35,0) dcl 173 set ref 324* 326 331 366 key_string_ptr 000114 automatic pointer initial dcl 179 set ref 179* 257* 328 key_tail_space_used_since_last_prefix_compaction 0(18) based fixed bin(18,0) level 2 packed unsigned unaligned dcl 1-26 set ref 382* 382 last 1(18) based fixed bin(18,0) level 3 packed unsigned unaligned dcl 1-26 set ref 379 379* 381* 381 402 leaf_ci_header_ptr 001642 automatic pointer dcl 1-46 set ref 255* length builtin function dcl 205 ref 258 415 415 length_in_bits 0(19) based fixed bin(17,0) level 2 in structure "index_ci_header_slot" packed unsigned unaligned dcl 198 in procedure "im_simple_insert" ref 390 length_in_bits 0(19) 000153 automatic fixed bin(17,0) level 2 in structure "local_key_slot" packed unsigned unaligned dcl 183 in procedure "im_simple_insert" set ref 332* length_in_bytes 3 based fixed bin(17,0) array level 3 dcl 8-27 set ref 327* 337* 358* 370* 390* local_bci_header 000146 automatic structure level 1 dcl 182 set ref 282* 317* 371 local_ci_parts_buffer 000116 automatic fixed bin(71,0) initial array dcl 180 set ref 180* 286 local_key_slot 000153 automatic structure level 1 dcl 183 set ref 330* 338 local_ptr 4 based pointer array level 3 dcl 8-27 set ref 328* 338* 359* 371* 392* local_slots_buffer 000154 automatic fixed bin(71,0) array dcl 184 set ref 351 myname 000004 constant varying char(32) initial dcl 216 set ref 361* 455* new_number_of_slots 001624 automatic fixed bin(17,0) dcl 185 set ref 290* 295 296 342 352 361 367 node_ptr 001626 automatic pointer initial dcl 186 set ref 186* 274* 282 317 350 387 405* null builtin function dcl 205 ref 167 179 186 190 191 255 361 361 5-46 8-35 455 455 number_of_datums 4(18) 000146 automatic fixed bin(17,0) level 2 packed unaligned dcl 182 set ref 290 295 367* number_of_new_slots 001630 automatic fixed bin(17,0) dcl 187 set ref 295* 299 number_of_parts based fixed bin(17,0) level 2 dcl 8-27 set ref 287* number_of_slots_to_shift 001631 automatic fixed bin(35,0) dcl 188 set ref 352* 354 354 358 offset_in_bytes 0(04) based fixed bin(15,0) level 2 in structure "index_ci_header_slot" packed unsigned unaligned dcl 198 in procedure "im_simple_insert" ref 389 offset_in_bytes 0(04) 000153 automatic fixed bin(15,0) level 2 in structure "local_key_slot" packed unsigned unaligned dcl 183 in procedure "im_simple_insert" set ref 331* offset_in_bytes 2 based fixed bin(17,0) array level 3 in structure "ci_parts" dcl 8-27 in procedure "im_simple_insert" set ref 326* 336* 357* 369* 389* p_additional_storage_required parameter fixed bin(35,0) dcl 156 set ref 143 306* 375* 443* p_code parameter fixed bin(35,0) dcl 158 set ref 143 421* 435* p_common_ci_header_ptr parameter pointer dcl 152 ref 143 254 p_index_opening_info_ptr parameter pointer dcl 150 ref 143 251 p_insert_new_key parameter bit(1) dcl 153 ref 143 266 p_key_id based structure level 1 dcl 197 p_key_id_string parameter bit(36) dcl 155 set ref 143 261 262 415* p_key_string parameter bit unaligned dcl 154 set ref 143 257 258 415 415 415 415 part 2 based structure array level 2 dcl 8-27 scattered_free_space 3(18) 000146 automatic fixed bin(17,0) level 2 packed unaligned dcl 182 set ref 299 shifted_slots based structure level 1 dcl 200 set ref 354* 354 slots_in_ci_ptr 001632 automatic pointer initial dcl 190 set ref 190* 350* 354 slots_in_local_ptr 001634 automatic pointer initial dcl 191 set ref 191* 351* 354 359 start_of_used_space 4 000146 automatic fixed bin(17,0) level 2 packed unaligned dcl 182 set ref 296 324 366* sub_err_ 000016 constant entry external dcl 235 ref 361 455 total_storage_available 001636 automatic fixed bin(35,0) initial dcl 192 set ref 192* 415* 443 unspec builtin function dcl 205 set ref 282* 282 317* 317 330* 354* 354 version based char(8) level 2 dcl 5-26 set ref 252* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 9-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 9-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 9-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 9-7 BASIC_CI_LAYOUT_1 internal static char(4) initial dcl 6-97 BEGINNING_OF_ELEMENT internal static fixed bin(35,0) initial dcl 211 BRANCH_CI_HEADER_LENGTH_IN_BITS internal static fixed bin(17,0) initial dcl 1-56 DEFAULT_INITIAL_KEY_SLOT internal static fixed bin(17,0) initial dcl 1-56 FREE_SLOT internal static fixed bin(15,0) initial unsigned dcl 7-13 INDEX_HEADER_VERSION_4 internal static char(8) initial dcl 3-38 LEAF_CI_HEADER_LENGTH_IN_BITS internal static fixed bin(17,0) initial dcl 1-56 basic_control_interval based structure level 1 dcl 6-56 basic_control_interval_ptr automatic pointer dcl 6-92 bci_header_ptr automatic pointer dcl 6-94 branch_ci_header based structure level 1 unaligned dcl 1-48 collection_manager_$allocate_control_interval 000000 constant entry external dcl 2-50 collection_manager_$create_collection 000000 constant entry external dcl 2-54 collection_manager_$create_file 000000 constant entry external dcl 2-56 collection_manager_$delete 000000 constant entry external dcl 2-64 collection_manager_$delete_from_ci_buffer 000000 constant entry external dcl 2-67 collection_manager_$destroy_collection 000000 constant entry external dcl 2-58 collection_manager_$free_control_interval 000000 constant entry external dcl 2-60 collection_manager_$get 000000 constant entry external dcl 2-71 collection_manager_$get_by_ci_ptr 000000 constant entry external dcl 2-80 collection_manager_$get_control_interval_ptr 000000 constant entry external dcl 2-74 collection_manager_$get_from_ci_buffer 000000 constant entry external dcl 2-77 collection_manager_$get_header 000000 constant entry external dcl 2-83 collection_manager_$get_id 000000 constant entry external dcl 2-86 collection_manager_$get_portion 000000 constant entry external dcl 2-89 collection_manager_$get_portion_by_ci_ptr 000000 constant entry external dcl 2-97 collection_manager_$get_portion_from_ci_buffer 000000 constant entry external dcl 2-93 collection_manager_$modify_in_ci_buffer 000000 constant entry external dcl 2-107 collection_manager_$modify_portion 000000 constant entry external dcl 2-110 collection_manager_$modify_unprotected 000000 constant entry external dcl 2-104 collection_manager_$postcommit_increments 000000 constant entry external dcl 2-113 collection_manager_$put 000000 constant entry external dcl 2-115 collection_manager_$put_header 000000 constant entry external dcl 2-121 collection_manager_$put_in_ci_buffer 000000 constant entry external dcl 2-118 collection_manager_$put_unprotected_header 000000 constant entry external dcl 2-123 collection_manager_$replace_ci_buffer 000000 constant entry external dcl 2-126 collection_manager_$setup_ci_buffer 000000 constant entry external dcl 2-129 collection_manager_$simple_get_by_ci_ptr 000000 constant entry external dcl 2-132 collection_manager_$simple_get_from_ci_buffer 000000 constant entry external dcl 2-135 datum_slot_ptr automatic pointer dcl 6-95 element_id_string automatic bit(36) dcl 4-30 index_header based structure level 1 dcl 3-25 index_header_ptr automatic pointer dcl 3-37 key_string based bit unaligned dcl 199 leaf_ci_header based structure level 1 unaligned dcl 1-43 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_ERROR 000757 constant entry internal dcl 440 ref 417 CHECK_VERSION 001002 constant entry internal dcl 449 ref 252 ERROR_RETURN 000747 constant entry internal dcl 431 ref 275 307 315 397 407 446 FINISH 000745 constant entry internal dcl 426 ref 434 INSERT_KEY 000223 constant label dcl 266 MAIN_RETURN 000744 constant label dcl 422 ref 436 REPLACE_KEY 000706 constant label dcl 412 im_simple_insert 000071 constant entry external dcl 143 NAMES DECLARED BY CONTEXT OR IMPLICATION. addcharno builtin function ref 350 387 ceil builtin function ref 259 divide builtin function ref 259 390 max builtin function ref 290 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1260 1312 1113 1270 Length 1702 1113 32 353 145 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME im_simple_insert 1080 external procedure is an external procedure. FINISH internal procedure shares stack frame of external procedure im_simple_insert. ERROR_RETURN internal procedure shares stack frame of external procedure im_simple_insert. CHECK_ERROR internal procedure shares stack frame of external procedure im_simple_insert. CHECK_VERSION internal procedure shares stack frame of external procedure im_simple_insert. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME im_simple_insert 000100 code im_simple_insert 000101 free_bytes_in_ci im_simple_insert 000102 free_bytes_in_pool im_simple_insert 000103 index_ci_header_slot_offset_in_bytes im_simple_insert 000104 index_ci_header_slot_ptr im_simple_insert 000106 key_ci_id im_simple_insert 000107 key_index im_simple_insert 000110 key_slot_offset_in_bytes im_simple_insert 000111 key_string_offset_in_bytes im_simple_insert 000112 key_string_length_in_bits im_simple_insert 000113 key_string_length_in_bytes im_simple_insert 000114 key_string_ptr im_simple_insert 000116 local_ci_parts_buffer im_simple_insert 000146 local_bci_header im_simple_insert 000153 local_key_slot im_simple_insert 000154 local_slots_buffer im_simple_insert 001624 new_number_of_slots im_simple_insert 001626 node_ptr im_simple_insert 001630 number_of_new_slots im_simple_insert 001631 number_of_slots_to_shift im_simple_insert 001632 slots_in_ci_ptr im_simple_insert 001634 slots_in_local_ptr im_simple_insert 001636 total_storage_available im_simple_insert 001640 common_ci_header_ptr im_simple_insert 001642 leaf_ci_header_ptr im_simple_insert 001644 branch_ci_header_ptr im_simple_insert 001646 index_opening_info_ptr im_simple_insert 001650 ci_parts_ptr im_simple_insert 001652 cip_number_of_parts im_simple_insert THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry_desc ceil_fx1 divide_fx1 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. collection_manager_$compact_control_interval collection_manager_$modify file_manager_$get_ci_ptr file_manager_$put im_update_branches sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$long_element dm_error_$programming_error error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 143 000063 162 000104 163 000105 164 000107 167 000110 179 000112 180 000113 186 000130 190 000132 191 000133 192 000134 5 46 000135 8 35 000136 8 36 000137 251 000140 252 000144 254 000171 255 000175 257 000200 258 000202 259 000204 261 000212 262 000215 266 000220 274 000223 275 000243 282 000247 286 000253 287 000255 290 000257 295 000270 296 000272 299 000303 303 000321 306 000322 307 000330 311 000337 314 000342 315 000356 317 000362 324 000366 326 000377 327 000404 328 000406 330 000410 331 000411 332 000416 334 000422 336 000427 337 000433 338 000435 342 000437 350 000442 351 000446 352 000450 354 000453 357 000457 358 000465 359 000470 360 000471 361 000472 366 000527 367 000532 369 000534 370 000537 371 000542 375 000544 379 000546 381 000560 382 000562 385 000570 387 000574 389 000577 390 000605 392 000611 396 000612 397 000632 402 000636 405 000646 407 000701 411 000705 415 000706 417 000736 421 000742 422 000744 426 000745 428 000746 431 000747 434 000751 435 000752 436 000756 440 000757 443 000761 446 000773 447 001001 449 001002 455 001013 460 001103 ----------------------------------------------------------- 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