COMPILATION LISTING OF SEGMENT display_mrds_scope_settings Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 08/01/88 1332.0 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* 19* BEGIN_DESCRIPTION 20* This command will display, for all open MRDS databases 21* in the users process, the current scope (concurrncy control mode) 22* settings for all relations in the users view of the 23* databse for that opening. 24* 25* It also gives the details of the type of opening, submodel or model, 26* the paths of the submodel and model, and the versions 27* of the submodel and model. 28* 29* The concurrency control version is displayed. 30* 1 => r-s-m-d scope mdoes. 31* 2-3 => never released 32* 4 => r-u scope modes. 33* 5 => r-a-m-d scope modes. 34* 35* Old version databases can not display whether 36* the opening was via a submodel or not. 37* END_DESCRIPTION 38**/ 39 40 /* HISTORY: 41* 42* Originally written by Jim Gray - - January 1981 43* 44* 83-02-15 Davids: explicitly declared variables that were 45* declared by context or implication and deleted declarations 46* to variables that were not referenced. 47* 48* 83-06-21 Davids: Removed check for old version database and the call 49* to v1 code if it was an old version db (old version dbs can no longer 50* be opened) 51**/ 52 53 display_mrds_scope_settings: dmss: procedure (); 54 55 /* PARAMETERS: 56* 57* (input) none 58* 59* (output) display by opening index, and by relation, 60* the currenct scope settings in the users process, 61* plus info on the type/version of the opening. 62* 63**/ 64 65 /* initialize */ 66 67 number_of_openings = mu_database_index$get_number_open_dbs (); 68 number_found = 0; 69 70 if number_of_openings = 0 then 71 call ioa_ ("^/No databases are currently open.^/"); 72 else do; 73 74 /* display the process information for the caller */ 75 76 call ioa_ ("^/Scope settings for process: ^a^/^12xprocess number: ^o", 77 get_group_id_ (), get_process_id_ ()); 78 79 /* find all current valid database indexs */ 80 81 do db_index = 1 by 1 to mrds_data_$max_dbs while (number_found < number_of_openings); 82 83 call mu_database_index$get_resultant_model_pointer (db_index, dbcb_ptr); 84 if dbcb_ptr = null () then ; /* does not refer to an open database */ 85 else do; 86 87 /* good opening index found, display details */ 88 89 number_found = number_found + 1; 90 91 rdbi_ptr = dbcb.rdbi_ptr; 92 dbc_ptr = dbcb.dbc_ptr; 93 94 call display_opening_info (); 95 96 call display_new_scope (); 97 98 end; 99 100 end; 101 102 /* finish up */ 103 104 call ioa_ ("^/"); 105 106 107 end; 108 109 display_opening_info: procedure (); 110 111 /* routine to display the path(s) of the open data/sub model, 112* the opening mode and index, and their versions */ 113 114 /* get opening mode */ 115 116 if fixed (dbcb.open_mode) = 0 then 117 open_mode_display = "Unknown open mode"; 118 else if fixed (dbcb.open_mode) = 1 then 119 open_mode_display = "retrieval"; 120 else if fixed (dbcb.open_mode) = 2 then 121 open_mode_display = "update"; 122 else if fixed (dbcb.open_mode) = 3 then 123 open_mode_display = "exclusive_retrieval"; 124 else if fixed (dbcb.open_mode) = 4 then 125 open_mode_display = "exclusive_update"; 126 else open_mode_display = "Illegal open mode"; 127 128 call ioa_ ("^/Opening index: ^d^/^9xmode: ^a^/", db_index, open_mode_display); 129 130 /* output db path and version info */ 131 132 call ioa_ ("^-Concurrency control version: ^d^/^-^8xdatabase model path: ^a^/^-^10x database version: ^d", 133 dbc.version, rm_db_info.db_path, rm_db_info.db_version); 134 135 /* display submodel info, if submodel opening */ 136 137 if dbcb.dsm_sw then do; 138 call ioa_ ("^/^-^8xOpened via submodel: ^a^/^-^11xsubmodel version: ^d", 139 rm_db_info.sm_path, rm_db_info.sm_version); 140 end; 141 142 end; 143 144 display_new_scope: procedure (); 145 146 /* routine to display r-a-m-d type scope from new version databases */ 147 148 scope_ptr = dbcb.scope_ptr; 149 if scope_ptr = null () then 150 call com_err_ (mrds_error_$non_scope_ready, caller_name, 151 "^/Unable to get scope info for opening index ^d^/", db_index); 152 else do; 153 154 if scope_info.active_scopes = 0 then 155 call ioa_ ("^/^-No scope currently set for this opening.^/"); 156 else do; 157 158 call ioa_ ("^/^-Relation^26xPermits^3xPrevents^/"); 159 160 do i = 1 to scope_info.nfiles; 161 162 if scope_info.scope (i).flags.touched then do; 163 164 prevent_string, permit_string = ""; 165 166 if scope_info.scope (i).flags.permits.read_attr then 167 permit_string = permit_string || "r"; 168 169 if scope_info.scope (i).flags.permits.append_tuple then 170 permit_string = permit_string || "a"; 171 172 if scope_info.scope (i).flags.permits.modify_attr then 173 permit_string = permit_string || "m"; 174 175 if scope_info.scope (i).flags.permits.delete_tuple then 176 permit_string = permit_string || "d"; 177 178 if permit_string = "" then 179 permit_string = "n"; 180 181 if scope_info.scope (i).flags.prevents.read_attr then 182 prevent_string = prevent_string || "r"; 183 184 if scope_info.scope (i).flags.prevents.append_tuple then 185 prevent_string = prevent_string || "a"; 186 187 if scope_info.scope (i).flags.prevents.modify_attr then 188 prevent_string = prevent_string || "m"; 189 190 if scope_info.scope (i).flags.prevents.delete_tuple then 191 prevent_string = prevent_string || "d"; 192 193 if prevent_string = "" then 194 prevent_string = "n"; 195 196 call ioa_ ("^-^32a^4x^4a^6x^4a", 197 scope_info.scope (i).sm_name, permit_string, prevent_string); 198 end; 199 200 end; 201 202 end; 1 1 /* BEGIN mdbm_scope_info.incl.pl1 -- odf 8/8/78 */ 1 2 1 3 /* WARNING 1 4* If the scope_info or scope_flags structure is changed then the 1 5* mrds_data_ item saved_res_version MUST be incremented to invalidate 1 6* all existing saved resultants 1 7**/ 1 8 1 9 /* Modified by Jim Gray - - 80-11-17, to add back store/delete/modify permissions */ 1 10 1 11 /* 80-12-10 Jim Gray : change name of store to append_tuple, delete to delete_tuple, 1 12* modify to modify_attr, retrieve to read_attr, remvoe update, put level 4 1 13* qualifiers for permit/prevent modes and to put pads in standard format */ 1 14 1 15 /* 80-12-11 Jim Gray : added submodel version of file/rel name for convenience */ 1 16 1 17 /* 80-12-22 Jim Gray : added like referenced structure so linus_scope_data.incl 1 18* could make use of it for compatibility. */ 1 19 1 20 /* 81-1-11 Jim Gray : added touched bit to scope_flags, so that 1 21* the fact that null scope has been set can be displayed */ 1 22 1 23 /* 85-04-14 Thanh Nguyen: Made scope_flags to be aligned so we could access the 1 24* prevent flags from any pointer which directly pointed to scope_flags itself 1 25* (i.e rm_rel_info.scope_flags_ptr). */ 1 26 1 27 /* this structure is to be allocated in the mrds_dbcb.incl.pl1 static area, 1 28* and is used to maintain the scope mechanism for file access. 1 29* It contains the scope permit/prevent operations that this user 1 30* has set in his view for this opening instance. */ 1 31 1 32 dcl 1 scope_info aligned based (scope_ptr), /* array of scope tuples for this user */ 1 33 2 mbz1 bit (144), /* Reserved for future use */ 1 34 2 nfiles fixed bin, /* Number of scope tuples in user's scope */ 1 35 2 active_scopes fixed bin, /* number of scopes currently active for a given user */ 1 36 2 scope (max_file_init refer (scope_info.nfiles)), /* defines user's scope of access to files */ 1 37 3 name char (30) aligned, /* filename */ 1 38 3 sm_name char (32), /* name of file(rel) in submodel */ 1 39 3 flags like scope_flags ; 1 40 1 41 1 42 declare 1 scope_flags aligned based, /* common layout of scope flag bits */ 1 43 2 permits, /* modes to permit this user */ 1 44 3 read_attr bit (1) unal, /* read_attr access to this file in scope */ 1 45 3 append_tuple bit (1) unal, /* append_tuple concnrrency permission */ 1 46 3 delete_tuple bit (1) unal, /* delete_tuple concurrency permission on rel */ 1 47 3 modify_attr bit (1) unal, /* modify_attr concurrency permission */ 1 48 3 mbz2 bit (10) unal, /* for expansion of permit ops */ 1 49 2 prevents, /* modes to be denyed to other users */ 1 50 3 read_attr bit (1) unal, /* on if user has prevent on read_attr for this file */ 1 51 3 append_tuple bit (1) unal, /* prevent of append_tuple concurrency */ 1 52 3 delete_tuple bit (1) unal, /* prevent of delete_tuple concurrency */ 1 53 3 modify_attr bit (1) unal, /* prevent of modify_attr concurrency */ 1 54 3 mbz3 bit (10) unal, /* for future prevent concurrency modes */ 1 55 2 touched bit (1) unal, /* on => scope set for this relation */ 1 56 2 mbz4 bit (7) unal ; /* for future flags */ 1 57 1 58 dcl max_file_init fixed bin; /* nbr. of files in data base */ 1 59 dcl scope_ptr ptr init (null ()); /* points to scope_info array */ 1 60 dcl scope_rdy bit (6) unal init ("000011"b) int static options (constant); /* scope file ready modes (5 or 6) */ 1 61 dcl scope_rdy_array (6) bit (1) unal based; /* array format of scope_rdy string */ 1 62 1 63 /* END mdbm_scope_info.incl.pl1 */ 203 204 205 end; 206 207 end; 208 209 declare db_index fixed bin (35); /* database opening index */ 210 declare open_mode_display char (24) varying; /* output form of opening mode */ 211 declare mrds_data_$max_dbs fixed bin (35) ext;/* maximum number of open databases */ 212 declare number_of_openings fixed bin; /* current number of open dbs */ 213 declare number_found fixed bin; /* number already displayed */ 214 declare mu_database_index$get_resultant_model_pointer entry (fixed bin (35), ptr); /* gets ptr from index */ 215 declare mu_database_index$get_number_open_dbs entry returns (fixed bin); /* get count of dbs currently open */ 216 declare ioa_ entry options (variable); /* does output reporting */ 217 declare mrds_error_$non_scope_ready fixed bin (35) ext; /* rel not readied for scope concurrency */ 218 declare com_err_ entry options (variable); /* reports errors */ 219 declare caller_name char (32) init ("display_mrds_scope_settings"); /* name of calling routine */ 220 declare (permit_string, prevent_string) char (4) varying; /* for displaying scope settings */ 221 declare work_area area (4096); /* space for scope info */ 222 declare i fixed bin; /* loop index into array */ 223 declare get_group_id_ entry returns (char (32)); /* gets person.project.tag */ 224 declare get_process_id_ entry returns (bit (36)); /* gets identifier of process */ 225 declare sys_info$max_seg_size fixed bin (35) ext;/* largest segment */ 226 declare (fixed, addr, rel, 227 empty, null) builtin; 228 2 1 /* BEGIN mrds_dbcb.incl.pl1 -- jaw, 11/7/78 */ 2 2 2 3 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), 2 7* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 2 8* This entry is being made to cover the change made on 85-07-01 by Thanh 2 9* Nguyen. The scopes_changed flag was added to make checking for this 2 10* more efficient (mrds error list #137). 2 11* 2) change(86-06-10,Blair), approve(86-08-07,MCR7491), 2 12* audit(86-08-07,Gilcrease), install(86-08-15,MR12.0-1127): 2 13* Add a bit called dont_check_txn_id to indicate whether or not we should 2 14* care if multiple txns use the same selection_expression. (mrds #156) 2 15* 3) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 2 16* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 2 17* Added parser_work_area_ptr and mrds_se_info_ptr for new parser. 2 18* END HISTORY COMMENTS */ 2 19 2 20 2 21 /* WARNING 2 22* If the dbcb structure is changed then the mrds_data_ 2 23* item saved_res_version MUST be incremented to invalidate all 2 24* existing saved resultants 2 25**/ 2 26 2 27 /* HISTORY : 2 28* 2 29* modified by Jim Gray - - 80-10-24, to add new_select_expr bit for 2 30* tid_list management 2 31* 2 32* 81-1-9 Jim Gray : added like reference for ease in making the 2 33* phony resultant in mu_database_index, without having the area dcl 2 34* included. 2 35* 2 36* 81-06-17 Roger Lackey : added last_store_rel_name for use by 2 37* mrds_dsl_store 2 38* 2 39* 81-06-26 Roger Lackey : Added no_optimize and print_search_order 2 40* switches 2 41* 2 42* 81-07-06 Jim Gray : added identifier for the current selection 2 43* expression, so that relation statistics can be updated relative 2 44* to number of selection expressions seem. Also removed init for 2 45* last_store_rel_name, as this iw now properly done in 2 46* mrds_dsl_init_res. 2 47* 2 48* 81-07-17 Roger Lackey : added pred_ptr and unused_ptrs. 2 49* 2 50* 82-08-19 Mike Kubicar : added store_vector field. This is needed 2 51* for the conversion to the relation manager. 2 52* 2 53* 82-08-23 Davids: added the relmgr_entries and access_costs 2 54* substructures so that the entries and costs can change 2 55* depending on the type of database that is opened. 2 56* 2 57* 82-09-09 Mike Kubicar : added modify_vector field. This is needed 2 58* since modify uses a different vector type (general) than does store. 2 59* 2 60* 82-09-20 Davids: changed names of (store modify)_vector to 2 61* (store modify)_vector_ptr. Also (delete modify)_tuple_by_id to 2 62* (delete modify)_tuples_by_id. added the element cursor_storage_ptr 2 63* which should be inited to null and will be set by mu_cursor_manager_$get 2 64* during the first call. 2 65* 2 66* 82-09-21 Davids: renamed cursor_storage_ptr to cursor_ptrs_storage_ptr 2 67* since it deals with the pointers to the cursors and not the cursors 2 68* themelves and added the element cursor_storage_area_ptr which points 2 69* to the area where the cursors are kept. 2 70* 2 71* 82-09-22 Davids: renamed the transact_ctl_seg to transactions_needed. 2 72* the transact_ctl_seg always had a value of 0 and really didn't mean 2 73* anything. 2 74* 2 75* 82-09-22 Mike Kubicar : added create_relation, create_index and 2 76* destroy_relation_by_opening to relmgr_entries. They are needed 2 77* by mrds_dsl_define_temp_rel. 2 78* 2 79* 82-09-24 Donna Woodka : added put_tuple to relmgr_entries. It 2 80* is needed by mu_store. 2 81* 2 82* 82-11-12 Davids: changed the declaration of the access_costs from fixed 2 83* bin to float bin since the values are not integers. 2 84* 2 85* 83-02-02 Davids: added the dbc_uid element. This will allow mrds to make 2 86* sure that the dbc_ptr still points to the correct segment. Element was 2 87* added to the end of the structure to allow modules that don't use 2 88* the element to continue to reference the dbcb structure without recompiling. 2 89* 2 90* 83-02-25 Davids: added the concurrency_on and rollback_on elements. These 2 91* are needed so that temp rels can be created with the same file attributes 2 92* as the permanent relations. 2 93* 2 94* 83-05-02 Mike Kubicar : Deleted get_next_search_specification_ptr and 2 95* added the resultant_in_pdir bit. 2 96* 2 97* 83-05-18 Davids: reduced the number of reserved bits to 14 (from 15) and 2 98* added the res_already_made element. 2 99* 2 100* 83-05-24 Mike Kubicar : Updated the relation manager calling sequences. 2 101* 2 102* 83-08-03 Mike Kubicar : Added the element_id_list_segment_ptr and removed 2 103* one of the unused pointers. 2 104* 2 105* 83-09-20 Ron Harvey: Added relmgr_entries.get_population. 2 106* 2 107* 84-08-27 John Hergert: Created compiled_se_info_ptr from unused_ptrs(2) 2 108* leaving unused_ptrs(1). 2 109* 2 110* 85-01-15 Thanh Nguyen: Added the work_area_ptr and removed the last 2 111* unused_ptrs (1). 2 112* 2 113* 85-04-12 Thanh Nguyen: Added user_started_transaction and 2 114* non_shared_to_shared flags. Also added se_transaction_id and some more 2 115* spare ptrs, entries and reserved storages for future enhancement, since 2 116* we changed the saved_res_version from rslt0001 to rslt0002. 2 117* 2 118* 85-07-01 Thanh Nguyen: Added scopes_changed flag. This flag is set by 2 119* common routine of mrds_dsl_set_scope, reset by mrds_dsl_optimize and 2 120* mrds_dsl_gen_srch_prog when building of a new search_vars. 2 121**/ 2 122 2 123 2 124 /* this structure is based on the {unique_name}.mrds.dbcb segment 2 125* that constitutes the non-secure portion of the resultant model that is 2 126* created during the opening of a database. it contains variables that 2 127* are used during the runtime access of the database, and an area 2 128* for evaluation of requests. it points to four other 2 129* segments in the resultant model, {unique_name}.mrds.rdbi, the secure 2 130* portion of the resultant(see mdbm_rm_db_info.incl.pl1), 2 131* {unique_name}.mrds.select, an area for selection expression evaluation, 2 132* {unique_name}.mrds.curdat, and {unique_name}.mrds.stadat, two segments 2 133* used in the elimination of duplicate tuples during a retrieve. 2 134* the dbcb area holds the structure in mdbm_scope_info.incl.pl1 2 135* that is used when the database is using the file scope mechanism 2 136* for concurrency control over file readying. the segment overlayed via 2 137* mrds_dbc.incl.pl1 structure is pointed to and also handles concurrency control, 2 138* across database openings. the pointer to this dbcb structure is kept in a table 2 139* which associates database indexes(returned from a call to dsl_$open), with particular 2 140* opening instances of resultant models. (see mu_database_index routine) */ 2 141 2 142 dcl 1 dbcb aligned based (dbcb_ptr), /* DBCB -- non-secure portion */ 2 143 2 data like dbcb_data, 2 144 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (dbcb.static_area)))); 2 145 2 146 dcl dbcb_ptr ptr; 2 147 2 148 declare 1 dbcb_data based, /* info part of dbcb, separated out so that 2 149* like references can avoid getting the area declaration */ 2 150 2 rdbi_ptr ptr, /* pointer to write protected mdbm_util_ info. */ 2 151 2 range_ptr ptr, /* ptr to range structure, or null */ 2 152 2 select_ptr ptr, /* ptr to select list, or null */ 2 153 2 sv_ptr ptr, /* pointer to search variables */ 2 154 2 so_ptr ptr, /* pointer to search operators */ 2 155 2 ti_ptr ptr, /* pointer to tuple info */ 2 156 2 lit_ptr ptr, /* pointer to the literal area, or null */ 2 157 2 current_ptr ptr, /* ptr to select list resulting from -current clause */ 2 158 2 ss_ptr ptr, /* ptr to select sets block if not simple s.e. */ 2 159 2 retr_info_ptr ptr, /* ptr to retrieve info area */ 2 160 2 trel_info_ptr ptr, /* ptr to retrieve info area */ 2 161 2 sti_ptr ptr, /* pointer to store info */ 2 162 2 dbc_ptr ptr, /* pointer to the data base control segment */ 2 163 2 sfi_ptr ptr, /* points to head of scalar function list */ 2 164 2 scope_ptr ptr, /* points to array of scope tuples */ 2 165 2 select_area_ptr ptr, /* ptr to area for current selection expression allocations */ 2 166 2 current_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 2 167* for eliminating duplicate tuples. */ 2 168 2 static_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 2 169* for eliminating duplicate tuples. */ 2 170 2 store_area_ptr ptr, /* temp storage area for dsl_$store */ 2 171 2 retrieve_area_ptr ptr, /* temp storage for dsl_$retrieve */ 2 172 2 modify_area_ptr ptr, /* temp storage area for dsl_$modify */ 2 173 2 delete_area_ptr ptr, /* temp storage area for dsl_$delete */ 2 174 2 def_temp_rel_area_ptr ptr, /* temp storage area for dsl_$define_temp_rel */ 2 175 2 pred_ptr ptr, /* Pointer to pred_array */ 2 176 2 store_vector_ptr ptr, /* Vector structure used during store operations */ 2 177 2 modify_vector_ptr ptr, /* Used during modifies */ 2 178 2 element_id_list_segment_ptr ptr, /* Points to the segment used to hold element_id_list structures */ 2 179 2 compiled_se_info_ptr ptr, /* points to the segment containing all info on compiled sexs */ 2 180 2 work_area_ptr ptr, /* Work area for encode/decode value allocations in mu_retrieve */ 2 181 2 se_info_ptr ptr, /* Points to se_info struct. Primarily for error reports */ 2 182 2 parser_work_area_ptr ptr, /* work area for parser */ 2 183 2 reserved_ptrs (4) ptr, /* Reserved for future use */ 2 184 2 another_flag bit (1) unal, /* on if predicate was -another */ 2 185 2 current_flag bit (1) unal, /* on if predicate was -current clause */ 2 186 2 dbc_incr bit (1) unal, /* on if dbc open mode has been incremented for this user */ 2 187 2 delete_flag bit (1) unal, /* On if search was called from mrds_dsl_sec_delete */ 2 188 2 dup_retain bit (1) unaligned, /* On if dup tuples allowed for retrieval */ 2 189 2 prev_select bit (1) unal, /* on if prev. select block processed in this s.e. */ 2 190 2 possible_op bit (1) unal, /* on of arith op. allowed */ 2 191 2 sel_clause bit (1) unal, /* on if currently in select clause */ 2 192 2 dsm_sw bit (1) unal, /* on if data base was opened via data submodel */ 2 193 2 val_rtrv bit (1) unal, /* if s.e. valid for retrieve */ 2 194 2 val_mod bit (1) unal, /* for modify */ 2 195 2 val_del bit (1) unal, /* for delete */ 2 196 2 val_dtr bit (1) unal, /* for define temp rel */ 2 197 2 transactions_needed bit (1) unal, /* On => transaction must be started or in progress does 2 198* not imply that the database is of type page_file */ 2 199 2 open_mode bit (3) unal, /* 0=>unknown, 1=>r, 2=>u, 3=>er, 4=>eu, >4=>bad */ 2 200 2 new_select_expr bit (1) unal, /* on => starting a new tid list management period */ 2 201 2 no_optimize bit (1) unal, /* On => no optimize */ 2 202 2 print_search_order bit (1) unal, /* On => print the search order */ 2 203 2 resultant_in_pdir bit (1) unal, /* On => Temp segments are in the process dir */ 2 204 2 res_already_made bit (1) unal, /* On => resultant has been made based on a saved copy */ 2 205 2 user_started_transaction bit (1) unal, /* On => user already started his own transaction. */ 2 206 2 non_shared_to_shared bit (1) unal, /* On => user changed the scope from non shared to shared 2 207* inside a sequence of -another selection expression. */ 2 208 2 scopes_changed bit (1) unal, /* On => scopes had been changed by set_scopes or delete_scopes */ 2 209 2 dont_check_txn_id bit (1) unal, /* On => cpmd needs same selection exp across multiple txns */ 2 210 2 reserved bit (10) unal, /* reserved for future use */ 2 211 2 nseq_sch fixed bin (35), /* no. tuples located via sequential search */ 2 212 2 nind_sch fixed bin (35), /* no. tuples located via index search */ 2 213 2 nhash_sch fixed bin (35), /* no. tuples located via hash search */ 2 214 2 nlk_sch fixed bin (35), /* no tuples located via link search */ 2 215 2 cur_lit_offset fixed bin (35), /* current bit offset in literal string */ 2 216 2 dbi fixed bin (35), /* database index for this opening */ 2 217 2 last_s_e_id_num fixed bin (35), /* identifying number for last selection expression seen */ 2 218 2 se_transaction_id bit (36) aligned, /* transaction id from beginning of select expression */ 2 219 2 last_store_rel_name char (32), /* Name of relation last used for store */ 2 220 2 cursor_ptrs_storage_ptr ptr, /* pointer to space where cursor ptrs are stored */ 2 221 2 cursor_storage_area_ptr ptr, /* pointer to area where the cursors are kept */ 2 222 2 reserved_words (10) fixed bin (35), /* Reserved for future use */ 2 223 2 relmgr_entries, /* relation manager entries */ 2 224 3 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 2 225 3 close entry (bit (36) aligned, fixed bin (35)), 2 226 3 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)), 2 227 3 destroy_cursor entry (ptr, ptr, fixed bin (35)), 2 228 3 set_scope entry (bit (36) aligned, bit (2) aligned, bit (2) aligned, fixed bin (35)), 2 229 3 delete_tuples_by_id entry (ptr, ptr, fixed bin (35), fixed bin (35)), 2 230 3 modify_tuples_by_id entry (ptr, ptr, ptr, fixed bin (35), fixed bin (35)), 2 231 3 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 2 232 3 get_tuples_by_spec entry (ptr, ptr, ptr, ptr, ptr, fixed bin (35)), 2 233 3 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 2 234 3 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 2 235 3 get_count entry (ptr, ptr, fixed bin (35), fixed bin (35)), 2 236 3 get_duplicate_key_count entry (ptr, bit (36) aligned, fixed bin (17), fixed bin (35), fixed bin (35)), 2 237 3 get_population entry (ptr, fixed bin (35), fixed bin (35)), 2 238 3 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, bit (36) aligned, fixed bin (35)), 2 239 3 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), bit (36) aligned, fixed bin (35)), 2 240 3 destroy_relation_by_path entry (char (*), char (*), fixed bin (35)), 2 241 3 reserved_entries (5) entry (), 2 242 2 access_costs, /* access costs for permute */ 2 243 3 total_primary_key_cost float bin, 2 244 3 access_cost float bin, 2 245 3 access_overhead float bin, 2 246 3 us_access_cost float bin, 2 247 3 os_access_cost float bin, 2 248 2 dbc_uid bit (36) aligned, /* uid of the segment containing the dbc structure */ 2 249 2 concurrency_on bit (1) unal, /* "1"b implies dmfile concurrency is being used */ 2 250 2 rollback_on bit (1) unal; /* "1"b iomplies before journaling is to be done */ 2 251 2 252 /* END mrds_dbcb.incl.pl1 */ 2 253 2 254 229 230 3 1 /* BEGIN INCLUDE FILE mdbm_dbc.incl.pl1 08/23/78 odf */ 3 2 3 3 /* HISTORY: 3 4* 3 5* Modified by odf for new version data bases in August 1978 3 6* Modified by Al Kepner, March 8, 1979 to add new flags for quiescing 3 7* Modified by M. Pierret, 8 April 1980 to look prettier, add pads 3 8* Modified by M. Pierret, 22 August 1980, grouping like fields (flags, offsets..) 3 9* 3 10* 80-11-19 Jim Gray : modified to change version number from 4 to 5 to allow 3 11* automatic update of dbc structures to new r-s-m-d-u scope codes from r-u. 3 12**/ 3 13 3 14 dcl 1 dbc based (dbc_ptr), /* data base control segment description */ 3 15 2 proper, 3 16 3 version fixed bin, /* version number of this structure */ 3 17 3 dtd_mrds fixed bin (71), /* date time dumped by mrds utility */ 3 18 3 flags, 3 19 4 trouble_switch bit (1) unal, /* ON => ungraceful termination of a user process */ 3 20 4 dead_proc_flag bit (1) unal, /* ON => dead process has access to part of data base */ 3 21 4 quiesce_sw bit (1) unal, /* ON => db is quiesced for a administrative user */ 3 22 4 quiesce_db bit (1) unal, /* ON => The entire data base is being quiesced. */ 3 23 4 quiesce_files bit (1) unal, /* ON => A selected set of files is being quiesced. */ 3 24 4 pad bit (31) unal, /* reserved for future use */ 3 25 3 quiesce_lock bit (36) aligned, /* lock word for quiescing data base */ 3 26 3 wakeup_waiters fixed bin, /* nbr users who have been sent a wakeup signal but have not yet 3 27* received it */ 3 28 3 user_counts, 3 29 4 open_users fixed bin, /* nbr of users with data base open in any mode */ 3 30 4 active_users fixed bin, /* nbr of users currently having a scope set */ 3 31 4 waiting_users fixed bin, /* nbr of users waiting to set scope */ 3 32 3 open_lock bit (36) aligned, /* lock word for opening data base */ 3 33 3 scope_lock bit (36) aligned, /* lock word for setting and deleting scope */ 3 34 3 sa_size fixed bin (35), /* size in words of static area */ 3 35 3 pad2 bit (144), 3 36 3 offsets, 3 37 4 open_users_ofs bit (18) unal, /* bit offset to list of users with data base currently open */ 3 38 4 active_users_ofs bit (18) unal, /* bit offset to list of active users in shared mode */ 3 39 4 waiting_users_ofs bit (18) unal, /* bit offset to list of waiting users in shared mode */ 3 40 4 obsolete bit (36) unal, /* obsolete */ 3 41 3 pad3 bit (144), 3 42 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (dbc.static_area))) + 1); 3 43 3 44 dcl dbc_ptr ptr init (null ()); 3 45 3 46 dcl VERSION_NBR fixed bin init (5) static internal options (constant); 3 47 3 48 3 49 /* END mdbm_dcb.incl.pl1 */ 3 50 3 51 231 232 4 1 /* BEGIN mdbm_rm_db_info.incl.pl1 -- jaw, 11/7/78 */ 4 2 4 3 4 4 4 5 /****^ HISTORY COMMENTS: 4 6* 1) change(86-08-13,Hergert),, approve(88-06-28,MCR7903), 4 7* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 4 8* Removed change of 84-11-02. i.e. replaced even_word_pad. 4 9* END HISTORY COMMENTS */ 4 10 4 11 4 12 /* WARNING 4 13* If the rm_db_info structure is changed then the mrds_data_ 4 14* item saved_res_version MUST be incremented to invalidate all 4 15* existing saved resultants 4 16**/ 4 17 4 18 /* DESCRIPTION: This structure is based on a segment 4 19* {unique_name}.mrds.rdbi that represents the secure portion of the 4 20* resultant model that is created partially at database open time, 4 21* (the rm_file_array, and rm_rel_array) and partially at ready_file 4 22* time, (the rm_file_info, rm_rel_info, rm_attr_info, 4 23* rm_domain_info, rm_plink_info and rm_clink_info). it's purpose is 4 24* to provide an efficient means of accessing database model 4 25* information, as seen from the possibly submodel view of the user, 4 26* and his current state of "files readied". it is the secure part 4 27* because it contains the model information which needs to be 4 28* protected from general knowledge, and this segment will 4 29* eventually be capable of being in a lower ring. the structure 4 30* itself points to four arrays that are allocated in it's area, 4 31* that in turn point to the other structures mentions above, also 4 32* allocated in the rm_db_info.static_area. the arrays are the 4 33* rm_file_array, and rm_rel_array. their are a pair for temporary 4 34* relations, initially empty, and a pair for normal model 4 35* files/relations. the normal rm_file_array is initialized to a 4 36* list of all known file names, the rm_rel_array only gets relation 4 37* names as files are readied. the rm_file_array points to 4 38* rm_file_infos for each file (see mdbm_rm_file_info.incl.pl1) and 4 39* the rm_rel_array points to rm_rel_info for each relation 4 40* "readied". (see mdbm_rm_rel_info.incl.pl1). (the arrays are in 4 41* mdbm_rm_file_array.incl.pl1 and mdbm_rm_rel_array.incl.pl1). the 4 42* file infos point to contained rel infos, the rel infos point to 4 43* contained attr infos, and those in turn to domain infos. (see 4 44* mdbm_rm_attr_info.incl.pl1 and mdbm_rm_domain_info.incl.pl1) 4 45* foreign keys are represented by the structures 4 46* mdbm_rm_plink_info.incl.pl1, and mdbm_rm_clink_info.incl.pl1. the 4 47* pathnames of the model and submodel, if any, are also maintained 4 48* in rm_db_info. the pointer to this rm_db_info segment is obtained 4 49* from the dbcb segment tructure(see mrds_dbcb.incl.pl1) see the 4 50* individual include files for further organization information, 4 51* and particular data structures. 4 52* 4 53* HISTORY: 4 54* 4 55* 80-02-01 Jim Gray : Modified to put area on even word boundary, 4 56* so that define_area_ could be used to make it an extensible area 4 57* 4 58* 81-1-9 Jim Gray : added like reference to make the phony 4 59* resultant in mu_database_index easier to keep, since no reference 4 60* to the area is needed. 4 61* 4 62* 81-1-12 Jim Gray : added version of submodel used in opening to 4 63* resultant. 4 64* 4 65* 81-05-13 Rickie E. Brinegar: added the administrator bit to the 4 66* structure. 4 67* 4 68* 81-05-28 Jim Gray : removed pointers to file_arrays, since they 4 69* are now combined into the rel_array. Removed the control file 4 70* info which was unused. Added pointer to head of domain list, 4 71* which is to be used to insure only one copy of each domain info. 4 72* 4 73* 83-05-19 Davids: Added the saved_res_version element. 4 74* 4 75* 84-11-02 Thanh Nguyen: Replaced the even_word_pad by the 4 76* ref_name_proc_ptr to point to list of reference name of the 4 77* check, encode, or decode proc. 4 78* 4 79* CAUTION: The structure entries from db_version to sm_path should 4 80* not be moved or have their declarations changed because they are 4 81* used in the handling of old version database openings. 4 82* 4 83* 4 84**/ 4 85 4 86 dcl 1 rm_db_info aligned based (rdbi_ptr), /* data base info, located at base of res. dm. seg. */ 4 87 2 data like rm_db_info_data, 4 88 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (rm_db_info.static_area)))); 4 89 4 90 dcl rdbi_ptr ptr; 4 91 4 92 declare 1 rm_db_info_data based, /* separate declaration of info, so others can use 4 93* like reference to it without getting the area as well */ 4 94 2 db_version fixed bin, /* version no. of db */ 4 95 2 sm_version fixed bin unal, /* version of submodel used unal, 0 if model opening */ 4 96 2 val_level fixed bin unal, /* validation level for this db. */ 4 97 2 db_path char (168), /* abs. path of db. */ 4 98 2 sm_path char (168), /* path of submodel or model */ 4 99 2 mdbm_secured bit (1) unal, /* ON => database is secured */ 4 100 2 administrator bit (1) unal, /* ON => user is an administrator */ 4 101 2 pad bit (34) unal, /* for future use */ 4 102 2 saved_res_version char (8), /* version of the saved resultant in the 4 103* dbcb and rdbi segments in the db dir */ 4 104 2 domain_list_ptr ptr, /* pointer to head of list of domain_info's */ 4 105 2 ra_ptr ptr, /* pointer to rel. array */ 4 106 2 tra_ptr ptr, /* to rel array for temp rels */ 4 107 2 even_word_pad fixed bin (71) aligned; /* padding to put area on even word boundary */ 4 108 4 109 /* END mdbm_rm_db_info.incl.pl1 */ 4 110 4 111 233 234 235 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/01/88 1313.8 display_mrds_scope_settings.pl1 >special_ldd>install>MR12.2-1073>display_mrds_scope_settings.pl1 203 1 04/18/85 1628.1 mdbm_scope_info.incl.pl1 >ldd>include>mdbm_scope_info.incl.pl1 229 2 08/01/88 1300.0 mrds_dbcb.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_dbcb.incl.pl1 231 3 10/14/83 1609.0 mdbm_dbc.incl.pl1 >ldd>include>mdbm_dbc.incl.pl1 233 4 08/01/88 1310.7 mdbm_rm_db_info.incl.pl1 >special_ldd>install>MR12.2-1073>mdbm_rm_db_info.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. active_scopes 5 based fixed bin(17,0) level 2 dcl 1-32 ref 154 append_tuple 26(01) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 169 append_tuple 27(01) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 184 caller_name 000112 automatic char(32) initial packed unaligned dcl 219 set ref 149* 219* com_err_ 000022 constant entry external dcl 218 ref 149 data based structure level 2 in structure "dbcb" dcl 2-142 in procedure "dmss" data based structure level 2 in structure "rm_db_info" dcl 4-86 in procedure "dmss" db_index 000100 automatic fixed bin(35,0) dcl 209 set ref 81* 83* 128* 149* db_path 2 based char(168) level 3 dcl 4-86 set ref 132* db_version based fixed bin(17,0) level 3 dcl 4-86 set ref 132* dbc based structure level 1 unaligned dcl 3-14 dbc_ptr 010132 automatic pointer initial dcl 3-44 in procedure "dmss" set ref 92* 3-44* 132 dbc_ptr 30 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "dmss" ref 92 dbcb based structure level 1 dcl 2-142 dbcb_data based structure level 1 unaligned dcl 2-148 dbcb_ptr 010130 automatic pointer dcl 2-146 set ref 83* 84 91 92 116 118 120 122 124 137 148 delete_tuple 27(02) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 190 delete_tuple 26(02) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 175 dsm_sw 106(08) based bit(1) level 3 packed packed unaligned dcl 2-142 ref 137 empty builtin function dcl 226 ref 221 fixed builtin function dcl 226 ref 116 118 120 122 124 flags 26 based structure array level 3 dcl 1-32 get_group_id_ 000024 constant entry external dcl 223 ref 76 76 get_process_id_ 000026 constant entry external dcl 224 ref 76 76 i 010126 automatic fixed bin(17,0) dcl 222 set ref 160* 162 166 169 172 175 181 184 187 190 196* ioa_ 000016 constant entry external dcl 216 ref 70 76 104 128 132 138 154 158 196 modify_attr 26(03) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 172 modify_attr 27(03) based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 187 mrds_data_$max_dbs 000010 external static fixed bin(35,0) dcl 211 ref 81 mrds_error_$non_scope_ready 000020 external static fixed bin(35,0) dcl 217 set ref 149* mu_database_index$get_number_open_dbs 000014 constant entry external dcl 215 ref 67 mu_database_index$get_resultant_model_pointer 000012 constant entry external dcl 214 ref 83 nfiles 4 based fixed bin(17,0) level 2 dcl 1-32 ref 160 null builtin function dcl 226 ref 84 3-44 149 1-59 number_found 000111 automatic fixed bin(17,0) dcl 213 set ref 68* 81 89* 89 number_of_openings 000110 automatic fixed bin(17,0) dcl 212 set ref 67* 70 81 open_mode 106(14) based bit(3) level 3 packed packed unaligned dcl 2-142 ref 116 118 120 122 124 open_mode_display 000101 automatic varying char(24) dcl 210 set ref 116* 118* 120* 122* 124* 126* 128* permit_string 000122 automatic varying char(4) dcl 220 set ref 164* 166* 166 169* 169 172* 172 175* 175 178 178* 196* permits 26 based structure array level 4 dcl 1-32 prevent_string 000124 automatic varying char(4) dcl 220 set ref 164* 181* 181 184* 184 187* 187 190* 190 193 193* 196* prevents 27 based structure array level 4 dcl 1-32 proper based structure level 2 unaligned dcl 3-14 rdbi_ptr based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "dmss" ref 91 rdbi_ptr 010134 automatic pointer dcl 4-90 in procedure "dmss" set ref 91* 132 132 138 138 read_attr 27 based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 181 read_attr 26 based bit(1) array level 5 in structure "scope_info" packed packed unaligned dcl 1-32 in procedure "display_new_scope" ref 166 rm_db_info based structure level 1 dcl 4-86 rm_db_info_data based structure level 1 unaligned dcl 4-92 scope 6 based structure array level 2 dcl 1-32 scope_flags based structure level 1 dcl 1-42 scope_info based structure level 1 dcl 1-32 scope_ptr 010154 automatic pointer initial dcl 1-59 in procedure "display_new_scope" set ref 148* 149 154 160 162 166 169 172 175 181 184 187 190 196 1-59* scope_ptr 34 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "dmss" ref 148 sm_name 16 based char(32) array level 3 dcl 1-32 set ref 196* sm_path 54 based char(168) level 3 dcl 4-86 set ref 138* sm_version 1 based fixed bin(17,0) level 3 packed packed unaligned dcl 4-86 set ref 138* touched 30 based bit(1) array level 4 packed packed unaligned dcl 1-32 ref 162 version based fixed bin(17,0) level 3 dcl 3-14 set ref 132* work_area 000126 automatic area(4096) dcl 221 set ref 221* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. VERSION_NBR internal static fixed bin(17,0) initial dcl 3-46 addr builtin function dcl 226 max_file_init automatic fixed bin(17,0) dcl 1-58 rel builtin function dcl 226 scope_rdy internal static bit(6) initial packed unaligned dcl 1-60 scope_rdy_array based bit(1) array packed unaligned dcl 1-61 sys_info$max_seg_size external static fixed bin(35,0) dcl 225 NAMES DECLARED BY EXPLICIT CONTEXT. display_mrds_scope_settings 000266 constant entry external dcl 53 display_new_scope 000647 constant entry internal dcl 144 ref 96 display_opening_info 000450 constant entry internal dcl 109 ref 94 dmss 000256 constant entry external dcl 53 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1326 1356 1166 1336 Length 1652 1166 30 257 137 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dmss 4359 external procedure is an external procedure. display_opening_info internal procedure shares stack frame of external procedure dmss. display_new_scope internal procedure shares stack frame of external procedure dmss. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dmss 000100 db_index dmss 000101 open_mode_display dmss 000110 number_of_openings dmss 000111 number_found dmss 000112 caller_name dmss 000122 permit_string dmss 000124 prevent_string dmss 000126 work_area dmss 010126 i dmss 010130 dbcb_ptr dmss 010132 dbc_ptr dmss 010134 rdbi_ptr dmss 010154 scope_ptr display_new_scope THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ get_group_id_ get_process_id_ ioa_ mu_database_index$get_number_open_dbs mu_database_index$get_resultant_model_pointer THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_data_$max_dbs mrds_error_$non_scope_ready LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 219 000243 221 000246 3 44 000251 53 000255 67 000274 68 000303 70 000304 76 000323 81 000365 83 000400 84 000411 89 000416 91 000417 92 000422 94 000425 96 000426 100 000427 104 000434 235 000447 109 000450 116 000451 118 000465 120 000477 122 000510 124 000522 126 000534 128 000541 132 000565 137 000615 138 000621 142 000646 144 000647 1 59 000650 148 000652 149 000655 154 000710 158 000727 160 000743 162 000753 164 000761 166 000763 169 000775 172 001010 175 001022 178 001034 181 001045 184 001057 187 001071 190 001103 193 001115 196 001126 200 001157 207 001161 ----------------------------------------------------------- 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