COMPILATION LISTING OF SEGMENT mu_get_tuple 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.5 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* *********************************************************** */ 8 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(87-01-22,Hergert), approve(88-07-11,MCR7903), 14* audit(88-07-07,Dupuis), install(88-08-01,MR12.2-1073): 15* For new parser, changed referneces of sel_ptr to select_list_ptr. 16* END HISTORY COMMENTS */ 17 18 19 20 mu_get_tuple: proc (I_dbcb_ptr, I_area_ptr, I_rmri_ptr, X_t_ptr, O_code); 21 22 /* . BEGIN_DESCRIPTION 23* 24* This procedure was removed from mrds_dsl_define_temp_rel by R. Lackey 25* so it could be used by rmdb_create_and_pop_rel. 26* 27* The purpose is to get the next tuple of a translated selection expression 28* 29* . END_DESCRIPTION 30**/ 31 32 /* HISTORY 33* 82-04-26 R. Lackey : Moved from mrds_dsl_temp_rel and made an expternal proc 34* for use by other routines. 35* 36* 82-09-09 Mike Kubicar : converted from using the tuple structure to using 37* the simple typed vector structure. 38* 39* 83-06-08 Davids: Modified so that mrds_dsl_retrieve$set_tuple is called 40* with the input simple_typed_vector_ptr (X_t_ptr) instead of a temp_ptr 41* and then doing a copy of the vector. 42**/ 43 44 45 46 47 /* PARAMETERS */ 48 49 dcl I_dbcb_ptr ptr parameter; /* Pointer to dbcb */ 50 dcl I_area_ptr ptr parameter; /* Pointer to work area */ 51 dcl I_rmri_ptr ptr parameter; /* Pointer to rm_rel_info structure */ 52 dcl X_t_ptr ptr parameter; /* Pointer to tuple structure */ 53 dcl O_code fixed bin (35) parameter; /* Error code */ 54 55 dbcb_ptr = I_dbcb_ptr; 56 area_ptr = I_area_ptr; 57 rmri_ptr = I_rmri_ptr; 58 simple_typed_vector_ptr = X_t_ptr; 59 O_code = 0; 60 61 if dbcb.ss_ptr ^= null then do; /* set ptrs needed later */ 62 ss_ptr = dbcb.ss_ptr; 63 select_list_ptr = select_sets.items.select_ptr (1); 64 range_ptr = select_sets.items.range_ptr (1); 65 ti_ptr = select_sets.items.ti_ptr (1); 66 end; 67 else do; 68 range_ptr = dbcb.range_ptr; /* initialize */ 69 select_list_ptr = dbcb.select_ptr; 70 ti_ptr = dbcb.ti_ptr; 71 end; 72 73 if dbcb.ss_ptr ^= null then do; /* if a "set" selection expr. */ 74 75 call mrds_dsl_retrieve$set_tuple (dbcb_ptr, area_ptr, simple_typed_vector_ptr, icode); 76 end; 77 else do; /* Not a "set" selection expr */ 78 79 call mrds_dsl_search (dbcb_ptr, area_ptr, icode); 80 if icode = 0 then do; /* if got hit, build temp rel tuple */ 81 old_vi = 0; 82 simple_typed_vector_ptr -> simple_typed_vector.number_of_dimensions 83 = select_list.num_items; 84 do i = 1 to select_list.num_items; /* put each attr value into tuple */ 85 if old_vi ^= select_list.item.var_index (i) then do; 86 /* do tuple init only if necessary */ 87 old_vi = select_list.item.var_index (i); 88 rip = range.tup_var.ri_ptr (old_vi); 89 do j = 1 to tuple_info.num_tuples 90 while (old_vi ^= tuple_info.tuple.var_index (j)); 91 end; 92 st_ptr = tuple_info.tuple.tuple_ptr (j); 93 end; /* tuple init. */ 94 traip = rm_rel_info.attr_ptrs (i); 95 sraip, rai_ptr = select_list.item.ai_ptr (i); /* target and source attr info ptrs */ 96 97 simple_typed_vector_ptr -> 98 simple_typed_vector.dimension ( 99 traip -> rm_attr_info.defn_order) 100 .value_ptr = st_ptr -> 101 simple_typed_vector.dimension ( 102 sraip -> rm_attr_info.defn_order) 103 .value_ptr; 104 end; /* attr loop */ 105 end; 106 107 end; /* if not set */ 108 109 O_code = icode; 110 X_t_ptr = simple_typed_vector_ptr; 111 112 exit: return; 113 114 dcl addr builtin; 115 dcl area_ptr ptr; 116 dcl fixed builtin; 117 dcl i fixed bin; 118 dcl icode fixed bin (35); 119 dcl j fixed bin; 120 dcl mrds_data_$max_attributes fixed bin (35) ext static; 121 dcl mrds_data_$max_id_len fixed bin (35) ext; 122 dcl mrds_data_$max_select_items ext fixed bin (35); 123 dcl mrds_dsl_retrieve$set_tuple entry (ptr, ptr, ptr, fixed bin (35)); 124 dcl mrds_dsl_search entry (ptr, ptr, fixed bin (35)); 125 dcl null builtin; 126 dcl old_vi fixed bin; 127 dcl rel builtin; 128 dcl rip ptr; 129 dcl sraip ptr; 130 dcl st_ptr ptr; 131 dcl sys_info$max_seg_size fixed bin (35) ext static; 132 dcl traip ptr; 133 1 1 /* BEGIN mrds_tuple_info.incl.pl1 -- jaw 11/2/78 */ 1 2 1 3 /* HISTORY: 1 4* 1 5* Modified in March 1977 by O Friesen to hold allocated ptr and length 1 6* 82-10-29 Mike Kubicar : Made tuple_id aligned 1 7* 1 8**/ 1 9 1 10 dcl 1 tuple_info aligned based (ti_ptr), 1 11 2 num_tuples fixed bin, /* no. of tuples for which info given */ 1 12 2 tuple (ti_ntuples_init refer (tuple_info.num_tuples)), 1 13 3 tuple_ptr ptr, /* pointer to found tuple */ 1 14 3 tuple_id bit (36) aligned, /* tuple id for found tuple */ 1 15 3 var_index fixed bin; /* index to tuple variable */ 1 16 1 17 dcl ti_ptr ptr; 1 18 dcl ti_ntuples_init fixed bin; 1 19 1 20 /* END mrds_tuple_info.incl.pl1 */ 1 21 134 135 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 136 137 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 138 139 4 1 /* BEGIN mrds_range.incl.pl1 -- jaw, 10/20/78 */ 4 2 4 3 /* Modified 83-04-22 by R. Harvey to add needed_bits */ 4 4 4 5 dcl 1 range aligned based (range_ptr), 4 6 2 num_vars fixed bin, /* number of tuple variables */ 4 7 2 tup_var (mrds_data_$max_tup_var refer (range.num_vars)), /* info for each tuple variable */ 4 8 3 name char (mrds_data_$max_id_len), /* name of tuple variable */ 4 9 3 temp_rel bit (1) unal, /* on if temporary relation */ 4 10 3 used bit (1) unal, /* 1 => this tuple variable is referenced by 4 11* a -select clause. */ 4 12 3 whole_tuple_selected bit (1) unal, /* the whole tuple variable is referenced in the select clause */ 4 13 3 copy_for_current bit (1) unal, /* -current requests attributes not previously retrieved */ 4 14 3 copied_for_current bit (1) unal, /* tuple copied during previous -current */ 4 15 3 reserved bit (31) unal, /* reserved for future use */ 4 16 3 rel_index fixed bin, /* index to assoc. relation */ 4 17 3 stv_ptr ptr, /* simple typed vector */ 4 18 3 idl_ptr ptr, /* id_list ptr */ 4 19 3 needed_bits aligned, 4 20 4 attr (mrds_data_$max_attributes) bit (1) unal, 4 21 3 ri_ptr ptr; /* pointer to rel info for assoc. relation */ 4 22 4 23 dcl range_ptr ptr; 4 24 4 25 /* END mrds_range.incl.pl1 */ 4 26 140 141 5 1 /* BEGIN mdbm_rm_rel_info.incl.pl1 -- jaw, 11/16/78 */ 5 2 5 3 /* WARNING 5 4* If the rm_rel_info structure is changed then the mrds_data_ 5 5* item saved_res_version MUST be incremented to invalidate all 5 6* existing saved resultants 5 7**/ 5 8 5 9 /* HISTORY: 5 10* 5 11* Modified by Jim Gray - - May 1980, to include model number of 5 12* attributes, and varying attributes, so that partial view 5 13* submodels will have the info needed to properly set up the 5 14* varying length array headers in the tuple structure. 5 15* 5 16* Modified by Jim Gray - - 80-11-06, to rename r_perm = 5 17* status_perm, s_perm = append_tuple_perm, d_perm = 5 18* delete_tuple_perm, and make m_perm = unused_perm. 5 19* 5 20* 81-01-23 Jim Gray : added bit to indicate whether the last model 5 21* view attribute was varying character or bit, since a partial view 5 22* submodel will not have this information in the resultant, and it 5 23* is needed for determining the new tuple length in mus_mod_ubtup, 5 24* since with exact length storage of varying length attributes, 5 25* each tuple can be a different length, which is can only be 5 26* determined by examining the tuple itself. 5 27* 5 28* 81-01-29 Jim Gray : added curent tuple count, to provide for 5 29* interface to allow temp rel population to be known, and to 5 30* provide a more efficient means of finding an approx. current perm 5 31* relation population. 5 32* 5 33* 81-05-28 Jim Gray : removed structure elements referring to 5 34* blocked files, foreign keys, and ids procedures. Also set number 5 35* of files per rel to a constant of 1. 5 36* 5 37* 81-05-28 Jim Gray : combined data from rm_file_info into this 5 38* structure so that only one structure per relation is needed. 5 39* 5 40* 81-07-02 Jim Gray : added total_key and dup_key vfile statistics 5 41* counts. Also added number of operations count since last 5 42* statistics update, and a time since the statistics were last 5 43* updated. 5 44* 5 45* 81-07-06 Jim Gray : added a per selection expression update 5 46* identifier so that small relations could be updated on a per S.E. 5 47* basis 5 48* 5 49* 82-04-21 R. Lackey : Added number_selected (ri_niocbs_init refer (rm_rel_info.niocbs)) fixed bin (35) 5 50* to end of structure TR 12205 (Suggestion). 5 51* 5 52* 82-08-19 D. Woodka : Removed rm_rel_info.max_data_len field for 5 53* the DMS conversion. 5 54* 5 55* 82-08-30 Davids: added the opening_id element and removed the iocb 5 56* array and the niocb element for DMS conversion. Also removed the 5 57* number_selected array (and ri_niocbs_init) since subsets are not 5 58* going to be used. 5 59* 5 60* 82-09-20 Mike Kubicar : changed rm_rel_info.rel_id to bit (36) aligned 5 61* so that it can be used with relation manager. Also added 5 62* rm_rel_info.primary_key_index_id for relation manager. 5 63* 5 64* 82-09-22 Mike Kubicar : Removed the, now useless, fields var_attr_ptrs, 5 65* nvar_atts, model_nvar_atts. 5 66* 5 67* 82-09-24 Davids: Removed current_key_count and current_dup_key_count 5 68* since the duplicate key count for each secondary index is now being 5 69* kept in the attr_info structure and key_count was only needed to 5 70* help in calculating the average selectivity of each index which 5 71* can now be gotten directly from each index's dup key count. Also 5 72* removed the file_id element since it is no longer needed for 5 73* anything. 5 74* 5 75* 82-09-27 Mike Kubicar : removed file_id_len for the same reason file_id 5 76* was removed. 5 77* 5 78* 82-11-05 Mike Kubicar : added a pointer to an id_list structure to be 5 79* used when retrieving tuples from this relation. 5 80* 5 81* 83-04-06 Davids: Added the scope_flags_ptr which points to the scope_flags structure 5 82* for the relation. Note that this structure is part of the resultant NOT 5 83* part of the db.control structure. The scopes are duplicated in the resultant 5 84* to reduce contention for the db.control structure. Note also that the pointer 5 85* will always point to a scope_flags structure even if no scopes have been 5 86* set on the relation, the structure is allocated when the db is opened. 5 87**/ 5 88 5 89 5 90 /* DESCRIPTION: 5 91* 5 92* This structure is allocated in the area part of the structure in 5 93* mdbm_rm_db_info.incl.pl1 as part of the resultant model created 5 94* at open time for a database. There will be one of these 5 95* rm_rel_info structures for each relation appearing in the 5 96* database view (there may be less than the total in the database 5 97* for a submodel openings). There will also be one for each 5 98* temporary relation currently defined for that opening. 5 99* 5 100* The structure in mdbm_rm_rel_array.incl.pl1 contains pointers to 5 101* all rm_rel_info structures allocated. It is used for searching 5 102* for the appropriate structure. This array is pointed to by 5 103* rm_db_info. There are two arrays, one for perm rels, one for temp 5 104* rels. 5 105* 5 106* The rm_rel_info structure points to the 5 107* mdbm_rm_attr_info.incl.pl1 structures, one for each attribute 5 108* appearing in this view of the relation. Each of these in turn 5 109* point to a mdbm_rm_domain_info.incl.pl1 structure for the domain 5 110* info for each attr. 5 111* 5 112* Most of the other information here deals with specifics of the 5 113* relation's logical definition, such as key and secondary index 5 114* attribute inidicators, security permissions, and tuple physical 5 115* construction details. 5 116* 5 117**/ 5 118 5 119 dcl 1 rm_rel_info aligned based (rmri_ptr), /* relation information */ 5 120 2 name char (32), /* from submodel */ 5 121 2 model_name char (30), /* from model */ 5 122 2 rel_id bit (36) aligned, /* unique id. */ 5 123 2 retrieve bit (1) unal, /* operations allowed by this view */ 5 124 2 modify bit (1) unal, 5 125 2 delete bit (1) unal, 5 126 2 store bit (1) unal, 5 127 2 total_key bit (1) unal, /* on if view includes full primary key */ 5 128 2 indexed bit (1) unal, /* on if exists sec. index */ 5 129 2 mdbm_secured bit (1) unal, /* on if mdbm must check security */ 5 130 2 status_perm bit (1) unal, /* if user has status. perm. */ 5 131 2 append_tuple_perm bit (1) unal, /* if user has store perm. */ 5 132 2 delete_tuple_perm bit (1) unal, /* if user has del. perm. */ 5 133 2 unused_perm bit (1) unal, /* for future use. */ 5 134 2 last_model_attr_char_var bit (1) unal, /* on => last model varying attr is char */ 5 135 2 reserved bit (24) unal, /* for future use */ 5 136 2 num_attr fixed bin, /* total no. of attr. in rel. */ 5 137 2 model_num_attr fixed bin, /* total attrs in model relation */ 5 138 2 nkey_attr fixed bin, /* no. of key attr. */ 5 139 2 model_nkey_attr fixed bin, /* total number of keys in model */ 5 140 2 primary_key_index_id bit (36) aligned, /* Index id of relation's primary key */ 5 141 2 nsec_inds fixed bin, /* no. sec. indexes */ 5 142 2 max_key_len fixed bin (35), /* max length (chars) of primary key */ 5 143 2 current_tuple_population fixed bin (35), /* last known total tuple count for this relation */ 5 144 2 last_statistics_update_count fixed bin, /* number of operations's, since this rels stats were updated */ 5 145 2 last_statistics_update_time fixed bin (71),/* last time this rels stats were updated */ 5 146 2 last_statistics_update_s_e_ref_num fixed bin (35), /* last select expr ID that updated this rels stats */ 5 147 2 ready_mode fixed bin, /* 1 => r, 2 => mr, 3 => u, 4 => l, 5 => sr, 6 => su */ 5 148 2 file_type fixed bin, /* 1 => unblocked, 2 => blocked, 3 => temporary */ 5 149 2 tuple_id_len fixed bin, /* no. bits in local tuple id */ 5 150 2 opening_id bit (36) aligned, /* relation manager opening is */ 5 151 2 key_attr_ptrs (nkey_attr_init refer (rm_rel_info.nkey_attr)) ptr, /* ptrs to key attr. */ 5 152 2 attr_ptrs (natts_init refer (rm_rel_info.num_attr)) ptr, /* ptrs to all attr. */ 5 153 2 id_list_ptr ptr, /* Id list for retrieves from the relation */ 5 154 2 scope_flags_ptr ptr; /* pointer to the scope_flags structure for the rel */ 5 155 5 156 dcl rmri_ptr ptr; 5 157 dcl (nkey_attr_init, 5 158 natts_init, 5 159 nvar_atts_init) fixed bin; 5 160 5 161 /* END mdbm_rm_rel_info.incl.pl1 */ 5 162 5 163 142 143 6 1 /* BEGIN mdbm_rm_domain_info.incl.pl1 -- jaw, 9/26/78 */ 6 2 6 3 /* WARNING 6 4* If the rm_domain_info structure is changed then the mrds_data_ 6 5* item saved_res_version MUST be incremented to invalidate all 6 6* existing saved resultants 6 7**/ 6 8 6 9 /* DESCRIPTION: 6 10* 6 11* This structure is allocated in the mdbm_rm_db_info.incl.pl1 6 12* static area, once per attribute used in a relation in a readied 6 13* file. it is pointed to by the mdbm_rm_attr_info.incl.pl1, and may 6 14* point to mdbm_rm_ck_and_group.incl.pl1 if a "-check" option 6 15* boolean expression was declared for this domain. it contains the 6 16* descriptor for this domain data type, and other resultant model 6 17* information. 6 18* 6 19* 6 20* HISTORY: 6 21* 6 22* 81-05-06 Rickie E. Brinegar: Modified ck_proc, encode_proc, 6 23* decode_proc to be entry variables instead of entry pointers. This 6 24* allows these programs to be written in languages other than pl1. 6 25* 6 26* 81-05-28 Jim Gray : removed unused procedure points, and unused 6 27* check stack structure elements. Also made the descriptors bit 6 28* (36) in this structure, rather than pointers to the descriptors 6 29* elsewhere. Also removed un-needed redundant assign_ parameters, 6 30* that are actually available in the descriptors. 6 31* 6 32* 6 33**/ 6 34 6 35 dcl 1 rm_domain_info aligned based (rdi_ptr), /* domain information */ 6 36 2 name char (32), /* domain name */ 6 37 2 db_desc bit (36), /* to desc. for db. */ 6 38 2 user_desc bit (36), /* desc for user visible data */ 6 39 2 user_bit_len fixed bin, /* storage length of users data */ 6 40 2 ck_proc_entry entry variable, /* to check proc. entry */ 6 41 2 encd_proc_entry entry variable, /* to encode proc entry */ 6 42 2 decd_proc_entry entry variable, /* to decode proc entry */ 6 43 2 ck_proc bit (1) unal, /* Is there a check proc */ 6 44 2 encd_proc bit (1) unal, /* Is there an encode proc */ 6 45 2 decd_proc bit (1) unal, /* Is there a decode proc */ 6 46 2 pad bit (33) unal, 6 47 2 next_domain_ptr ptr ; /* to next domain, in list of all domains */ 6 48 /* to check stack and groups */ 6 49 6 50 6 51 dcl rdi_ptr ptr int automatic init (null ()); 6 52 6 53 /* END mdbm_rm_domain_info.incl.pl1 */ 6 54 6 55 144 145 7 1 /* BEGIN mdbm_rm_attr_info.incl.pl1 -- jaw, 11/16/78 */ 7 2 7 3 /* WARNING 7 4* If the rm_attr_info structure is changed then the mrds_data_ 7 5* item saved_res_version MUST be incremented to invalidate all 7 6* existing saved resultants 7 7**/ 7 8 7 9 /* 7 10* 7 11* Modified by Jim Gray - - 80-11-05, to add mdbm_secured bit, so 7 12* that rm_rel_info does not have to be checked 7 13* 7 14* 81-05-28 Jim Gray : removed structure elements referring to 7 15* foreign keys. 7 16* 7 17* 82-08-19 D. Woodka : removed rm_attr_info.bit_offset for the DMS 7 18* conversion. 7 19* 7 20* 82-09-15 Davids: added the number_of_dups field. 7 21* 7 22* 82-09-20 Mike Kubicar : changed the index_id field to be bit (36) 7 23* aligned. This is to conform with the new definition in the database 7 24* model. Also removed the now useless field varying. 7 25* 7 26* 82-11-05 Davids: added the field model_defn_order and clarified the 7 27* comment for the field defn_order. 7 28* 7 29* 83-05-23 Mike Kubicar : changed number_of_dups to fixed bin (35) since 7 30* that's what relation manager returns. 7 31* 7 32**/ 7 33 7 34 7 35 /* 7 36* this structure is allocated in the static area of 7 37* mdbm_rm_db_info.incl.pl1 once for each attribute per relation in 7 38* a readied file. it in turn points to 7 39* mdbm_rm_domain_info.incl.pl1 for the attributes domain. the 7 40* rm_attr_info is pointed to by mdbm_rm_rel_info.incl.pl1. all 7 41* structures are in the rm_db_info area. the attribute data 7 42* position within a tuple as stored in the data file are kept in 7 43* this resultant model of the attribute. 7 44* */ 7 45 7 46 dcl 1 rm_attr_info aligned based (rai_ptr), /* resultant attr. info */ 7 47 2 name char (32), /* from submodel */ 7 48 2 model_name char (32), /* from model */ 7 49 2 key_attr bit (1) unal, /* if key attribute */ 7 50 2 index_attr bit (1) unal, /* if secondary index */ 7 51 2 read_perm bit (1) unal, /* user has retr. permission */ 7 52 2 modify_perm bit (1) unal, /* user has modify permission */ 7 53 2 mdbm_secured bit (1) unal, /* on => database secured */ 7 54 2 reserved bit (30) unal, /* for future use */ 7 55 2 index_id bit (36) aligned, /* index id if index_attr */ 7 56 2 defn_order fixed bin, /* relative order in which attr is defined in the view */ 7 57 2 key_order fixed bin, /* relative order defined in prim. key */ 7 58 2 bit_length fixed bin (35), /* length if fixed, max. len. if var. */ 7 59 2 domain_ptr ptr, /* to domain info */ 7 60 2 number_of_dups fixed bin (35), /* if the attribute is indexed this will 7 61* be the number of duplicate values, exact 7 62* for a page_file database, an estimate for a vfile type */ 7 63 2 model_defn_order fixed bin; /* relative order in which attr is defined in the model */ 7 64 7 65 dcl rai_ptr ptr int automatic init (null ()); 7 66 7 67 /* END mdbm_rm_attr_info.incl.pl1 */ 7 68 7 69 146 147 8 1 /* BEGIN mrds_select_list.incl.pl1 -- jaw 10/20/78 */ 8 2 8 3 /* HISTORY: 8 4* 8 5* 81-06-01 Jim Gray : removed user len and type elements, 8 6* since mu_convert rather than assign_ is now used. 8 7* 8 8* 84-11-22 John Hergert: added fr_ptr 8 9* 8 10*/****^ HISTORY COMMENTS: 8 11* 1) change(86-07-17,Dupuis), approve(86-08-05,MCR7491), audit(86-08-08,Blair), 8 12* install(86-08-15,MR12.0-1127): 8 13* 85-11-22 Hergert: Added variable var_exists so that it may be kept 8 14* around per select expression (in sets) and when compiling. (mrds #158) 8 15* 2) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 8 16* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 8 17* For new parser, (and general readability) renamed sel_ptr to 8 18* select_list_ptr. 8 19* END HISTORY COMMENTS */ 8 20 8 21 8 22 dcl 1 select_list based (select_list_ptr), /* tabular representation of -select clause */ 8 23 2 num_vars fixed bin, /* number of free variables */ 8 24 2 mla_ptr ptr, /* pointer to array of move list pointers */ 8 25 2 fr_ptr ptr, /* pointer to free_raltions struct in mrds_dsl_select_clause */ 8 26 2 num_items fixed bin, /* number of attributes specified in select list */ 8 27 2 var_exists (36) bit(1), 8 28 2 item (mrds_data_$max_select_items refer (select_list.num_items)), 8 29 3 must_convert bit (1) unal, /* on if conversion required */ 8 30 3 key bit (1) unal, /* on if to be key attr. in temp. rel. */ 8 31 3 index bit (1) unal, /* on if index attribute in temp rel */ 8 32 3 reserved bit (33) unal, /* reserved for future use */ 8 33 3 var_index fixed bin, /* index of assoc. tuple variable */ 8 34 3 ai_ptr ptr, /* ptr to attr_info */ 8 35 3 user_desc_ptr ptr, /* to descriptor for user value */ 8 36 3 user_ptr ptr ; /* pointer to user's area */ 8 37 8 38 dcl select_list_ptr ptr int automatic init (null ()); 8 39 8 40 dcl 1 move_list_array (select_list.num_vars) based (select_list.mla_ptr), 8 41 2 var_index fixed bin, 8 42 2 ml_ptr ptr; 8 43 8 44 /* END mrds_select_list.incl.pl1 */ 8 45 148 149 9 1 /* BEGIN mrds_select_sets.incl.pl1 rdl, 2/27/79 */ 9 2 9 3 dcl 1 select_sets aligned based (ss_ptr), 9 4 2 dup_retain bit (1) unal, /* ON => duplicate selected tuples must be preserved */ 9 5 2 pad bit (35) unal, /* Resevered for furture use */ 9 6 2 domains (mrds_data_$max_select_items) char (32), /* domain name of each select item */ 9 7 2 nitems fixed bin, /* Number of items in this structure */ 9 8 2 items (nitems_init refer (select_sets.nitems)), 9 9 3 oper_flag bit (1) unal, /* On => this item is an operator */ 9 10 3 pad bit (35) unal, /* Reserved for future use */ 9 11 3 op_code fixed bin, /* Valid only if oper_flag id on 9 12* 1 -> union 9 13* 2 => intersection 9 14* 3 => Difference */ 9 15 3 range_ptr ptr, /* Valid only if oper_flag is OFF, these pointers are */ 9 16 3 select_ptr ptr, /* used by mrds_dsl_search */ 9 17 3 so_ptr ptr, 9 18 3 ti_ptr ptr; /* to tuple info structure for this block */ 9 19 9 20 9 21 dcl ss_ptr ptr; /* Pointer to the selected sets */ 9 22 dcl nitems_init fixed bin; 9 23 9 24 dcl UNION fixed bin internal static options (constant) init (1); 9 25 dcl INTERSECTION fixed bin internal static options (constant) init (2); 9 26 dcl DIFFERENCE fixed bin internal static options (constant) init (3); 9 27 9 28 /* END mrds_dsl_select_sets.incl.pl1 */ 9 29 150 151 10 1 /* BEGIN mdbm_descriptor.incl.pl1 -- jaw 5/31/78 */ 10 2 /* modified by Jim Gray - - Nov. 1979, to change type from fixed bin(5) to 10 3* unsigned fixed bin(6), so new packed decimal data types could be handled. 10 4* also the duplicate mrds_descriptor.incl.pl1 was eliminated. */ 10 5 10 6 dcl 1 descriptor based (desc_ptr), /* map of Multics descriptor */ 10 7 2 version bit (1) unal, /* DBM handles vers. 1 only */ 10 8 2 type unsigned fixed bin (6) unal, /* data type */ 10 9 2 packed bit (1) unal, /* on if data item is packed */ 10 10 2 number_dims bit (4) unal, /* dimensions */ 10 11 2 size, /* size for string data */ 10 12 3 scale bit (12) unal, /* scale for num. data */ 10 13 3 precision bit (12) unal, /* prec. for num. data */ 10 14 2 array_info (num_dims), 10 15 3 lower_bound fixed bin (35), /* lower bound of dimension */ 10 16 3 upper_bound fixed bin (35), /* upper bound of dimension */ 10 17 3 multiplier fixed bin (35); /* element separation */ 10 18 10 19 dcl desc_ptr ptr; 10 20 dcl num_dims fixed bin init (0) ; /* more useful form of number_dims */ 10 21 10 22 /* END mdbm_descriptor.incl.pl1 */ 10 23 10 24 152 153 11 1 /* *********************************************************** 11 2* * * 11 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 11 4* * * 11 5* *********************************************************** */ 11 6 /* BEGIN INCLUDE FILE - vu_typed_vector.incl.pl1 */ 11 7 11 8 /* Written by Lindsey Spratt, 04/02/82. 11 9*Modified: 11 10*09/01/82 by Lindsey Spratt: Changed value_ptr in simple_typed_vector to be 11 11* unaligned. Changed the type number of the simple_typed_vector to 11 12* "3" from "1". The OLD_SIMPLE_TYPED_VECTOR_TYPE is now an invalid 11 13* type. 11 14**/ 11 15 11 16 /* format: style2,ind3 */ 11 17 dcl 1 simple_typed_vector based (simple_typed_vector_ptr), 11 18 2 type fixed bin (17) unal, 11 19 2 number_of_dimensions 11 20 fixed bin (17) unal, 11 21 2 dimension (stv_number_of_dimensions refer (simple_typed_vector.number_of_dimensions)), 11 22 3 value_ptr ptr unaligned; 11 23 11 24 dcl 1 general_typed_vector based (general_typed_vector_ptr), 11 25 2 type fixed bin (17) unal, 11 26 2 number_of_dimensions 11 27 fixed bin (17) unal, 11 28 2 dimension (gtv_number_of_dimensions refer (general_typed_vector.number_of_dimensions)), 11 29 3 identifier fixed bin (17) unal, 11 30 3 pad bit (18) unal, 11 31 3 value_ptr ptr unal; 11 32 11 33 dcl simple_typed_vector_ptr 11 34 ptr; 11 35 dcl stv_number_of_dimensions 11 36 fixed bin (17); 11 37 11 38 dcl general_typed_vector_ptr 11 39 ptr; 11 40 dcl gtv_number_of_dimensions 11 41 fixed bin (17); 11 42 11 43 dcl ( 11 44 OLD_SIMPLE_TYPED_VECTOR_TYPE 11 45 init (1), /* value_ptr was aligned. */ 11 46 GENERAL_TYPED_VECTOR_TYPE 11 47 init (2), 11 48 SIMPLE_TYPED_VECTOR_TYPE 11 49 init (3) 11 50 ) fixed bin (17) internal static options (constant); 11 51 11 52 /* END INCLUDE FILE - vu_typed_vector.incl.pl1 */ 154 155 156 157 end mu_get_tuple; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/01/88 1300.0 mu_get_tuple.pl1 >special_ldd>install>MR12.2-1073>mu_get_tuple.pl1 134 1 10/14/83 1609.0 mrds_tuple_info.incl.pl1 >ldd>include>mrds_tuple_info.incl.pl1 136 2 08/01/88 1300.0 mrds_dbcb.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_dbcb.incl.pl1 138 3 08/01/88 1310.7 mdbm_rm_db_info.incl.pl1 >special_ldd>install>MR12.2-1073>mdbm_rm_db_info.incl.pl1 140 4 10/14/83 1609.1 mrds_range.incl.pl1 >ldd>include>mrds_range.incl.pl1 142 5 10/14/83 1609.1 mdbm_rm_rel_info.incl.pl1 >ldd>include>mdbm_rm_rel_info.incl.pl1 144 6 10/14/83 1609.1 mdbm_rm_domain_info.incl.pl1 >ldd>include>mdbm_rm_domain_info.incl.pl1 146 7 10/14/83 1609.1 mdbm_rm_attr_info.incl.pl1 >ldd>include>mdbm_rm_attr_info.incl.pl1 148 8 08/01/88 1300.0 mrds_select_list.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_select_list.incl.pl1 150 9 10/14/83 1608.4 mrds_select_sets.incl.pl1 >ldd>include>mrds_select_sets.incl.pl1 152 10 10/14/83 1608.6 mdbm_descriptor.incl.pl1 >ldd>include>mdbm_descriptor.incl.pl1 154 11 10/14/83 1609.1 vu_typed_vector.incl.pl1 >ldd>include>vu_typed_vector.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. I_area_ptr parameter pointer dcl 50 ref 20 56 I_dbcb_ptr parameter pointer dcl 49 ref 20 55 I_rmri_ptr parameter pointer dcl 51 ref 20 57 O_code parameter fixed bin(35,0) dcl 53 set ref 20 59* 109* X_t_ptr parameter pointer dcl 52 set ref 20 58 110* ai_ptr 12 based pointer array level 3 dcl 8-22 ref 95 area_ptr 000100 automatic pointer dcl 115 set ref 56* 75* 79* attr_ptrs based pointer array level 2 dcl 5-119 ref 94 data based structure level 2 dcl 2-142 dbcb based structure level 1 dcl 2-142 dbcb_data based structure level 1 unaligned dcl 2-148 dbcb_ptr 000120 automatic pointer dcl 2-146 set ref 55* 61 62 68 69 70 73 75* 79* defn_order 22 based fixed bin(17,0) level 2 dcl 7-46 ref 97 97 dimension 1 based structure array level 2 packed packed unaligned dcl 11-17 i 000102 automatic fixed bin(17,0) dcl 117 set ref 84* 85 87 94 95* icode 000103 automatic fixed bin(35,0) dcl 118 set ref 75* 79* 80 109 item 10 based structure array level 2 unaligned dcl 8-22 items based structure array level 2 dcl 9-3 j 000104 automatic fixed bin(17,0) dcl 119 set ref 89* 89* 92 mrds_data_$max_attributes 000010 external static fixed bin(35,0) dcl 120 ref 88 88 88 mrds_data_$max_id_len 000012 external static fixed bin(35,0) dcl 121 ref 88 88 88 mrds_data_$max_select_items 000014 external static fixed bin(35,0) dcl 122 ref 63 64 65 mrds_dsl_retrieve$set_tuple 000016 constant entry external dcl 123 ref 75 mrds_dsl_search 000020 constant entry external dcl 124 ref 79 nkey_attr 24 based fixed bin(17,0) level 2 dcl 5-119 ref 94 null builtin function dcl 125 ref 61 73 6-51 7-65 8-38 num_dims 000136 automatic fixed bin(17,0) initial dcl 10-20 set ref 10-20* num_items 6 based fixed bin(17,0) level 2 dcl 8-22 ref 82 84 num_tuples based fixed bin(17,0) level 2 dcl 1-10 ref 89 number_of_dimensions 0(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 11-17 set ref 82* old_vi 000105 automatic fixed bin(17,0) dcl 126 set ref 81* 85 87* 88 89 rai_ptr 000130 automatic pointer initial dcl 7-65 set ref 95* 7-65* range based structure level 1 dcl 4-5 range_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "mu_get_tuple" ref 64 range_ptr 2 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "mu_get_tuple" ref 68 range_ptr 000122 automatic pointer dcl 4-23 in procedure "mu_get_tuple" set ref 64* 68* 88 rdi_ptr 000126 automatic pointer initial dcl 6-51 set ref 6-51* ri_ptr based pointer array level 3 dcl 4-5 ref 88 rip 000106 automatic pointer dcl 128 set ref 88* rm_attr_info based structure level 1 dcl 7-46 rm_db_info_data based structure level 1 unaligned dcl 3-92 rm_rel_info based structure level 1 dcl 5-119 rmri_ptr 000124 automatic pointer dcl 5-156 set ref 57* 94 select_list based structure level 1 unaligned dcl 8-22 select_list_ptr 000132 automatic pointer initial dcl 8-38 set ref 63* 69* 82 84 85 87 95 8-38* select_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "mu_get_tuple" ref 63 select_ptr 4 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "mu_get_tuple" ref 69 select_sets based structure level 1 dcl 9-3 simple_typed_vector based structure level 1 packed packed unaligned dcl 11-17 simple_typed_vector_ptr 000140 automatic pointer dcl 11-33 set ref 58* 75* 82 97 110 sraip 000110 automatic pointer dcl 129 set ref 95* 97 ss_ptr 000134 automatic pointer dcl 9-21 in procedure "mu_get_tuple" set ref 62* 63 64 65 ss_ptr 20 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "mu_get_tuple" ref 61 62 73 st_ptr 000112 automatic pointer dcl 130 set ref 92* 97 ti_ptr 000116 automatic pointer dcl 1-17 in procedure "mu_get_tuple" set ref 65* 70* 89 89 92 ti_ptr 12 based pointer level 3 in structure "dbcb" dcl 2-142 in procedure "mu_get_tuple" ref 70 ti_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "mu_get_tuple" ref 65 traip 000114 automatic pointer dcl 132 set ref 94* 97 tup_var 2 based structure array level 2 dcl 4-5 tuple 2 based structure array level 2 dcl 1-10 tuple_info based structure level 1 dcl 1-10 tuple_ptr 2 based pointer array level 3 dcl 1-10 ref 92 value_ptr 1 based pointer array level 3 packed packed unaligned dcl 11-17 set ref 97* 97 var_index 11 based fixed bin(17,0) array level 3 in structure "select_list" dcl 8-22 in procedure "mu_get_tuple" ref 85 87 var_index 5 based fixed bin(17,0) array level 3 in structure "tuple_info" dcl 1-10 in procedure "mu_get_tuple" ref 89 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DIFFERENCE internal static fixed bin(17,0) initial dcl 9-26 GENERAL_TYPED_VECTOR_TYPE internal static fixed bin(17,0) initial dcl 11-43 INTERSECTION internal static fixed bin(17,0) initial dcl 9-25 OLD_SIMPLE_TYPED_VECTOR_TYPE internal static fixed bin(17,0) initial dcl 11-43 SIMPLE_TYPED_VECTOR_TYPE internal static fixed bin(17,0) initial dcl 11-43 UNION internal static fixed bin(17,0) initial dcl 9-24 addr builtin function dcl 114 desc_ptr automatic pointer dcl 10-19 descriptor based structure level 1 unaligned dcl 10-6 fixed builtin function dcl 116 general_typed_vector based structure level 1 packed packed unaligned dcl 11-24 general_typed_vector_ptr automatic pointer dcl 11-38 gtv_number_of_dimensions automatic fixed bin(17,0) dcl 11-40 move_list_array based structure array level 1 unaligned dcl 8-40 natts_init automatic fixed bin(17,0) dcl 5-157 nitems_init automatic fixed bin(17,0) dcl 9-22 nkey_attr_init automatic fixed bin(17,0) dcl 5-157 nvar_atts_init automatic fixed bin(17,0) dcl 5-157 rdbi_ptr automatic pointer dcl 3-90 rel builtin function dcl 127 rm_db_info based structure level 1 dcl 3-86 rm_domain_info based structure level 1 dcl 6-35 stv_number_of_dimensions automatic fixed bin(17,0) dcl 11-35 sys_info$max_seg_size external static fixed bin(35,0) dcl 131 ti_ntuples_init automatic fixed bin(17,0) dcl 1-18 NAMES DECLARED BY EXPLICIT CONTEXT. exit 000315 constant label dcl 112 mu_get_tuple 000011 constant entry external dcl 20 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 416 440 316 426 Length 1062 316 22 406 77 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mu_get_tuple 114 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mu_get_tuple 000100 area_ptr mu_get_tuple 000102 i mu_get_tuple 000103 icode mu_get_tuple 000104 j mu_get_tuple 000105 old_vi mu_get_tuple 000106 rip mu_get_tuple 000110 sraip mu_get_tuple 000112 st_ptr mu_get_tuple 000114 traip mu_get_tuple 000116 ti_ptr mu_get_tuple 000120 dbcb_ptr mu_get_tuple 000122 range_ptr mu_get_tuple 000124 rmri_ptr mu_get_tuple 000126 rdi_ptr mu_get_tuple 000130 rai_ptr mu_get_tuple 000132 select_list_ptr mu_get_tuple 000134 ss_ptr mu_get_tuple 000136 num_dims mu_get_tuple 000140 simple_typed_vector_ptr mu_get_tuple THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mrds_dsl_retrieve$set_tuple mrds_dsl_search THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_data_$max_attributes mrds_data_$max_id_len mrds_data_$max_select_items LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 20 000004 6 51 000016 7 65 000020 8 38 000021 10 20 000022 55 000023 56 000027 57 000032 58 000035 59 000040 61 000041 62 000045 63 000047 64 000060 65 000063 66 000066 68 000067 69 000071 70 000073 73 000075 75 000102 76 000116 79 000117 80 000131 81 000133 82 000134 84 000144 85 000153 87 000161 88 000163 89 000224 91 000241 92 000243 94 000250 95 000262 97 000270 104 000306 109 000310 110 000313 112 000315 ----------------------------------------------------------- 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