COMPILATION LISTING OF SEGMENT mu_sec_init_res Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 08/01/88 1336.3 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(86-08-13,Hergert), approve(88-07-11,MCR7903), 17* audit(88-07-07,Dupuis), install(88-08-01,MR12.2-1073): 18* Removed change of 84-11-05. i.e. reinstalled initialization of 19* even_word_pad. 20* END HISTORY COMMENTS */ 21 22 23 24 mu_sec_init_res: 25 init_res: 26 proc (dsm_path, submodel_version, db_path, insecure_db_ptr, 27 insecure_dbcb_ptr, insecure_rdbi_ptr, error_code); 28 29 /* BEGIN DESCRIPTION 30* 31* This routine gets a segment to be used as the secure portion of the 32* resultant model in the process directory, and initializes its base 33* structure rm_db_info, as well as the rm_rel_array and rm_rel_array for both 34* temporary relations and the files/relations known to the user from the 35* submodel or model he opened with. 36* 37* END DESCRIPTION 38* 39* 40* PARAMETERS: 41* 42* dsm_path - - (input) char(168), the pathname of the submodel if a submodel 43* opening was used 44* 45* submodel_version - - (input) fixed bin, the version of the submodel used, 46* if this was an opening via a submodel, else 0. 47* 48* db_path - - (input) char(168), the pathname of the database model 49* 50* insecure_db_ptr - - (input) the insecure pointer to the db_model segment in 51* the database model 52* 53* insecure_dbcb_ptr - - (input) pointer to the non-secure portion of the 54* resultant model, which contains the database index for this opening, and 55* the submodel switch 56* 57* insecure_rdbi_ptr - - (input) pointer to the rm_db_info segment, the 58* secure portion of the resultant 59* 60* error_code - - (output) fixed bin (35) error type encoding, 0 unless an 61* error occurred 62* 63* sub_error_ - - (output) condition, signaled upon occurence of an error to 64* provide more info 65* 66* 67* HISTORY: 68* 69* 78-08-01 Oris D. Friesen: Originally written. 70* 71* 79-05-01 Jim Gray : Rewritten to 72* 1) reflect resultant model changes of the active bit in the file array 73* 2) the mdbm_secured bit in the file array, no longer in rm_file_info 74* 3) add TP ctl_file iocb_ptr and sw_name to rm_db_info 75* 4) add freeing of submodel parameter structures after their use 76* 5) add use of sub_err_ and structured error handling 77* 6) change interface to allow more general information as input 78* 79* 80-02-01 Jim Gray : Modified to make rm_db_info.static_area extensible to 80* handle large database resultant model building during opening. 81* 82* 80-03-25 R. Lackey: Modified to remove calls to mdbm_util_ 83* 84* 80-10-01 Lindsey Spratt: changed to work with the new secure submodel 85* system; the mdbm_secured switches, rm_rel_array.file_data.mdbm_secured, 86* rm_db_info.mdbm_secured, are set to the value of dsm_sw; dsmd_ calls are 87* now directly to the relevant mrds_dsm module; an external static 88* submodel_iocb_ptr, set by mrds_dsl_init_res, is used when accessing the 89* submodel. 90* 91* 80-11-03 Jim Gray : Modified to change delete_$ptr to hcs_$delentry_seg 92* calls for performance. 93* 94* 80-11-05 Jim Gray : Modified to set the mdbm_secured switches from the 95* secured bit the the database model, as set by secure_mrds_db. 96* 97* 80-11-06 Jim Gray : Modified to only set rm_db_info.mdbm_secured from the 98* model secured bit, and elsewhere set mdbm_secured bits from 99* rm_db_info.mdbm_secured, so that the model is only touched once in getting 100* this info. 101* 102* 81-1-12 Jim Gray : added submodel_version parameter, so this could be 103* initialized in the resultant when opening was via a submodel. 104* 105* 81-01-28 Davids: changed drel_ptr to mrds_dsm_relation_names_ptr to 106* correspond to changes in the mrds_dsm_relation_names include file. 107* 108* 81-03-27 Jim Gray : removed call to obsolete module mus_ptr_man. 109* 110* 81-05-21 Rickie E. Brinegar: Modified to use the modified 111* mrds_dsm_get_relation_names.incl.pl1 which changed dsm_relation_names to 112* mrds_dsm_relation_name. 113* 114* 81-05-28 Jim Gray : modified for new structure of resultant. This included 115* combining the rm_rel/file_arrays, and adding info to the rm_db_info 116* structure for a domain list. 117* 118* 81-09-16 Rickie E. Brinegar: Modified model_name to be char (32) and the 119* assignment of name_in_model to be done via an rtrim to eliminate substring 120* condtion from occurring on a compile. 121* 122* 81-12-07 Roger D. Lackey: Modified to cause get_temp_segment_ to be called 123* only when submodel is used. And to change the initization of the variable 124* caller_name from mrds_dsl_open to mu_sec_init_res. For TR12046. 125* 126* 81-12-17 Davids: modified so that the rm_rel_array used for temp_rels has a 127* dimension 1 greater than mrds_data_$max_temp_rels. this extra slot is used 128* when a temp rel is being self-defined. TR11630. 129* 130* 82-07-21 Woodka: modified to initialize rdbi_ptr to null to prevent clean_up 131* from trying to delete whatever rdbi_ptr happened to be pointing at if the 132* user hit break before the pointer was assigned. TR phx13152. 133* 134* 83-05-04 Davids: Modified so that the segment the rdbi is in is a temp 135* segment obtained from mu_temp_segment. Cleanup of the segment in case of an 136* error will be done by the mrds_dsl_init_res module which will clean up all 137* temp segments. The variable resultant_dir and the entry 138* mrds_dsl_resultant_storage$get_temp_dir were deleted since mu_temp_segments 139* knows where to put the temp segment. The entries hcs_$make_seg, 140* unique_chars_ and hcs_$delentry_seg were also deleted since no segments 141* need to be explicitly created, unique character strings are not needed for 142* names for those segments which are no longer created. Cleanup is no done 143* by mrds_dsl_init_res which will cleanup all temp segments. 144* 145* 83-05-16 Davids: Deleted the internal procedure get_rdbi_ptr which got a 146* temp segment to put the rdbi into. Also converted the insecure_rdbi_ptr 147* from an output parameter to an input parameter. The temp segment is now 148* obtained in mrds_dsl_init_res in the same call that gets the other 149* temp segments. Deleted the declaration for mu_temp_segments$get_temp_segment 150* 151* 83-05-20 Davids: Added code to set the new rm_db_info.saved_res_version from 152* mrds_data_$saved_res_version. 153* 154* 84-11-05 Thanh Nguyen: Changed the initialization of even_word_pad to 155* ref_name_proc_ptr in the structure rm_db_info. 156**/ 157 158 /* initialize */ 159 160 dbm_ptr = insecure_db_ptr; /* get local version of pointers */ 161 dbcb_ptr = insecure_dbcb_ptr; 162 rdbi_ptr = insecure_rdbi_ptr; 163 db_index = dbcb_ptr -> dbcb.dbi; 164 dsm_sw = dbcb_ptr -> dbcb.dsm_sw; 165 error_code = 0; 166 area_ptr = null (); 167 clean_up_condition = OFF; 168 169 /* establish handler to tie up loose ends if user does a quit/release */ 170 171 on cleanup 172 begin; 173 clean_up_condition = ON; 174 if substr (db_mu_sec_init_res, 1, 1) then 175 on sub_error_ ; /* ignore sub_err_ calls during cleanup */ 176 call clean_up (); 177 end; 178 179 /* get space for submodel parameter structures */ 180 181 182 if dsm_sw then do; 183 call get_temp_segment_ (caller_name, area_ptr, error_code); 184 185 if error_code ^= 0 then 186 call 187 sub_err_ (error_code, caller_name, continue, info_ptr, 188 return_value, "^/^a", 189 "Unable to get a temporary segment for submodel parameter structure area" 190 ); 191 192 area_ptr -> parameter_area = empty (); 193 end; 194 195 196 /* get the number of relations and files in the model or submodel */ 197 198 call get_number_of_relations (); 199 200 /* initialize the rm_db_info based on this segment */ 201 202 call init_rm_db_info (); 203 204 /* initialize the temporary relation file and rel arrays */ 205 206 call init_temp_rel_array (); 207 208 /* initialize the normal model or submodel file and rel arrays */ 209 210 call init_rel_array (); 211 212 /* get rid of any temporary storage, and cleanup after errors */ 213 214 call clean_up (); 215 216 return; 217 218 get_number_of_relations: 219 procedure (); 220 221 /* set the number of relations known to the user, 222* based upon the opening mode from model or submodel */ 223 224 if ^dsm_sw then /* not submodel, get from model */ 225 number_of_relations = dbm_ptr -> db_model.num_rels; 226 227 228 else do; /* get from submodel */ 229 230 call mrds_dsm_get_relation_names (area_ptr, 231 mrds_dsm_relation_names_ptr, /* points to relation name list returned */ 232 submodel_iocb_ptr, 233 error_code); 234 235 if error_code = 0 then 236 number_of_relations = 237 mrds_dsm_relation_names_ptr -> mrds_dsm_relation_names.nrels; 238 else do; 239 call 240 sub_err_ (error_code, caller_name, continue, info_ptr, 241 return_value, "^/^a ^a", 242 "Unable to get the relation names for the submodel", dsm_path); 243 number_of_relations = 0; 244 end; 245 246 end; 247 248 end; 249 250 init_rm_db_info: 251 procedure (); 252 253 /* fill in the rm_db_info initial values */ 254 255 if error_code = 0 then do; 256 257 rm_db_info.db_version = dbm_ptr -> db_model.version; 258 rm_db_info.db_path = db_path; 259 rm_db_info.sm_path = dsm_path; 260 if dsm_sw then 261 rm_db_info.sm_version = submodel_version; 262 else rm_db_info.sm_version = 0; 263 rm_db_info.val_level = 4; /* default validation level */ 264 rm_db_info.mdbm_secured = db_model.mdbm_secured; /* depends on secure_mrds_db command */ 265 rm_db_info.administrator = OFF; /* set in mrds_dsl_init_res */ 266 rm_db_info.pad = OFF; 267 rm_db_info.domain_list_ptr = null (); 268 rm_db_info.ra_ptr = null (); 269 rm_db_info.tra_ptr = null (); 270 rm_db_info.saved_res_version = mrds_data_$saved_res_version; 271 rm_db_info.even_word_pad = 0; 272 273 /* define the secure resultant model area as extensible */ 274 275 rdbi_area_ptr = addr (rm_db_info.static_area); 276 area_size = sys_info$max_seg_size - fixed (rel (rdbi_area_ptr)); 277 278 call 279 mu_define_area (rdbi_area_ptr, area_size, "MRDS.rdbi", 280 "1"b /* extensible */, "0"b /* freeing */, "0"b, 281 "0"b /* no zeroing */, error_code); 282 283 end; 284 285 286 287 declare area_size fixed bin (18); /* size of area to be defined, initially */ 288 declare rdbi_area_ptr ptr; /* points to area to be defined */ 289 290 291 end; 292 293 init_temp_rel_array: 294 procedure (); 295 296 /* 297* get space for the temp rel rel_array in the 298* rm_db_info area, and fill in the initial values. 299* There is one more slot than max so that a temp rel can be self-defined. 300* This slot is not usable by the user. 301**/ 302 303 rm_num_rels_init = mrds_data_$max_temp_rels + 1; 304 305 allocate rm_rel_array set (rmra_ptr) in (rm_db_info.static_area); 306 307 rm_db_info.tra_ptr = rmra_ptr; 308 309 310 do i = 1 by 1 to rm_num_rels_init; 311 call fill_rel_array_entry ((BLANK), (BLANK)); 312 end; 313 314 315 316 317 end; 318 319 init_rel_array: 320 procedure (); 321 322 /* get space for the normal rel array over the submodel or model, 323* in the rm_db_info area, and fill in the initial values */ 324 325 rm_num_rels_init = number_of_relations; 326 327 allocate rm_rel_array set (rmra_ptr) in (rm_db_info.static_area); 328 329 rm_db_info.ra_ptr = rmra_ptr; 330 331 rm_rel_array.num_rels = rm_num_rels_init; 332 333 do i = 1 by 1 to rm_num_rels_init while (error_code = 0); 334 335 if ^dsm_sw then do; /* from model */ 336 337 if i = 1 then 338 fi_ptr = pointer (dbm_ptr, dbm_ptr -> db_model.file_ptr); 339 else fi_ptr = pointer (dbm_ptr, fi_ptr -> file_info.fwd_ptr); 340 341 model_name, submodel_name = fi_ptr -> file_info.file_name; 342 end; 343 344 else do; /* from submodel */ 345 call 346 mrds_dsm_read_relation ((mrds_dsm_relation_names.relation (i)), 347 area_ptr, relation_block_ptr, submodel_iocb_ptr, error_code); 348 if error_code ^= 0 then do; 349 call 350 sub_err_ (error_code, caller_name, continue, info_ptr, 351 return_value, "^/^a^a^a", 352 "Unable to get the model name of submodel file """, 353 mrds_dsm_relation_names.relation (i), """."); 354 model_name, submodel_name = BLANK; 355 end; 356 else do; 357 model_name = relation_block.dm_rel_name; 358 submodel_name = relation_block.dsm_rel_name; 359 end; 360 end; 361 362 call fill_rel_array_entry (model_name, submodel_name); 363 end; 364 365 366 end; 367 368 fill_rel_array_entry: 369 procedure (name_in_model, name_in_submodel); 370 371 /* initialize a relation array element */ 372 373 rm_rel_array.name (i).submodel = name_in_submodel; 374 rm_rel_array.name (i).mark = "!"; /* name separator for searching */ 375 rm_rel_array.rel_data (i).model_name = rtrim (name_in_model); 376 rm_rel_array.rel_data (i).ri_ptr = null (); 377 378 declare name_in_model char (32); /* name stored in db */ 379 declare name_in_submodel char (32); /* alias given in submodel */ 380 381 end; 382 383 clean_up: 384 procedure (); 385 386 /* get rid of temp parameter area used for submodels */ 387 388 389 if area_ptr ^= null () then do; 390 391 call release_temp_segment_ (caller_name, area_ptr, code); 392 if code ^= 0 then 393 call sub_err_ (code, caller_name, continue, info_ptr, return_value, 394 "^/^a", 395 "Unable to release the temp segment used for submodel parameter area." 396 ); 397 area_ptr = null (); 398 end; 399 400 if error_code ^= 0 | clean_up_condition 401 then rdbi_ptr = null (); /* the temp seg will be deleted by the mrds_dsl_init_res cleanup handler */ 402 403 end; 404 405 dcl db_index fixed bin (35); /* output parameter -- data base index */ 406 dcl insecure_db_ptr ptr; /* parameter -- points to db model or submodel */ 407 declare insecure_dbcb_ptr ptr; /* pointer to non-secure segment in resultant model */ 408 dcl dsm_sw bit (1) unal; /* parameter -- ON => submodel */ 409 dcl submodel_iocb_ptr ext ptr init (null); /* Also used by mrds_dsl_init_res, 410* mus_get_relation_names, and 411* mus_get_attribute_names. */ 412 declare cleanup condition; /* signaled during release */ 413 declare clean_up_condition bit (1); /* on => cleanup signaled */ 414 dcl insecure_rdbi_ptr ptr; /* parameter -- points to res. model db info */ 415 dcl error_code fixed bin (35); 416 dcl db_path char (168); /* abs. path of data base */ 417 dcl dsm_path char (168); /* path name of submodel */ 418 dcl i fixed bin; /* index value */ 419 420 421 dcl (addr, fixed, empty, null, pointer, rel, rtrim, substr) builtin; 422 423 declare code fixed bin (35); /* unused */ 424 declare get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 425 /* gets parameter space */ 426 declare release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 427 /* cleans up area */ 428 declare parameter_area 429 area (sys_info$max_seg_size - 24 /* for area header */) based; 430 /* space for parameters */ 431 declare OFF bit (1) internal static options (constant) init ("0"b); 432 /* false value */ 433 declare ON bit (1) internal static options (constant) init ("1"b); 434 /* true value */ 435 declare BLANK char (1) internal static options (constant) init (" "); 436 /* empty space */ 437 declare caller_name char (20) init ("mu_sec_init_res"); /* routine reporting error */ 438 declare continue char (1) init ("c"); /* no halt after printing error message */ 439 declare info_ptr ptr init (null ());/* unused */ 440 declare return_value fixed bin (35) init (0); /* unused */ 441 declare area_ptr ptr; /* space for working structures */ 442 declare sub_err_ entry options (variable); /* error reporter */ 443 declare number_of_relations fixed bin; /* submodel, or model count */ 444 declare model_name char (32); /* name of rel in db */ 445 declare submodel_name char (32); /* name of rel in submodel */ 446 declare sub_error_ condition; /* signaled when sub_err_ called */ 447 declare mu_define_area 448 entry (ptr, fixed bin (18), char (11), bit (1) aligned, 449 bit (1) aligned, bit (1) aligned, bit (1) aligned, fixed bin (35)); 450 /* sets up call to define_area_ */ 451 declare submodel_version fixed bin; /* version of submodel used */ 452 453 dcl ( 454 mrds_data_$max_temp_rels, 455 sys_info$max_seg_size 456 ) ext fixed bin (35); 457 dcl mrds_data_$saved_res_version ext char (8); 458 1 1 /* BEGIN mrds_dbcb.incl.pl1 -- jaw, 11/7/78 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), 1 7* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 1 8* This entry is being made to cover the change made on 85-07-01 by Thanh 1 9* Nguyen. The scopes_changed flag was added to make checking for this 1 10* more efficient (mrds error list #137). 1 11* 2) change(86-06-10,Blair), approve(86-08-07,MCR7491), 1 12* audit(86-08-07,Gilcrease), install(86-08-15,MR12.0-1127): 1 13* Add a bit called dont_check_txn_id to indicate whether or not we should 1 14* care if multiple txns use the same selection_expression. (mrds #156) 1 15* 3) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 1 16* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 1 17* Added parser_work_area_ptr and mrds_se_info_ptr for new parser. 1 18* END HISTORY COMMENTS */ 1 19 1 20 1 21 /* WARNING 1 22* If the dbcb structure is changed then the mrds_data_ 1 23* item saved_res_version MUST be incremented to invalidate all 1 24* existing saved resultants 1 25**/ 1 26 1 27 /* HISTORY : 1 28* 1 29* modified by Jim Gray - - 80-10-24, to add new_select_expr bit for 1 30* tid_list management 1 31* 1 32* 81-1-9 Jim Gray : added like reference for ease in making the 1 33* phony resultant in mu_database_index, without having the area dcl 1 34* included. 1 35* 1 36* 81-06-17 Roger Lackey : added last_store_rel_name for use by 1 37* mrds_dsl_store 1 38* 1 39* 81-06-26 Roger Lackey : Added no_optimize and print_search_order 1 40* switches 1 41* 1 42* 81-07-06 Jim Gray : added identifier for the current selection 1 43* expression, so that relation statistics can be updated relative 1 44* to number of selection expressions seem. Also removed init for 1 45* last_store_rel_name, as this iw now properly done in 1 46* mrds_dsl_init_res. 1 47* 1 48* 81-07-17 Roger Lackey : added pred_ptr and unused_ptrs. 1 49* 1 50* 82-08-19 Mike Kubicar : added store_vector field. This is needed 1 51* for the conversion to the relation manager. 1 52* 1 53* 82-08-23 Davids: added the relmgr_entries and access_costs 1 54* substructures so that the entries and costs can change 1 55* depending on the type of database that is opened. 1 56* 1 57* 82-09-09 Mike Kubicar : added modify_vector field. This is needed 1 58* since modify uses a different vector type (general) than does store. 1 59* 1 60* 82-09-20 Davids: changed names of (store modify)_vector to 1 61* (store modify)_vector_ptr. Also (delete modify)_tuple_by_id to 1 62* (delete modify)_tuples_by_id. added the element cursor_storage_ptr 1 63* which should be inited to null and will be set by mu_cursor_manager_$get 1 64* during the first call. 1 65* 1 66* 82-09-21 Davids: renamed cursor_storage_ptr to cursor_ptrs_storage_ptr 1 67* since it deals with the pointers to the cursors and not the cursors 1 68* themelves and added the element cursor_storage_area_ptr which points 1 69* to the area where the cursors are kept. 1 70* 1 71* 82-09-22 Davids: renamed the transact_ctl_seg to transactions_needed. 1 72* the transact_ctl_seg always had a value of 0 and really didn't mean 1 73* anything. 1 74* 1 75* 82-09-22 Mike Kubicar : added create_relation, create_index and 1 76* destroy_relation_by_opening to relmgr_entries. They are needed 1 77* by mrds_dsl_define_temp_rel. 1 78* 1 79* 82-09-24 Donna Woodka : added put_tuple to relmgr_entries. It 1 80* is needed by mu_store. 1 81* 1 82* 82-11-12 Davids: changed the declaration of the access_costs from fixed 1 83* bin to float bin since the values are not integers. 1 84* 1 85* 83-02-02 Davids: added the dbc_uid element. This will allow mrds to make 1 86* sure that the dbc_ptr still points to the correct segment. Element was 1 87* added to the end of the structure to allow modules that don't use 1 88* the element to continue to reference the dbcb structure without recompiling. 1 89* 1 90* 83-02-25 Davids: added the concurrency_on and rollback_on elements. These 1 91* are needed so that temp rels can be created with the same file attributes 1 92* as the permanent relations. 1 93* 1 94* 83-05-02 Mike Kubicar : Deleted get_next_search_specification_ptr and 1 95* added the resultant_in_pdir bit. 1 96* 1 97* 83-05-18 Davids: reduced the number of reserved bits to 14 (from 15) and 1 98* added the res_already_made element. 1 99* 1 100* 83-05-24 Mike Kubicar : Updated the relation manager calling sequences. 1 101* 1 102* 83-08-03 Mike Kubicar : Added the element_id_list_segment_ptr and removed 1 103* one of the unused pointers. 1 104* 1 105* 83-09-20 Ron Harvey: Added relmgr_entries.get_population. 1 106* 1 107* 84-08-27 John Hergert: Created compiled_se_info_ptr from unused_ptrs(2) 1 108* leaving unused_ptrs(1). 1 109* 1 110* 85-01-15 Thanh Nguyen: Added the work_area_ptr and removed the last 1 111* unused_ptrs (1). 1 112* 1 113* 85-04-12 Thanh Nguyen: Added user_started_transaction and 1 114* non_shared_to_shared flags. Also added se_transaction_id and some more 1 115* spare ptrs, entries and reserved storages for future enhancement, since 1 116* we changed the saved_res_version from rslt0001 to rslt0002. 1 117* 1 118* 85-07-01 Thanh Nguyen: Added scopes_changed flag. This flag is set by 1 119* common routine of mrds_dsl_set_scope, reset by mrds_dsl_optimize and 1 120* mrds_dsl_gen_srch_prog when building of a new search_vars. 1 121**/ 1 122 1 123 1 124 /* this structure is based on the {unique_name}.mrds.dbcb segment 1 125* that constitutes the non-secure portion of the resultant model that is 1 126* created during the opening of a database. it contains variables that 1 127* are used during the runtime access of the database, and an area 1 128* for evaluation of requests. it points to four other 1 129* segments in the resultant model, {unique_name}.mrds.rdbi, the secure 1 130* portion of the resultant(see mdbm_rm_db_info.incl.pl1), 1 131* {unique_name}.mrds.select, an area for selection expression evaluation, 1 132* {unique_name}.mrds.curdat, and {unique_name}.mrds.stadat, two segments 1 133* used in the elimination of duplicate tuples during a retrieve. 1 134* the dbcb area holds the structure in mdbm_scope_info.incl.pl1 1 135* that is used when the database is using the file scope mechanism 1 136* for concurrency control over file readying. the segment overlayed via 1 137* mrds_dbc.incl.pl1 structure is pointed to and also handles concurrency control, 1 138* across database openings. the pointer to this dbcb structure is kept in a table 1 139* which associates database indexes(returned from a call to dsl_$open), with particular 1 140* opening instances of resultant models. (see mu_database_index routine) */ 1 141 1 142 dcl 1 dbcb aligned based (dbcb_ptr), /* DBCB -- non-secure portion */ 1 143 2 data like dbcb_data, 1 144 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (dbcb.static_area)))); 1 145 1 146 dcl dbcb_ptr ptr; 1 147 1 148 declare 1 dbcb_data based, /* info part of dbcb, separated out so that 1 149* like references can avoid getting the area declaration */ 1 150 2 rdbi_ptr ptr, /* pointer to write protected mdbm_util_ info. */ 1 151 2 range_ptr ptr, /* ptr to range structure, or null */ 1 152 2 select_ptr ptr, /* ptr to select list, or null */ 1 153 2 sv_ptr ptr, /* pointer to search variables */ 1 154 2 so_ptr ptr, /* pointer to search operators */ 1 155 2 ti_ptr ptr, /* pointer to tuple info */ 1 156 2 lit_ptr ptr, /* pointer to the literal area, or null */ 1 157 2 current_ptr ptr, /* ptr to select list resulting from -current clause */ 1 158 2 ss_ptr ptr, /* ptr to select sets block if not simple s.e. */ 1 159 2 retr_info_ptr ptr, /* ptr to retrieve info area */ 1 160 2 trel_info_ptr ptr, /* ptr to retrieve info area */ 1 161 2 sti_ptr ptr, /* pointer to store info */ 1 162 2 dbc_ptr ptr, /* pointer to the data base control segment */ 1 163 2 sfi_ptr ptr, /* points to head of scalar function list */ 1 164 2 scope_ptr ptr, /* points to array of scope tuples */ 1 165 2 select_area_ptr ptr, /* ptr to area for current selection expression allocations */ 1 166 2 current_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 1 167* for eliminating duplicate tuples. */ 1 168 2 static_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 1 169* for eliminating duplicate tuples. */ 1 170 2 store_area_ptr ptr, /* temp storage area for dsl_$store */ 1 171 2 retrieve_area_ptr ptr, /* temp storage for dsl_$retrieve */ 1 172 2 modify_area_ptr ptr, /* temp storage area for dsl_$modify */ 1 173 2 delete_area_ptr ptr, /* temp storage area for dsl_$delete */ 1 174 2 def_temp_rel_area_ptr ptr, /* temp storage area for dsl_$define_temp_rel */ 1 175 2 pred_ptr ptr, /* Pointer to pred_array */ 1 176 2 store_vector_ptr ptr, /* Vector structure used during store operations */ 1 177 2 modify_vector_ptr ptr, /* Used during modifies */ 1 178 2 element_id_list_segment_ptr ptr, /* Points to the segment used to hold element_id_list structures */ 1 179 2 compiled_se_info_ptr ptr, /* points to the segment containing all info on compiled sexs */ 1 180 2 work_area_ptr ptr, /* Work area for encode/decode value allocations in mu_retrieve */ 1 181 2 se_info_ptr ptr, /* Points to se_info struct. Primarily for error reports */ 1 182 2 parser_work_area_ptr ptr, /* work area for parser */ 1 183 2 reserved_ptrs (4) ptr, /* Reserved for future use */ 1 184 2 another_flag bit (1) unal, /* on if predicate was -another */ 1 185 2 current_flag bit (1) unal, /* on if predicate was -current clause */ 1 186 2 dbc_incr bit (1) unal, /* on if dbc open mode has been incremented for this user */ 1 187 2 delete_flag bit (1) unal, /* On if search was called from mrds_dsl_sec_delete */ 1 188 2 dup_retain bit (1) unaligned, /* On if dup tuples allowed for retrieval */ 1 189 2 prev_select bit (1) unal, /* on if prev. select block processed in this s.e. */ 1 190 2 possible_op bit (1) unal, /* on of arith op. allowed */ 1 191 2 sel_clause bit (1) unal, /* on if currently in select clause */ 1 192 2 dsm_sw bit (1) unal, /* on if data base was opened via data submodel */ 1 193 2 val_rtrv bit (1) unal, /* if s.e. valid for retrieve */ 1 194 2 val_mod bit (1) unal, /* for modify */ 1 195 2 val_del bit (1) unal, /* for delete */ 1 196 2 val_dtr bit (1) unal, /* for define temp rel */ 1 197 2 transactions_needed bit (1) unal, /* On => transaction must be started or in progress does 1 198* not imply that the database is of type page_file */ 1 199 2 open_mode bit (3) unal, /* 0=>unknown, 1=>r, 2=>u, 3=>er, 4=>eu, >4=>bad */ 1 200 2 new_select_expr bit (1) unal, /* on => starting a new tid list management period */ 1 201 2 no_optimize bit (1) unal, /* On => no optimize */ 1 202 2 print_search_order bit (1) unal, /* On => print the search order */ 1 203 2 resultant_in_pdir bit (1) unal, /* On => Temp segments are in the process dir */ 1 204 2 res_already_made bit (1) unal, /* On => resultant has been made based on a saved copy */ 1 205 2 user_started_transaction bit (1) unal, /* On => user already started his own transaction. */ 1 206 2 non_shared_to_shared bit (1) unal, /* On => user changed the scope from non shared to shared 1 207* inside a sequence of -another selection expression. */ 1 208 2 scopes_changed bit (1) unal, /* On => scopes had been changed by set_scopes or delete_scopes */ 1 209 2 dont_check_txn_id bit (1) unal, /* On => cpmd needs same selection exp across multiple txns */ 1 210 2 reserved bit (10) unal, /* reserved for future use */ 1 211 2 nseq_sch fixed bin (35), /* no. tuples located via sequential search */ 1 212 2 nind_sch fixed bin (35), /* no. tuples located via index search */ 1 213 2 nhash_sch fixed bin (35), /* no. tuples located via hash search */ 1 214 2 nlk_sch fixed bin (35), /* no tuples located via link search */ 1 215 2 cur_lit_offset fixed bin (35), /* current bit offset in literal string */ 1 216 2 dbi fixed bin (35), /* database index for this opening */ 1 217 2 last_s_e_id_num fixed bin (35), /* identifying number for last selection expression seen */ 1 218 2 se_transaction_id bit (36) aligned, /* transaction id from beginning of select expression */ 1 219 2 last_store_rel_name char (32), /* Name of relation last used for store */ 1 220 2 cursor_ptrs_storage_ptr ptr, /* pointer to space where cursor ptrs are stored */ 1 221 2 cursor_storage_area_ptr ptr, /* pointer to area where the cursors are kept */ 1 222 2 reserved_words (10) fixed bin (35), /* Reserved for future use */ 1 223 2 relmgr_entries, /* relation manager entries */ 1 224 3 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 1 225 3 close entry (bit (36) aligned, fixed bin (35)), 1 226 3 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)), 1 227 3 destroy_cursor entry (ptr, ptr, fixed bin (35)), 1 228 3 set_scope entry (bit (36) aligned, bit (2) aligned, bit (2) aligned, fixed bin (35)), 1 229 3 delete_tuples_by_id entry (ptr, ptr, fixed bin (35), fixed bin (35)), 1 230 3 modify_tuples_by_id entry (ptr, ptr, ptr, fixed bin (35), fixed bin (35)), 1 231 3 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 1 232 3 get_tuples_by_spec entry (ptr, ptr, ptr, ptr, ptr, fixed bin (35)), 1 233 3 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 1 234 3 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 1 235 3 get_count entry (ptr, ptr, fixed bin (35), fixed bin (35)), 1 236 3 get_duplicate_key_count entry (ptr, bit (36) aligned, fixed bin (17), fixed bin (35), fixed bin (35)), 1 237 3 get_population entry (ptr, fixed bin (35), fixed bin (35)), 1 238 3 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, bit (36) aligned, fixed bin (35)), 1 239 3 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), bit (36) aligned, fixed bin (35)), 1 240 3 destroy_relation_by_path entry (char (*), char (*), fixed bin (35)), 1 241 3 reserved_entries (5) entry (), 1 242 2 access_costs, /* access costs for permute */ 1 243 3 total_primary_key_cost float bin, 1 244 3 access_cost float bin, 1 245 3 access_overhead float bin, 1 246 3 us_access_cost float bin, 1 247 3 os_access_cost float bin, 1 248 2 dbc_uid bit (36) aligned, /* uid of the segment containing the dbc structure */ 1 249 2 concurrency_on bit (1) unal, /* "1"b implies dmfile concurrency is being used */ 1 250 2 rollback_on bit (1) unal; /* "1"b iomplies before journaling is to be done */ 1 251 1 252 /* END mrds_dbcb.incl.pl1 */ 1 253 1 254 459 460 2 1 /* BEGIN INCLUDE FILE mdbm_db_model.incl.pl1 -- jaw, 10/2/78 */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(79-02-01,Gray), approve(), audit(), install(): 2 6* modified to save space occupied by model 2 7* 2) change(80-11-03,Gray), approve(), audit(), install(): 2 8* to add mdbm_secured bit in db_model 2 9* 3) change(82-04-09,Davids), approve(), audit(), install(): 2 10* collapsed the following into an unused_offset array: 2 11* chng_before_path_ptr chng_err_path_ptr chng_after_path_ptr 2 12* copy_before_path_ptr copy_err_path_ptr copy_after_path_ptr 2 13* dsply_before_path_pt dsply_err_path_pt dsply_after_path_ptr 2 14* accs_before_path_ptr accs_err_path_ptr accs_after_path_ptr 2 15* unused_1 2 16* Also changed the name of unused_2 to restructuring_history_offset 2 17* and changed the comment on the changer structure to indicate 2 18* that it will contain on database creation information. 2 19* 4) change(82-04-14,Davids), approve(), audit(), install(): 2 20* used one of the unused_offsets to point to a message which indicates 2 21* why the db is inconsistent. The offset will be null when the db is created 2 22* and set the first time the message is used. this is so it will be 2 23* consistent with existing data bases. Also added the message structure. 2 24* 5) change(82-04-28,Davids), approve(), audit(), install(): 2 25* added the undo_request element to the message structure 2 26* 6) change(82-05-04,Davids), approve(), audit(), install(): 2 27* changed unused_offset (12) to last_restructruring_history_offset and 2 28* changed restructuring_history_offset to first_restructuring_history_offset 2 29* 7) change(82-08-19,Davids), approve(), audit(), install(): 2 30* changed the meaning of db_type from 1 => relational and 2 => CODASYL to 2 31* 1 => vfile database and 2 => page_file database. Up to this point all 2 32* database types were equal to 1. 2 33* 8) change(83-02-14,Davids), approve(), audit(), install(): 2 34* changed db_type from a fixed bin unal to a substructure of 18 bit (1) unal 2 35* flags. This will allow information about transactions and dm_file 2 36* concurrency to be independent of the db_type, i.e. vfile or dm_file. The 2 37* change is compatable with all datamodels created by the released version 2 38* of mrds. 2 39* 9) change(83-02-15,Davids), approve(), audit(), install(): 2 40* added the rollback_on flag to the db_type_flags since it appears that you 2 41* can have a dmfile database that requires transactions but does not have any 2 42* journalizing. Also switched the order of the transactions_needed and 2 43* concurrency_on flags - this makes the change compatable with existing 2 44* dmfile databases except when displaying the model since concurrency_on and 2 45* rollback_on will be off in the model even though the dmfile relations had 2 46* them on during creation. 2 47* 10) change(83-02-22,Kubicar), approve(), audit(), install(): 2 48* Removed ctl_file_path_ptr. 2 49* 11) change(85-11-08,Spitzer), approve(85-12-03,MCR7311), 2 50* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 2 51* used 1 unused offset for unreferenced attribute linked lists in db_model, 2 52* 1 unused bit flag in domain_info to indicate an unreferenced domain, 1 bit 2 53* in the flag word for rmdb copying. 2 54* END HISTORY COMMENTS */ 2 55 2 56 2 57 /* this include file contains the structures that go into the make up 2 58* of the "db_model" segment in the model for the database. 2 59* in addition there file_model.m segments, 1 for each database file(see mdbm_file_model.incl.pl1) 2 60* 2 61* the db_model structure goes at the base of the segment, and contains items unique to 2 62* the whole databse. in addition, it has an area of size to fill the 2 63* rest of a segment, that holds the lists of files and domains in the database. 2 64* these lists are singly forward linked lists. all "pointers" in the database model 2 65* are maintained as offsets(bit (18)) from the base of the particular model segment 2 66* since actual pointers are process dependent on segment number. 2 67* the remaining structures are first a path_entry one to save pathnames in, 2 68* and the stack_item and constent structures, used to save a boolean 2 69* expression in polish form, with the stack represented by a linked list. 2 70* the final structure is one for identifying the status of version information */ 2 71 2 72 dcl 1 db_model aligned based (dbm_ptr),/* base of db_model segment, allocated once per database */ 2 73 2 version unal fixed bin, /* data base version, currently 4 */ 2 74 2 db_type_flags unal, 2 75 3 copy_good bit (1) unal, /* "1"b => copy of the db_model is the valid copy */ 2 76 3 unused (13) bit (1) unal, 2 77 3 rollback_on bit (1) unal, /* "1"b => before journaling is to be done */ 2 78 3 concurrency_on bit (1) unal, /* "1"b => dm_file concurrency is being used */ 2 79 3 transactions_needed bit (1) unal, /* "1"b => transactions are needed to reference data */ 2 80 3 vfile_type bit (1) unal, /* "1"b => vfile type relations, "0"b => dm_file type relations */ 2 81 2 uniq_sw_name char (32), /* per database unique attach switch name for files */ 2 82 2 consistant bit (1) unal, /* ON => correctly created/restructured database, ok to open */ 2 83 2 mdbm_secured bit (1) unal, /* on => database has been secured */ 2 84 2 reserved bit (34) unal, /* reserved for flags */ 2 85 2 blk_file_id_len unal fixed bin, /* no. bits required for blocked file id. */ 2 86 2 unblk_file_id_len unal fixed bin, /* number of file id bits, unblocked file */ 2 87 2 num_blk_files unal fixed bin, /* number of blocked files defined in db */ 2 88 2 num_unblk_files unal fixed bin, /* number of unblocked files defined in db */ 2 89 2 num_rels unal fixed bin, /* number of relations defined in db. */ 2 90 2 num_domains unal fixed bin, /* number of domains defined */ 2 91 2 num_dyn_links unal fixed bin, /* no. dynamic links defined */ 2 92 2 max_max_tuples unal fixed bin (35), /* maximum max_tuples across all files */ 2 93 2 pad_1 unal fixed bin (35), /* for future use */ 2 94 2 pad_2 unal fixed bin (35), /* for future use */ 2 95 2 version_ptr bit (18), /* offset to version structure */ 2 96 2 file_ptr unal bit (18), /* offset to first in threaded list of file_infos */ 2 97 2 domain_ptr unal bit (18), /* offset to first in list of domain_infos */ 2 98 2 unreferenced_attribute_ptr unal bit (18), /* offset to first in list of unreferenced attr_infos */ 2 99 2 unused_offsets (11) unal bit (18), /* extra offsets if needed */ 2 100 2 last_restructuring_history_offset unal bit (18), /* offset to last restructuring history entry */ 2 101 2 inconsistent_message_offset unal bit (18), /* offset to message indicating why db is inconsistent */ 2 102 2 first_restructuring_history_offset unal bit (18), /* offset to first restructuring history entry */ 2 103 2 changer_ptr unal bit (18), /* offset to information about db creation */ 2 104 2 dbm_area area (sys_info$max_seg_size - fixed (rel (addr (db_model.dbm_area))) - 1); 2 105 2 106 dcl dbm_ptr ptr; 2 107 2 108 /* the files in the database each have a file_info containing 2 109* their name, the file_model for each file is found by initiating the 2 110* segment "file_name.m" (i.e. the file's name with suffix ".m") 2 111* the file_info list is a singly linked list in definition order */ 2 112 2 113 dcl 1 file_info aligned based (fi_ptr), /* list of file names and numbers */ 2 114 2 file_name char (30), /* name of file */ 2 115 2 file_id bit (36), /* id number of file */ 2 116 2 fwd_ptr unal bit (18), /* thread to next in list */ 2 117 2 unused unal bit (18); /* for future expansion */ 2 118 2 119 dcl fi_ptr ptr; 2 120 2 121 /* each domain used in the database will have a domain info saved in the db_model 2 122* segment. it describes the domain of the given name, and it's options. 2 123* the domain_info's form a singly linked list in definition order */ 2 124 2 125 dcl 1 domain_info aligned based (di_ptr), /* one for each domain defined */ 2 126 2 name char (32), /* name of domain */ 2 127 2 db_desc_is_ptr bit (1) unal, /* on if descriptor is pointer to real desc. */ 2 128 2 user_desc_is_ptr bit (1) unal, /* on if user desc is ptr */ 2 129 2 no_conversion bit (1) unal, /* if no conversion allowed */ 2 130 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 2 131 2 unreferenced bit (1) unal, /* on => this domain is not used in any attribute */ 2 132 2 reserved bit (31) unal, 2 133 2 db_desc bit (36), /* desc. for item in db, or ptr to it */ 2 134 2 user_desc bit (36), /* desc. for user-visible attr, or ptr */ 2 135 2 ave_len fixed bin (35), /* average length of varying string */ 2 136 2 nck_items unal fixed bin, /* no. items in check stack */ 2 137 2 fwd_thread unal bit (18), /* offset to next in list */ 2 138 2 check_path_ptr unal bit (18), /* integ. check proc. */ 2 139 2 ck_stack_ptr unal bit (18), /* to check stack */ 2 140 2 encd_path_ptr unal bit (18), /* encode procedure */ 2 141 2 decd_path_ptr unal bit (18), /* decode procedure */ 2 142 2 str_before_path_ptr unal bit (18), /* proc paths and entries */ 2 143 2 str_err_path_ptr unal bit (18), 2 144 2 str_after_path_ptr unal bit (18), 2 145 2 get_before_path_ptr unal bit (18), 2 146 2 get_err_path_ptr unal bit (18), 2 147 2 get_after_path_ptr unal bit (18), 2 148 2 mod_before_path_ptr unal bit (18), 2 149 2 mod_err_path_ptr unal bit (18), 2 150 2 mod_after_path_ptr unal bit (18), 2 151 2 unused_1 unal bit (18), /* for future expansion */ 2 152 2 unused_2 unal bit (18), 2 153 2 changer_ptr unal bit (18); /* pointer to change_id and chane_time structure */ 2 154 2 155 dcl di_ptr ptr; 2 156 2 157 /* information necessary for attributes that are not used in any relation */ 2 158 2 159 dcl 1 unreferenced_attribute aligned based (ua_ptr), 2 160 2 name char (32), /* name of attribute */ 2 161 2 domain_ptr bit (18) unal, /* to domain_info */ 2 162 2 fwd_thread bit (18) unal, /* to next in list */ 2 163 2 unused (2) bit (18) unal; 2 164 2 165 dcl ua_ptr ptr; 2 166 2 167 2 168 /* space saving pathname$entryname structure, to be allocated 2 169* only when a path$entry has to be saved, else only a bit(18) 2 170* offset takes up space in the main model structure */ 2 171 2 172 declare 1 path_entry based (path_entry_ptr), 2 173 2 path char (168), /* pathname portion of desired path$entry */ 2 174 2 entry char (32), /* entryname portion of desired path$entry */ 2 175 2 reserved unal bit (36); /* for future use */ 2 176 2 177 declare path_entry_ptr ptr; 2 178 2 179 2 180 2 181 2 182 2 183 /* declarations for model of postfix stack holding the check option boolean expression 2 184* the following encoding values indicate the corresponding type of stack element 2 185* 2 186* 1 = 2 187* 2 ^= 2 188* 3 > 2 189* 4 < 2 190* 5 >= 2 191* 6 <= 2 192* 2 193* 10 and 2 194* 20 or 2 195* 30 not 2 196* 2 197* 40 - (minus) 2 198* 2 199* 50 domain variable(same name as domain) 2 200* 2 201* 60 constant(number, bit string, or character string) 2 202* 2 203**/ 2 204 2 205 2 206 declare 1 stack_item based (stack_item_ptr), /* element of stack model list */ 2 207 2 next bit (18), /* link to next in list */ 2 208 2 type fixed binary, /* code for this element type */ 2 209 2 value_ptr bit (18); /* pointer to variable holding value, 2 210* if this is a constant element type */ 2 211 2 212 declare stack_item_ptr ptr; /* pointer to a stack element */ 2 213 2 214 2 215 2 216 declare 1 constant based (constant_ptr), /* variable size space for constant's value storage */ 2 217 2 length fixed bin (35), /* length allocated to hold value */ 2 218 2 value bit (alloc_length refer (constant.length)) aligned; /* value for this constant */ 2 219 2 220 declare constant_ptr ptr; /* pointer to constant's value space */ 2 221 2 222 declare alloc_length fixed binary (35) internal static; /* amount of space to allocate for constant's value */ 2 223 2 224 /* version structure, giving status of source for CMDB/RMDB, 2 225* status of model, and status of resultant */ 2 226 2 227 /* version number is in form MM.N.Y 2 228* where MM is the major version number, N is the minor version alteration, 2 229* and Y is the lastest modification to that alteration, 2 230* where M and N represent numbers 0-9, and Y is a letter */ 2 231 2 232 declare 1 version_status unal based (version_status_ptr), 2 233 2 cmdb_rmdb, 2 234 3 major fixed bin, 2 235 3 minor fixed bin, 2 236 3 modification char (4), 2 237 2 model, 2 238 3 major fixed bin, 2 239 3 minor fixed bin, 2 240 3 modification char (4), 2 241 2 resultant, 2 242 3 major fixed bin, 2 243 3 minor fixed bin, 2 244 3 modification char (4); 2 245 2 246 declare version_status_ptr ptr; 2 247 2 248 2 249 /* maintains information only about the db creation */ 2 250 2 251 declare 1 changer unal based (changer_ptr), 2 252 2 id char (32), 2 253 2 time fixed bin (71), 2 254 2 next bit (18); /* to next in the singly linked list */ 2 255 2 256 declare changer_ptr ptr; 2 257 2 258 2 259 dcl 01 message_str unal based (message_str_ptr), /* general purpose structure to hold messages */ 2 260 02 len fixed bin, /* length of the message */ 2 261 02 text char (message_str_len refer (message_str.len)), /* actual message */ 2 262 02 name char (32), /* name of thing that set the message */ 2 263 02 undo_request char (100), /* rmdb request that will undo the operation 2 264* that caused the database to become inconsistent */ 2 265 02 mbz bit (36); /* for possible extensions, like an offset to another message */ 2 266 2 267 dcl message_str_ptr ptr; /* pointer to the message_str structure */ 2 268 2 269 dcl message_str_len fixed bin; /* initail length of the text string in message_str */ 2 270 2 271 /* END INCLUDE FILE mdbm_db_model.incl.pl1 */ 2 272 2 273 461 462 3 1 /* BEGIN mdbm_rm_db_info.incl.pl1 -- jaw, 11/7/78 */ 3 2 3 3 3 4 3 5 /****^ HISTORY COMMENTS: 3 6* 1) change(86-08-13,Hergert),, approve(88-06-28,MCR7903), 3 7* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 3 8* Removed change of 84-11-02. i.e. replaced even_word_pad. 3 9* END HISTORY COMMENTS */ 3 10 3 11 3 12 /* WARNING 3 13* If the rm_db_info structure is changed then the mrds_data_ 3 14* item saved_res_version MUST be incremented to invalidate all 3 15* existing saved resultants 3 16**/ 3 17 3 18 /* DESCRIPTION: This structure is based on a segment 3 19* {unique_name}.mrds.rdbi that represents the secure portion of the 3 20* resultant model that is created partially at database open time, 3 21* (the rm_file_array, and rm_rel_array) and partially at ready_file 3 22* time, (the rm_file_info, rm_rel_info, rm_attr_info, 3 23* rm_domain_info, rm_plink_info and rm_clink_info). it's purpose is 3 24* to provide an efficient means of accessing database model 3 25* information, as seen from the possibly submodel view of the user, 3 26* and his current state of "files readied". it is the secure part 3 27* because it contains the model information which needs to be 3 28* protected from general knowledge, and this segment will 3 29* eventually be capable of being in a lower ring. the structure 3 30* itself points to four arrays that are allocated in it's area, 3 31* that in turn point to the other structures mentions above, also 3 32* allocated in the rm_db_info.static_area. the arrays are the 3 33* rm_file_array, and rm_rel_array. their are a pair for temporary 3 34* relations, initially empty, and a pair for normal model 3 35* files/relations. the normal rm_file_array is initialized to a 3 36* list of all known file names, the rm_rel_array only gets relation 3 37* names as files are readied. the rm_file_array points to 3 38* rm_file_infos for each file (see mdbm_rm_file_info.incl.pl1) and 3 39* the rm_rel_array points to rm_rel_info for each relation 3 40* "readied". (see mdbm_rm_rel_info.incl.pl1). (the arrays are in 3 41* mdbm_rm_file_array.incl.pl1 and mdbm_rm_rel_array.incl.pl1). the 3 42* file infos point to contained rel infos, the rel infos point to 3 43* contained attr infos, and those in turn to domain infos. (see 3 44* mdbm_rm_attr_info.incl.pl1 and mdbm_rm_domain_info.incl.pl1) 3 45* foreign keys are represented by the structures 3 46* mdbm_rm_plink_info.incl.pl1, and mdbm_rm_clink_info.incl.pl1. the 3 47* pathnames of the model and submodel, if any, are also maintained 3 48* in rm_db_info. the pointer to this rm_db_info segment is obtained 3 49* from the dbcb segment tructure(see mrds_dbcb.incl.pl1) see the 3 50* individual include files for further organization information, 3 51* and particular data structures. 3 52* 3 53* HISTORY: 3 54* 3 55* 80-02-01 Jim Gray : Modified to put area on even word boundary, 3 56* so that define_area_ could be used to make it an extensible area 3 57* 3 58* 81-1-9 Jim Gray : added like reference to make the phony 3 59* resultant in mu_database_index easier to keep, since no reference 3 60* to the area is needed. 3 61* 3 62* 81-1-12 Jim Gray : added version of submodel used in opening to 3 63* resultant. 3 64* 3 65* 81-05-13 Rickie E. Brinegar: added the administrator bit to the 3 66* structure. 3 67* 3 68* 81-05-28 Jim Gray : removed pointers to file_arrays, since they 3 69* are now combined into the rel_array. Removed the control file 3 70* info which was unused. Added pointer to head of domain list, 3 71* which is to be used to insure only one copy of each domain info. 3 72* 3 73* 83-05-19 Davids: Added the saved_res_version element. 3 74* 3 75* 84-11-02 Thanh Nguyen: Replaced the even_word_pad by the 3 76* ref_name_proc_ptr to point to list of reference name of the 3 77* check, encode, or decode proc. 3 78* 3 79* CAUTION: The structure entries from db_version to sm_path should 3 80* not be moved or have their declarations changed because they are 3 81* used in the handling of old version database openings. 3 82* 3 83* 3 84**/ 3 85 3 86 dcl 1 rm_db_info aligned based (rdbi_ptr), /* data base info, located at base of res. dm. seg. */ 3 87 2 data like rm_db_info_data, 3 88 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (rm_db_info.static_area)))); 3 89 3 90 dcl rdbi_ptr ptr; 3 91 3 92 declare 1 rm_db_info_data based, /* separate declaration of info, so others can use 3 93* like reference to it without getting the area as well */ 3 94 2 db_version fixed bin, /* version no. of db */ 3 95 2 sm_version fixed bin unal, /* version of submodel used unal, 0 if model opening */ 3 96 2 val_level fixed bin unal, /* validation level for this db. */ 3 97 2 db_path char (168), /* abs. path of db. */ 3 98 2 sm_path char (168), /* path of submodel or model */ 3 99 2 mdbm_secured bit (1) unal, /* ON => database is secured */ 3 100 2 administrator bit (1) unal, /* ON => user is an administrator */ 3 101 2 pad bit (34) unal, /* for future use */ 3 102 2 saved_res_version char (8), /* version of the saved resultant in the 3 103* dbcb and rdbi segments in the db dir */ 3 104 2 domain_list_ptr ptr, /* pointer to head of list of domain_info's */ 3 105 2 ra_ptr ptr, /* pointer to rel. array */ 3 106 2 tra_ptr ptr, /* to rel array for temp rels */ 3 107 2 even_word_pad fixed bin (71) aligned; /* padding to put area on even word boundary */ 3 108 3 109 /* END mdbm_rm_db_info.incl.pl1 */ 3 110 3 111 463 464 4 1 /* BEGIN mdbm_rm_rel_array.incl.pl1 -- jaw, 8/9/78 */ 4 2 4 3 /* WARNING 4 4* If the rm_rel_array structure is changed then the mrds_data_ 4 5* item saved_res_version MUST be incremented to invalidate all 4 6* existing saved resultants 4 7**/ 4 8 4 9 /* HISTORY: 4 10* 4 11* 81-05-28 Jim Gray : added model_name and file_id as part of 4 12* combining funtions of file_array and rel_array into one 4 13* structure. This will only allow 1 relation per file model now. 4 14* Also changed structure to allow more efficient searching 4 15* via and index builtin, rather than a programmed loop. 4 16* Search is now I = index(string(rm_rel_array.name), "!" || in_name) 4 17* with I = ((I - 1) / 33) + 1 to convert from a char to array index. 4 18* 4 19**/ 4 20 4 21 4 22 /* this structure is allocated in the static are of the structure 4 23* in mdbm_rm_db_info.incl.pl1, the secure portion of the database 4 24* resultant model upon opening the database. two copies are 4 25* allocated, one for temporary relations, initially empty, and one 4 26* for relations known to the opener, which has a length sufficient 4 27* for all relations known to the user, but whose names, etc. will 4 28* not be filled in until the file containing that particular 4 29* relation is readied. the rm_db_info structure contains a pointer 4 30* to the rel_arrays, and the array entries, when "readied", point 4 31* to the mdbm_rm_rel_info.incl.pl1 structures containing model 4 32* information about the relation, it's attributes, etc. */ 4 33 4 34 dcl 1 rm_rel_array aligned based (rmra_ptr), /* array of open relations */ 4 35 2 num_rels fixed bin, /* no. rels in db. */ 4 36 2 name (1:rm_num_rels_init refer (rm_rel_array.num_rels)) unal, 4 37 3 mark char (1) unal, /* separator character = "!" */ 4 38 3 submodel char (32) unal, /* name of relation is submodel view, model opening => model name */ 4 39 2 rel_data (rm_num_rels_init refer (rm_rel_array.num_rels)), 4 40 3 model_name char (30), /* name of relation in model */ 4 41 3 ri_ptr ptr unal ; /* pointer to rm_rel_info */ 4 42 4 43 dcl rmra_ptr ptr; 4 44 dcl rm_num_rels_init fixed bin; 4 45 4 46 /* END mdbm_rm_rel_array.incl.pl1 */ 4 47 4 48 465 466 5 1 /* BEGIN INCLUDE FILE - mrds_dsm_entry_dcls.incl.pl1 */ 5 2 /* Written by Lindsey Spratt - - 80-10-24 */ 5 3 /* Modified by Jim Gray - - 80-11-13, to remove declarations of non-existant modules */ 5 4 5 5 /* format: style2 */ 5 6 dcl mrds_dsm_close entry (ptr, fixed bin (35)); 5 7 dcl mrds_dsm_close$force entry (ptr); 5 8 dcl mrds_dsm_copy entry (char (*), char (*), fixed bin (35)); 5 9 dcl mrds_dsm_set_db_path entry (ptr, char (*), fixed bin (35)); 5 10 dcl mrds_dsm_define_temp 5 11 entry (char (*), ptr, fixed bin (35)); 5 12 dcl mrds_dsm_open_read entry (char (*), ptr, fixed bin (35)); 5 13 dcl mrds_dsm_read_header entry (ptr, ptr, ptr, fixed bin (35)); 5 14 dcl mrds_dsm_read_relation entry (char (*), ptr, ptr, ptr, fixed bin (35)); 5 15 dcl mrds_dsm_get_relation_names 5 16 entry (ptr, ptr, ptr, fixed bin (35)); 5 17 dcl mrds_dsm_validate_header 5 18 entry (ptr, fixed bin (35)); 5 19 dcl mrds_dsm_dmdsm entry (ptr, fixed bin (35)); 5 20 dcl mrds_dsm_valid_$validate 5 21 entry (ptr, ptr, char (*), char (*), ptr, ptr, fixed bin (35)); 5 22 5 23 5 24 /* END INCLUDE FILE - mrds_dsm_entry_dcls.incl.pl1 */ 467 468 6 1 /* BEGIN INCLUDE FILE mrds_dsm_relation_names.incl.pl1 -- nsd 81/01/12 */ 6 2 6 3 /* 6 4*This include file is for internal mrds use only. It is used to 6 5*return an array of submodel relation names. 6 6* 6 7*HISTORY 6 8* 6 9*81-01-12 Davids: written 6 10* 6 11*81-09-14 Davids: changed relation to char (32) from char (64). 64 6 12*was a proposed maximum but could not be implemented. Several 6 13*modules would not compile when compiled with -prefix stringsize 6 14*becuase they made assignments of the form char (32) = char (64). 6 15**/ 6 16 6 17 dcl 1 mrds_dsm_relation_names based (mrds_dsm_relation_names_ptr), 6 18 2 nrels fixed bin, 6 19 2 relation (mrds_dsm_relation_names_nrels_alloc refer (mrds_dsm_relation_names.nrels)) char (32); 6 20 6 21 dcl mrds_dsm_relation_names_nrels_alloc fixed bin; 6 22 6 23 dcl mrds_dsm_relation_names_ptr ptr; 6 24 6 25 /* END INCLUDE FILE mrds_dsm_relation_names.incl.pl1 */ 6 26 469 470 7 1 /* BEGIN INCLUDE FILE mrds_dsm_rel_block.incl.pl1 7 2* 7 3* Created October, 1975 for release in MR 4.0 7 4* 7 5* The relation_block contains the relation name and the attribute 7 6* names and access information 7 7* 7 8* HISTORY 7 9* 7 10* 80-04-10 Spratt: changed to have version number, be explicitly 7 11* . based, use an automatic variable in the refer for num of 7 12* . attributes, add access flags for rel and attr's, remove 7 13* . attr key flags. This is for the first Attribute Level 7 14* . Security version of MRDS. 7 15* 7 16* 81-01-14 Davids: increased submodel rel and attr names to 64 7 17* . characters and made dsm_rel_name char varying. changed 7 18* . access bits from a bit string to individually named 7 19* . flags. 7 20**/ 7 21 7 22 dcl relation_block_ptr ptr; 7 23 dcl rb_number_of_attributes fixed bin (35); 7 24 dcl RELATION_BLOCK_VERSION_1 fixed bin (35) internal static options (constant) init (1); 7 25 7 26 dcl 1 relation_block based (relation_block_ptr), 7 27 /* Relation block */ 7 28 2 version fixed bin (35), 7 29 2 dsm_rel_name char (64) varying, /* Data submodel relation name */ 7 30 2 dm_rel_name char (32), /* Data model relation name */ 7 31 2 rel_access unal, 7 32 3 append bit (1), 7 33 3 delete bit (1), 7 34 3 null bit (1), 7 35 3 mbz1 bit (33), 7 36 2 no_rb_attributes fixed bin, /* The number of attributes in this relation */ 7 37 2 attribute_info (rb_number_of_attributes refer (relation_block.no_rb_attributes)), 7 38 3 dsm_attr_name char (64) varying, /* Data submodel attribute name */ 7 39 3 attr_access unal, /* Data submodel attribute flags */ 7 40 4 read bit (1), 7 41 4 modify bit (1), 7 42 4 null bit (1), 7 43 4 mbz2 bit (33), /* For future use */ 7 44 3 dm_attr_name char (32) varying, /* Data model attribute name */ 7 45 3 dm_attr_flags, /* Data model attribute flags */ 7 46 4 mbz3 bit (36); /* For future use */ 7 47 7 48 /* END INCLUDE FILE mrds_dsm_rel_block.incl.pl1 */ 7 49 471 472 8 1 /* BEGIN INCLUDE FILE mrds_debug_names.incl.pl1 Jim Gray 8/7/79 */ 8 2 8 3 /* this include file associates module names with debug switches 8 4* that are stored in the data segment mrds_debug_ 8 5* each module has it's own bit(9) debug switch, to define for various 8 6* debug actions, with new module names to be added to the end 8 7* of this list using the next in order array index in mrds_debug_ 8 8* the convention for naming is db_{module's full name} 8 9* for the defined declaration over mrds_debug_$switch. 8 10* module.name array is then changed to reflect the new 8 11* number of modules, with the full module name added to the bottom 8 12* of the initialize list for the name array. 8 13* the module name array is used by the command level interface that sets/resets 8 14* the current status of the debug switches for each module. 8 15* the modules themselves use the db_{module name} declared variable for 8 16* that module to interagate the bits for proper debug action to take. 8 17* the definition of the meaning of the 9-bits is up to each individual module's 8 18* designer. */ 8 19 8 20 8 21 /* 8 22* HISTORY 8 23* 8 24* 80-11-12 Davids: added db_mus_mod_ubtup 8 25* 8 26* 80-11-13 Davids: added db_mu_sec_get_tuple and db_mu_sec_get_tid 8 27* 8 28* 80-12-15 Jim Gray : added mrds_dsl_set_fscope to display non 8 29* error info about being queued, and request being granted after 8 30* being queued. 8 31* 8 32* 81-01-15 Jim Gray : added mu_concurrency_control bit to allow 8 33* running MR8 and MR9 mrds against the same database at the same 8 34* time. 8 35* 8 36* 81-02-02 Jim Gray : added bit for mrds_rst_dmdm to allow 8 37* displaying internal tuple format bit offset, rather than the user 8 38* view. 8 39* 8 40* 81-02-06 Jim Gray : added bit for new mu_open_name_manager, to 8 41* dump an element from the list, when display_open_names entry 8 42* called with switch set. 8 43* 8 44* 81-05-20 Jim Gray : added bit for mrds_dsl_where_clause display 8 45* of sub_err_ messages, when cross domain compare occurs. 8 46* 8 47* 81-06-17 Jim Gray : added bit for mu_open_iocb_manager to display 8 48* iocb slot and rel name. 8 49* 8 50* 81-07-08 Jim Gray : added comment for bit 4 in mrds_dsl_permute 8 51* 8 52* 81-07-17 Jim Gray : added comment for bit 5 in mrds_dsl_permute 8 53* 8 54* 81-07-18 Jim Gray : added bit 1 for mrds_dsl_gen_srch_prog that 8 55* allows key searches, other than than specified by permute to be 8 56* done as comparisons instead. 8 57* 8 58* 81-07-22 Jim Gray : added comment about bit 2 in 8 59* mrds_dsl_gen_srch_prog 8 60**/ 8 61 8 62 declare ( 8 63 db_mrds_dsl_eval_expr bit (9) unal defined (mrds_debug_$switch (1)), 8 64 db_mrds_dsl_get_token bit (9) unal defined (mrds_debug_$switch (2)), 8 65 db_mrds_dsl_permute bit (9) unal defined (mrds_debug_$switch (3)), 8 66 db_mrds_dsl_optimize bit (9) unal defined (mrds_debug_$switch (4)), 8 67 db_mrds_dsl_search bit (9) unal defined (mrds_debug_$switch (5)), 8 68 db_mrds_dsl_translate bit (9) unal defined (mrds_debug_$switch (6)), 8 69 db_mu_retrieve bit (9) unal defined (mrds_debug_$switch (7)), 8 70 db_mrds_dsl_open bit (9) unal defined (mrds_debug_$switch (8)), 8 71 db_mrds_dsl_close bit (9) unal defined (mrds_debug_$switch (9)), 8 72 db_mrds_dsl_init_res bit (9) unal defined (mrds_debug_$switch (10)), 8 73 db_mu_sec_init_res bit (9) unal defined (mrds_debug_$switch (11)), 8 74 db_mus_mod_ubtup bit (9) unal defined (mrds_debug_$switch (12)), 8 75 db_mu_sec_get_tuple bit (9) unal defined (mrds_debug_$switch (13)), 8 76 db_mu_sec_get_tid bit (9) unal defined (mrds_debug_$switch (14)), 8 77 db_mrds_dsl_set_fscope bit (9) unal defined (mrds_debug_$switch (15)), 8 78 db_mu_concurrency_control bit (9) unal defined (mrds_debug_$switch (16)), 8 79 db_mrds_rst_dmdm bit (9) unal defined (mrds_debug_$switch (17)), 8 80 db_mu_open_name_manager bit (9) unal defined (mrds_debug_$switch (18)), 8 81 db_mrds_dsl_where_clause bit (9) unal defined (mrds_debug_$switch (19)), 8 82 db_mu_open_iocb_manager bit (9) unal defined (mrds_debug_$switch (20)), 8 83 db_mrds_dsl_gen_srch_prog bit (9) unal defined (mrds_debug_$switch (21)) 8 84 ) ; 8 85 8 86 /* list of known module names, with index into name array 8 87* the same as that into mrds_debug_$switch, 8 88* number is the current count of defined module names, 8 89* name is the modules full name. */ 8 90 8 91 declare 1 module options (constant) internal static, 8 92 2 number fixed bin init (21), 8 93 2 name char (32) dimension (21) init ( 8 94 "mrds_dsl_eval_expr", /* 1 => display value of each expression */ 8 95 "mrds_dsl_get_token", /* 1 => display the current token */ 8 96 "mrds_dsl_permute", /* each 1 => lost cost path found, 8 97* 2 => reverse partial path 8 98* 3 => use range order for path 8 99* 4 => display access method costs 8 100* 5 => display details of final low cost path */ 8 101 "mrds_dsl_optimize", /* 1 => pred tree, 8 102* 2 => paths to consider, 3 => calc_cost on */ 8 103 "mrds_dsl_search", /* 1 => display each tuple located */ 8 104 "mrds_dsl_translate", /* 1 => display the search program */ 8 105 "mu_retrieve", /* 1 => display values compared, 2 => display tuple data */ 8 106 "mrds_dsl_open", /* 1 => allow cleanup sub_error_ */ 8 107 "mrds_dsl_close", /* 1 => allow cleanup sub_error_ */ 8 108 "mrds_dsl_init_res", /* 1 => allow cleanup sub_error_ */ 8 109 "mu_sec_init_res", /* 1 => allow cleanup sub_error_ */ 8 110 "mus_mod_ubtup", /* 1 => consistency checking between the old 8 111* and new tuple during modifies will be done */ 8 112 "mu_sec_get_tuple", /* 1 => attribute values 8 113* will be zeroed in the tuple structure 8 114* is don't have read permission. */ 8 115 "mu_sec_get_tid", /* 1 => read permission to the key 8 116* is checked (if db is secured) */ 8 117 "mrds_dsl_set_fscope", /* 1 => display being queued, 8 118* and request granted from queue messages */ 8 119 "mu_concurrency_control", /* 1 => allow both dbc and db.control segs under db 8 120* so can test both MR8 and MR9 mrds 8 121* against the same database at the same time */ 8 122 "mrds_rst_dmdm", /* 1 => allow internal form of bit offset value 8 123* for attributes to be displayed, rather than user view */ 8 124 "mu_open_name_manager", /* 1 => dump mrds_open_name tree node structure, 8 125* when display_open_names entry called */ 8 126 "mrds_dsl_where_clause", /* 1 => display details of cross domain compares */ 8 127 "mu_open_iocb_manager", /* 1 => display relation and slot getting iocb for */ 8 128 "mrds_dsl_gen_srch_prog" /* 1 => do additional conditions as sequential, not key searches 8 129* when the original access was a key, 8 130* and the additional conditions can be done as key also 8 131* 2 => force key searches, regardless of strategy 8 132* used to decide between compare or key search */ 8 133 ) ; 8 134 8 135 declare mrds_debug_$switch (1:400) bit (9) unal ext ; /* data segment debug array */ 8 136 8 137 /* END INCLUDE FILE mrds_debug_names.incl.pl1 */ 8 138 473 474 9 1 /* BEGIN INCLUDE FILE mrds_authorization.incl.pl1 - - 81-01-20 Jim Gray */ 9 2 9 3 /* HISTORY: 9 4* 9 5* 81-01-20 Jim Gray : original created for the mmi_$get_authorization interface 9 6* 9 7**/ 9 8 9 9 /* DESCRIPTION: 9 10* 9 11* this structure returns the callers user_class 9 12* either database administrator or normal user. 9 13* Note that these separate classes were used to allow 9 14* future expansion to the user classes, rather than 9 15* make them logical "not"'s of one another. 9 16* NOTE: a DBA is always also a normal user, thus if the caller 9 17* is a DBA, his normal_user bit will be on also. 9 18* 9 19**/ 9 20 9 21 9 22 declare 1 mrds_authorization aligned based (mrds_authorization_ptr), 9 23 2 version fixed bin, /* version number of this structure */ 9 24 2 administrator bit (1) unal, /* caller is a DBA */ 9 25 2 normal_user bit (1) unal, /* caller has no special priviledges */ 9 26 2 mbz bit (34) unal ; 9 27 9 28 9 29 declare mrds_authorization_ptr ptr ; /* pointer for referring to the structure */ 9 30 9 31 declare mrds_authorization_structure_version fixed bin init (1) int static options (constant) ; 9 32 9 33 /* END INCLUDE FILE mrds_authorization.incl.pl1 */ 475 476 end mu_sec_init_res; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/01/88 1300.0 mu_sec_init_res.pl1 >special_ldd>install>MR12.2-1073>mu_sec_init_res.pl1 459 1 08/01/88 1300.0 mrds_dbcb.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_dbcb.incl.pl1 461 2 10/17/86 1404.3 mdbm_db_model.incl.pl1 >ldd>include>mdbm_db_model.incl.pl1 463 3 08/01/88 1310.7 mdbm_rm_db_info.incl.pl1 >special_ldd>install>MR12.2-1073>mdbm_rm_db_info.incl.pl1 465 4 10/14/83 1609.1 mdbm_rm_rel_array.incl.pl1 >ldd>include>mdbm_rm_rel_array.incl.pl1 467 5 10/14/83 1608.7 mrds_dsm_entry_dcls.incl.pl1 >ldd>include>mrds_dsm_entry_dcls.incl.pl1 469 6 10/14/83 1609.0 mrds_dsm_relation_names.incl.pl1 >ldd>include>mrds_dsm_relation_names.incl.pl1 471 7 10/14/83 1608.7 mrds_dsm_rel_block.incl.pl1 >ldd>include>mrds_dsm_rel_block.incl.pl1 473 8 10/14/83 1609.0 mrds_debug_names.incl.pl1 >ldd>include>mrds_debug_names.incl.pl1 475 9 10/14/83 1608.8 mrds_authorization.incl.pl1 >ldd>include>mrds_authorization.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. BLANK constant char(1) initial packed unaligned dcl 435 ref 311 311 354 OFF constant bit(1) initial packed unaligned dcl 431 ref 167 265 266 ON constant bit(1) initial packed unaligned dcl 433 ref 173 addr builtin function dcl 421 ref 275 administrator 126(01) based bit(1) level 3 packed packed unaligned dcl 3-86 set ref 265* area_ptr 000126 automatic pointer dcl 441 set ref 166* 183* 192 230* 345* 389 391* 397* area_size 000206 automatic fixed bin(18,0) dcl 287 set ref 276* 278* caller_name 000113 automatic char(20) initial packed unaligned dcl 437 set ref 183* 185* 239* 349* 391* 392* 437* clean_up_condition 000110 automatic bit(1) packed unaligned dcl 413 set ref 167* 173* 400 cleanup 000102 stack reference condition dcl 412 ref 171 code 000112 automatic fixed bin(35,0) dcl 423 set ref 391* 392 392* continue 000120 automatic char(1) initial packed unaligned dcl 438 set ref 185* 239* 349* 392* 438* data based structure level 2 in structure "dbcb" dcl 1-142 in procedure "init_res" data based structure level 2 in structure "rm_db_info" dcl 3-86 in procedure "init_res" db_index 000100 automatic fixed bin(35,0) dcl 405 set ref 163* db_model based structure level 1 dcl 2-72 db_mu_sec_init_res defined bit(9) packed unaligned dcl 8-62 ref 174 db_path parameter char(168) packed unaligned dcl 416 in procedure "init_res" ref 24 24 258 db_path 2 based char(168) level 3 in structure "rm_db_info" dcl 3-86 in procedure "init_res" set ref 258* db_version based fixed bin(17,0) level 3 dcl 3-86 set ref 257* dbcb based structure level 1 dcl 1-142 dbcb_data based structure level 1 unaligned dcl 1-148 dbcb_ptr 000152 automatic pointer dcl 1-146 set ref 161* 163 164 dbi 114 based fixed bin(35,0) level 3 dcl 1-142 ref 163 dbm_ptr 000154 automatic pointer dcl 2-106 set ref 160* 224 257 264 337 337 339 dm_rel_name 22 based char(32) level 2 packed packed unaligned dcl 7-26 ref 357 domain_list_ptr 132 based pointer level 3 dcl 3-86 set ref 267* dsm_path parameter char(168) packed unaligned dcl 417 set ref 24 24 239* 259 dsm_rel_name 1 based varying char(64) level 2 dcl 7-26 ref 358 dsm_sw 106(08) based bit(1) level 3 in structure "dbcb" packed packed unaligned dcl 1-142 in procedure "init_res" ref 164 dsm_sw 000101 automatic bit(1) packed unaligned dcl 408 in procedure "init_res" set ref 164* 182 224 260 335 empty builtin function dcl 421 ref 192 error_code parameter fixed bin(35,0) dcl 415 set ref 24 24 165* 183* 185 185* 230* 235 239* 255 278* 333 345* 348 349* 400 even_word_pad 140 based fixed bin(71,0) level 3 dcl 3-86 set ref 271* fi_ptr 000156 automatic pointer dcl 2-119 set ref 337* 339* 339 341 file_info based structure level 1 dcl 2-113 file_name based char(30) level 2 dcl 2-113 ref 341 file_ptr 22 based bit(18) level 2 packed packed unaligned dcl 2-72 ref 337 fixed builtin function dcl 421 ref 276 fwd_ptr 11 based bit(18) level 2 packed packed unaligned dcl 2-113 ref 339 get_temp_segment_ 000012 constant entry external dcl 424 ref 183 i 000111 automatic fixed bin(17,0) dcl 418 set ref 310* 333* 337 345 349* 373 374 375 376 info_ptr 000122 automatic pointer initial dcl 439 set ref 185* 239* 349* 392* 439* insecure_db_ptr parameter pointer dcl 406 ref 24 24 160 insecure_dbcb_ptr parameter pointer dcl 407 ref 24 24 161 insecure_rdbi_ptr parameter pointer dcl 414 ref 24 24 162 mark 1 based char(1) array level 3 packed packed unaligned dcl 4-34 set ref 374* mdbm_secured 126 based bit(1) level 3 in structure "rm_db_info" packed packed unaligned dcl 3-86 in procedure "init_res" set ref 264* mdbm_secured 11(01) based bit(1) level 2 in structure "db_model" packed packed unaligned dcl 2-72 in procedure "init_res" ref 264 model_name based char(30) array level 3 in structure "rm_rel_array" dcl 4-34 in procedure "init_res" set ref 375* model_name 000131 automatic char(32) packed unaligned dcl 444 in procedure "init_res" set ref 341* 354* 357* 362* mrds_data_$max_temp_rels 000022 external static fixed bin(35,0) dcl 453 ref 303 mrds_data_$saved_res_version 000026 external static char(8) packed unaligned dcl 457 ref 270 mrds_debug_$switch 000034 external static bit(9) array packed unaligned dcl 8-135 ref 174 174 mrds_dsm_get_relation_names 000032 constant entry external dcl 5-15 ref 230 mrds_dsm_read_relation 000030 constant entry external dcl 5-14 ref 345 mrds_dsm_relation_names based structure level 1 unaligned dcl 6-17 mrds_dsm_relation_names_ptr 000166 automatic pointer dcl 6-23 set ref 230* 235 345 349 mu_define_area 000020 constant entry external dcl 447 ref 278 name 1 based structure array level 2 packed packed unaligned dcl 4-34 name_in_model parameter char(32) packed unaligned dcl 378 ref 368 375 name_in_submodel parameter char(32) packed unaligned dcl 379 ref 368 373 nrels based fixed bin(17,0) level 2 dcl 6-17 ref 235 null builtin function dcl 421 ref 166 267 268 269 376 389 397 400 439 num_rels based fixed bin(17,0) level 2 in structure "rm_rel_array" dcl 4-34 in procedure "init_res" set ref 305* 327* 331* 375 376 num_rels 14 based fixed bin(17,0) level 2 in structure "db_model" packed packed unaligned dcl 2-72 in procedure "init_res" ref 224 number_of_relations 000130 automatic fixed bin(17,0) dcl 443 set ref 224* 235* 243* 325 pad 126(02) based bit(34) level 3 packed packed unaligned dcl 3-86 set ref 266* parameter_area based area dcl 428 set ref 192* pointer builtin function dcl 421 ref 337 339 ra_ptr 134 based pointer level 3 dcl 3-86 set ref 268* 329* rdbi_area_ptr 000210 automatic pointer dcl 288 set ref 275* 276 278* rdbi_ptr 000160 automatic pointer dcl 3-90 set ref 162* 257 258 259 260 262 263 264 265 266 267 268 269 270 271 275 305 307 327 329 400* rel builtin function dcl 421 ref 276 rel_data based structure array level 2 dcl 4-34 relation 1 based char(32) array level 2 packed packed unaligned dcl 6-17 set ref 345 349* relation_block based structure level 1 unaligned dcl 7-26 relation_block_ptr 000170 automatic pointer dcl 7-22 set ref 345* 357 358 release_temp_segment_ 000014 constant entry external dcl 426 ref 391 return_value 000124 automatic fixed bin(35,0) initial dcl 440 set ref 185* 239* 349* 392* 440* ri_ptr based pointer array level 3 packed packed unaligned dcl 4-34 set ref 376* rm_db_info based structure level 1 dcl 3-86 rm_db_info_data based structure level 1 unaligned dcl 3-92 rm_num_rels_init 000164 automatic fixed bin(17,0) dcl 4-44 set ref 303* 305 305 305 310 325* 327 327 327 331 333 rm_rel_array based structure level 1 dcl 4-34 set ref 305 327 rmra_ptr 000162 automatic pointer dcl 4-43 set ref 305* 307 327* 329 331 373 374 375 376 rtrim builtin function dcl 421 ref 375 saved_res_version 127 based char(8) level 3 dcl 3-86 set ref 270* sm_path 54 based char(168) level 3 dcl 3-86 set ref 259* sm_version 1 based fixed bin(17,0) level 3 packed packed unaligned dcl 3-86 set ref 260* 262* static_area 142 based area level 2 dcl 3-86 set ref 275 305 327 sub_err_ 000016 constant entry external dcl 442 ref 185 239 349 392 sub_error_ 000000 stack reference condition dcl 446 ref 174 submodel 1(09) based char(32) array level 3 packed packed unaligned dcl 4-34 set ref 373* submodel_iocb_ptr 000010 external static pointer initial dcl 409 set ref 230* 345* submodel_name 000141 automatic char(32) packed unaligned dcl 445 set ref 341* 354* 358* 362* submodel_version parameter fixed bin(17,0) dcl 451 ref 24 24 260 substr builtin function dcl 421 ref 174 sys_info$max_seg_size 000024 external static fixed bin(35,0) dcl 453 ref 192 276 tra_ptr 136 based pointer level 3 dcl 3-86 set ref 269* 307* val_level 1(18) based fixed bin(17,0) level 3 packed packed unaligned dcl 3-86 set ref 263* version based fixed bin(17,0) level 2 packed packed unaligned dcl 2-72 ref 257 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RELATION_BLOCK_VERSION_1 internal static fixed bin(35,0) initial dcl 7-24 alloc_length internal static fixed bin(35,0) dcl 2-222 changer based structure level 1 packed packed unaligned dcl 2-251 changer_ptr automatic pointer dcl 2-256 constant based structure level 1 unaligned dcl 2-216 constant_ptr automatic pointer dcl 2-220 db_mrds_dsl_close defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_eval_expr defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_gen_srch_prog defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_get_token defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_init_res defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_open defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_optimize defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_permute defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_search defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_set_fscope defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_translate defined bit(9) packed unaligned dcl 8-62 db_mrds_dsl_where_clause defined bit(9) packed unaligned dcl 8-62 db_mrds_rst_dmdm defined bit(9) packed unaligned dcl 8-62 db_mu_concurrency_control defined bit(9) packed unaligned dcl 8-62 db_mu_open_iocb_manager defined bit(9) packed unaligned dcl 8-62 db_mu_open_name_manager defined bit(9) packed unaligned dcl 8-62 db_mu_retrieve defined bit(9) packed unaligned dcl 8-62 db_mu_sec_get_tid defined bit(9) packed unaligned dcl 8-62 db_mu_sec_get_tuple defined bit(9) packed unaligned dcl 8-62 db_mus_mod_ubtup defined bit(9) packed unaligned dcl 8-62 di_ptr automatic pointer dcl 2-155 domain_info based structure level 1 dcl 2-125 message_str based structure level 1 packed packed unaligned dcl 2-259 message_str_len automatic fixed bin(17,0) dcl 2-269 message_str_ptr automatic pointer dcl 2-267 module internal static structure level 1 unaligned dcl 8-91 mrds_authorization based structure level 1 dcl 9-22 mrds_authorization_ptr automatic pointer dcl 9-29 mrds_authorization_structure_version internal static fixed bin(17,0) initial dcl 9-31 mrds_dsm_close 000000 constant entry external dcl 5-6 mrds_dsm_close$force 000000 constant entry external dcl 5-7 mrds_dsm_copy 000000 constant entry external dcl 5-8 mrds_dsm_define_temp 000000 constant entry external dcl 5-10 mrds_dsm_dmdsm 000000 constant entry external dcl 5-19 mrds_dsm_open_read 000000 constant entry external dcl 5-12 mrds_dsm_read_header 000000 constant entry external dcl 5-13 mrds_dsm_relation_names_nrels_alloc automatic fixed bin(17,0) dcl 6-21 mrds_dsm_set_db_path 000000 constant entry external dcl 5-9 mrds_dsm_valid_$validate 000000 constant entry external dcl 5-20 mrds_dsm_validate_header 000000 constant entry external dcl 5-17 path_entry based structure level 1 packed packed unaligned dcl 2-172 path_entry_ptr automatic pointer dcl 2-177 rb_number_of_attributes automatic fixed bin(35,0) dcl 7-23 stack_item based structure level 1 unaligned dcl 2-206 stack_item_ptr automatic pointer dcl 2-212 ua_ptr automatic pointer dcl 2-165 unreferenced_attribute based structure level 1 dcl 2-159 version_status based structure level 1 packed packed unaligned dcl 2-232 version_status_ptr automatic pointer dcl 2-246 NAMES DECLARED BY EXPLICIT CONTEXT. clean_up 001240 constant entry internal dcl 383 ref 176 214 fill_rel_array_entry 001163 constant entry internal dcl 368 ref 311 362 get_number_of_relations 000411 constant entry internal dcl 218 ref 198 init_rel_array 000716 constant entry internal dcl 319 ref 210 init_res 000163 constant entry external dcl 24 init_rm_db_info 000520 constant entry internal dcl 250 ref 202 init_temp_rel_array 000645 constant entry internal dcl 293 ref 206 mu_sec_init_res 000174 constant entry external dcl 24 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1614 1652 1373 1624 Length 2262 1373 36 374 220 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME init_res 404 external procedure is an external procedure. on unit on line 171 70 on unit enables or reverts conditions. on unit on line 174 64 on unit get_number_of_relations internal procedure shares stack frame of external procedure init_res. init_rm_db_info internal procedure shares stack frame of external procedure init_res. init_temp_rel_array internal procedure shares stack frame of external procedure init_res. init_rel_array internal procedure shares stack frame of external procedure init_res. fill_rel_array_entry internal procedure shares stack frame of external procedure init_res. clean_up 128 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME init_res 000100 db_index init_res 000101 dsm_sw init_res 000110 clean_up_condition init_res 000111 i init_res 000112 code init_res 000113 caller_name init_res 000120 continue init_res 000122 info_ptr init_res 000124 return_value init_res 000126 area_ptr init_res 000130 number_of_relations init_res 000131 model_name init_res 000141 submodel_name init_res 000152 dbcb_ptr init_res 000154 dbm_ptr init_res 000156 fi_ptr init_res 000160 rdbi_ptr init_res 000162 rmra_ptr init_res 000164 rm_num_rels_init init_res 000166 mrds_dsm_relation_names_ptr init_res 000170 relation_block_ptr init_res 000206 area_size init_rm_db_info 000210 rdbi_area_ptr init_rm_db_info THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return_mac enable_op ext_entry int_entry op_alloc_ op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_temp_segment_ mrds_dsm_get_relation_names mrds_dsm_read_relation mu_define_area release_temp_segment_ sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_data_$max_temp_rels mrds_data_$saved_res_version mrds_debug_$switch submodel_iocb_ptr sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 437 000143 438 000146 439 000150 440 000152 24 000155 160 000202 161 000206 162 000211 163 000214 164 000216 165 000222 166 000223 167 000225 171 000226 173 000242 174 000245 176 000266 177 000273 182 000274 183 000276 185 000320 192 000370 198 000400 202 000401 206 000402 210 000403 214 000404 216 000410 218 000411 224 000412 230 000421 235 000437 239 000445 243 000516 248 000517 250 000520 255 000521 257 000524 258 000527 259 000534 260 000540 262 000546 263 000550 264 000552 265 000560 266 000562 267 000564 268 000566 269 000567 270 000570 271 000576 275 000600 276 000602 278 000607 291 000644 293 000645 303 000646 305 000653 307 000673 310 000675 311 000703 312 000713 317 000715 319 000716 325 000717 327 000721 329 000741 333 000743 335 000754 337 000756 339 000770 341 000776 342 001007 345 001010 348 001046 349 001051 354 001135 355 001145 357 001146 358 001152 362 001156 363 001160 366 001162 368 001163 373 001165 374 001174 375 001177 376 001230 381 001236 383 001237 389 001245 391 001252 392 001272 397 001342 400 001345 403 001354 ----------------------------------------------------------- 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