COMPILATION LISTING OF SEGMENT rmdb_init_file_model Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/16/86 1348.9 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 8 rmdb_init_file_model: proc (I_dbm_ptr, I_fm_ptr, O_err_msg, O_err_code); 9 10 /* BEGIN_DESCRIPTION 11* This procedure provided a pointer to the segment to be used as the file_model 12* initializes the file_model structure and the associated rel_info structure. 13* END_DESCRIPTION 14**/ 15 16 /* HISTORY 17*82-06-01 Create by Roger Lackey 18**/ 19 20 dcl I_dbm_ptr pointer parameter; /* Pointer to db_model */ 21 dcl I_fm_ptr pointer parameter; /* Pointer to based of file_model seg */ 22 dcl O_err_msg char (*) parameter;/* Text of returned error message */ 23 dcl O_err_code fixed bin (35) parameter; /* Error code */ 24 25 O_err_msg = ""; 26 O_err_code = 0; 27 dbm_ptr = I_dbm_ptr; 28 fm_ptr = I_fm_ptr; 29 30 /* Derive file_name from fm_ptr (file_model segment pointer) */ 31 32 call hcs_$fs_get_path_name (fm_ptr, dir, ldn, file_name, code); 33 if code ^= 0 then do; 34 O_err_msg = "Getting file_model_pathname "; 35 O_err_code = code; 36 return; 37 end; 38 39 rel_name = before (file_name, ".m"); /* Rel_name is file name without the .m suffix */ 40 41 like_file_model = init_file_model; /* initialize all but file_model area */ 42 file_model.fm_area = empty (); /* initialize file_model area */ 43 44 file_model.changer_ptr = db_model.changer_ptr; 45 46 call load_rel_info; 47 48 exit: return; 49 50 /* * * * * * * * * * * * * * * * load_rel_info * * * * * * * * * * */ 51 52 load_rel_info: procedure (); 53 54 /* routine to allocate and initialize the rel_info structure for 55* the current relation in this file, using the file model area, 56* and updating the file_model and global file element as necessary */ 57 58 59 allocate rel_info in (fm_area) set (ri_ptr); 60 61 file_model.rel_ptr = rel (ri_ptr); 62 63 /* initialize relation detailed information */ 64 65 rel_info = init_rel_info; /* copy template */ 66 rel_info.name = rel_name; 67 rel_info.changer_ptr = db_model.changer_ptr; 68 69 end load_rel_info; 70 71 dcl addr builtin; 72 dcl before builtin; 73 dcl code fixed bin (35); 74 dcl dir char (168); 75 dcl empty builtin; 76 dcl file_name char (32); 77 dcl fixed builtin; 78 dcl hcs_$fs_get_path_name entry (ptr, char (*), fixed bin, char (*), fixed bin (35)); 79 dcl ldn fixed bin; 80 dcl rel builtin; 81 dcl rel_name char (32); 82 dcl sys_info$max_seg_size fixed bin (35) external; /* system constant */ 83 1 1 /* BEGIN INCLUDE FILE mdbm_file_model.incl.pl1 -- jaw, 8/29/78 */ 1 2 1 3 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(79-02-01,JGray), approve(), audit(), install(): 1 6* modified to save space occupied by model 1 7* 2) change(82-05-19,Davids), approve(), audit(), install(): 1 8* renamed rel_info.nsec_inds to rel_info.unused_3 because it really wasn't 1 9* the number of secondary indices in the relation - it was always zero. 1 10* 3) change(82-08-19,DWoodka), approve(), audit(), install(): 1 11* changed rel_info.id and attr_info.index_id to bit (36) unaligned for the 1 12* DMS conversion. 1 13* 4) change(82-09-20,MKubicar), approve(), audit(), install(): 1 14* changed rel_info.id and attr_info.index_id to aligned; they are needed that 1 15* way for relmgr_ calls. Also added rel_info.primary_key_index_id, needed 1 16* for relation manager changes. 1 17* 5) change(85-12-02,Spitzer), approve(85-12-02,MCR7311), 1 18* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 1 19* used 2 reserved bits to indicate whether the copy of the .m and/or 1 20* files are good (for rmdb) 1 21* END HISTORY COMMENTS */ 1 22 1 23 1 24 /* each file in the database will have a model segment with the name 1 25* file_name.m (i.e. the files name plus a suffix of ".m") 1 26* the file_model structure is allocated at the base of the segment for a given file. 1 27* it contains an area with which all other structures in this include file are allocated. 1 28* these structures contain the information about which relations, foreign keys, 1 29* and attributes are members of this file. all lists are singly linked lists in 1 30* definition order. pointers to these structures are obtained by using the "pointer" 1 31* builtin function with arguments of the segment base pointer, and the 1 32* offset (bit (18)) relative to that pointer that is actually stored in 1 33* the file model itself. this is because pointer segment numbers are 1 34* per process dependent. the major lists pointed to by the file_model structure 1 35* are the list of relations in this file(each with a contained attribute list), 1 36* and the list of foreign keys whose parent relation resides in this file 1 37* (along with a participating attribute sublist, and the child relation list, 1 38* if they are also in this file) */ 1 39 1 40 dcl 1 file_model aligned based (fm_ptr), /* base of segment */ 1 41 2 temporary bit (1) unal, /* on if file not part of db. */ 1 42 2 procedures_present bit (1) unal, /* on => ids procedures present */ 1 43 2 file_model_copy_good bit (1) unaligned, /* on => .m file is the good copy */ 1 44 2 relation_copy_good bit (1) unaligned, /* on => file is the good copy */ 1 45 2 reserved bit (32) unal, /* reserved for future flags */ 1 46 2 max_tuples fixed bin (35), /* max no. of tuples in file */ 1 47 2 num_blocks fixed bin (35), /* number of blocks in file */ 1 48 2 num_buckets fixed bin (35), /* number of buckets in file */ 1 49 2 pad_1 fixed bin (35), /* for future use */ 1 50 2 pad_2 fixed bin (35), 1 51 2 ratd_len fixed bin (21), /* length of above */ 1 52 2 mratd_len fixed bin (21), /* length of above */ 1 53 2 uatd_len fixed bin (21), /* char. length of update attach desc. */ 1 54 2 latd_len fixed bin (21), /* char. len. of attach desc. */ 1 55 2 sratd_len fixed bin (21), /* char. length of above attach desc. */ 1 56 2 suatd_len fixed bin (21), /* char. length of attach desc. */ 1 57 2 file_type unal fixed bin, /* 1 => unblocked, 2 => blocked */ 1 58 2 block_size unal fixed bin, /* no. pages in block */ 1 59 2 block_factor unal fixed bin, /* no. tuple slots per block */ 1 60 2 bucket_density unal fixed bin, /* no. of bucket headers per block, neg. => blocks per header */ 1 61 2 tuple_id_len unal fixed bin, /* no. bits needed for local tuple id */ 1 62 2 num_rels unal fixed bin, /* number of relations in file */ 1 63 2 num_links unal fixed bin, /* number of links in file */ 1 64 2 num_children unal fixed bin, /* count of all child_link_infos in this file */ 1 65 2 default_rbs (3) unal fixed bin (8), /* file ring brackets when not MDBM-secured */ 1 66 2 rel_ptr unal bit (18), /* to first of list of rel_infos */ 1 67 2 link_ptr unal bit (18), /* to first in list of parent link_infos */ 1 68 2 children_ptr unal bit (18), /* to list of all child_link_infos in this file model */ 1 69 2 cno_array_ptr unal bit (18), /* pointer to array of data component numbers */ 1 70 2 fi_ptr unal bit (18), /* offset to file_info in db_model */ 1 71 2 suatd_ptr unal bit (18), /* offset of scope_update attach desc. */ 1 72 2 sratd_ptr unal bit (18), /* offset of scope_retrieve attach desc. */ 1 73 2 latd_ptr unal bit (18), /* offset of load attach desc. */ 1 74 2 uatd_ptr unal bit (18), /* offset of update attach description for file */ 1 75 2 mratd_ptr unal bit (18), /* offset of moniter-retrieve attach desc. */ 1 76 2 ratd_ptr unal bit (18), /* offset of retrieve attach desc. */ 1 77 2 open_eu_before_path_ptr unal bit (18), /* paths and ents of file procs. */ 1 78 2 open_eu_err_path_ptr unal bit (18), 1 79 2 open_eu_after_path_ptr unal bit (18), 1 80 2 open_er_before_path_ptr unal bit (18), 1 81 2 open_er_err_path_ptr unal bit (18), 1 82 2 open_er_after_path_ptr unal bit (18), 1 83 2 open_neu_before_path_ptr unal bit (18), /* paths and ents of file procs. */ 1 84 2 open_neu_err_path_ptr unal bit (18), 1 85 2 open_neu_after_path_ptr unal bit (18), 1 86 2 open_ner_before_path_ptr unal bit (18), 1 87 2 open_ner_err_path_ptr unal bit (18), 1 88 2 open_ner_after_path_ptr unal bit (18), 1 89 2 open_pu_before_path_ptr unal bit (18), 1 90 2 open_pu_err_path_ptr unal bit (18), 1 91 2 open_pu_after_path_ptr unal bit (18), 1 92 2 open_pr_before_path_ptr unal bit (18), 1 93 2 open_pr_err_path_ptr unal bit (18), 1 94 2 open_pr_after_path_ptr unal bit (18), 1 95 2 open_cu_before_path_ptr unal bit (18), 1 96 2 open_cu_err_path_ptr unal bit (18), 1 97 2 open_cu_after_path_ptr unal bit (18), 1 98 2 open_cr_before_path_ptr unal bit (18), 1 99 2 open_cr_err_path_ptr unal bit (18), 1 100 2 open_cr_after_path_ptr unal bit (18), 1 101 2 close_before_path_ptr unal bit (18), 1 102 2 close_err_path_ptr unal bit (18), 1 103 2 close_after_path_ptr unal bit (18), 1 104 2 unused_1 unal bit (18), /* for future expansion */ 1 105 2 unused_2 unal bit (18), 1 106 2 changer_ptr unal bit (18), /* pointer to changer_id, changer_time structure */ 1 107 2 fm_area area (sys_info$max_seg_size - fixed (rel (addr (file_model.fm_area))) - 1); 1 108 dcl fm_ptr ptr; 1 109 dcl atd char (atd_len) based (atd_ptr); /* attach description for each file ready mode */ 1 110 dcl atd_ptr ptr; 1 111 dcl atd_len fixed bin; 1 112 dcl 1 comp_no_array unal based (cna_ptr), /* ordered array of data comp. nos. */ 1 113 2 ncomponents fixed bin, 1 114 2 comp_no (ncomp_init refer (comp_no_array.ncomponents)) fixed bin; 1 115 dcl cna_ptr ptr; 1 116 dcl ncomp_init fixed bin; 1 117 1 118 /* a rel_info structure contains information describing a relation. 1 119* a relation may only occur in one file, thus there is one rel_info 1 120* per relation per database, each stored in the file_model area for 1 121* the file that contains it. the list of rel_info's in this file 1 122* form a singly linked list in definition order. 1 123* the rel_info itself points to a list of the attributes it contains, 1 124* and to any parent_link or child_link info's that involve it in a foreign key */ 1 125 1 126 dcl 1 rel_info aligned based (ri_ptr), 1 127 2 name char (32), /* relation name */ 1 128 2 id bit (36) aligned, /* relation id number */ 1 129 2 hashed bit (1) unal, /* on if hashed */ 1 130 2 duplicates bit (1) unal, /* on if allow dup. hash fields */ 1 131 2 via_link bit (1) unal, /* on if to be stored by parent */ 1 132 2 system bit (1) unal, /* on if dont care how stored */ 1 133 2 indexed bit (1) unal, /* on if secondary index */ 1 134 2 mrds_update bit (1) unal, /* on if updateable by MRDS */ 1 135 2 mrds_retrieve bit (1) unal, /* on if retrievable by MRDS */ 1 136 2 virtual bit (1) unal, /* if virtual relation, mapped on IDS records */ 1 137 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 1 138 2 reserved bit (27) unal, /* for future flags */ 1 139 2 num_attr unal fixed bin, /* number of attributes (all levels) defined */ 1 140 2 num_links_child unal fixed bin, /* no. links in which child */ 1 141 2 num_links_par unal fixed bin, /* no. links_in which parent */ 1 142 2 max_attr_index_id unal fixed bin, /* max index id used by attr in this rel or PLI */ 1 143 2 num_key_attrs unal fixed bin, /* number of attributes in primary key for this rel */ 1 144 2 nvar_atts unal fixed bin, /* no. varying len. attributes */ 1 145 2 n36_thds unal fixed bin, /* no. of 36-bit threads */ 1 146 2 n27_thds unal fixed bin, /* no of 27-bit threads */ 1 147 2 n18_thds unal fixed bin, /* no of 18-bit threads */ 1 148 2 unused_3 unal fixed bin, /* element that was never used */ 1 149 2 max_data_len fixed bin (35), /* max length of data portion of tuple */ 1 150 2 avg_data_len fixed bin (35), /* average length of tuple data portion */ 1 151 2 max_key_len fixed bin (35), /* max key length if not hashed */ 1 152 2 var_offset fixed bin (35), /* position of first varying attr. */ 1 153 2 max_tuples fixed bin (35), /* max no. tuples if blocked file */ 1 154 2 fwd_thread unal bit (18), /* offsset to next rel. in file */ 1 155 2 attr_ptr unal bit (18), /* to attr. info */ 1 156 2 primary_key_index_id bit (36) aligned, /* index id of the relation's primary key */ 1 157 2 clink_ptr unal bit (18), /* offset to child info of link determining location */ 1 158 2 map_ptr unal bit (18), /* pointer to mapping info if virtual rel. */ 1 159 2 sec_ind_ptr unal bit (18), /* ptr to list of sec. ind. infos, init. not used */ 1 160 2 locator_proc_path_ptr unal bit (18), /* proc to determ. location */ 1 161 2 link_before_path_ptr unal bit (18), /* op. proc. paths and entries */ 1 162 2 link_err_path_ptr unal bit (18), 1 163 2 link_after_path_ptr unal bit (18), 1 164 2 unlk_before_path_ptr unal bit (18), 1 165 2 unlk_err_path_ptr unal bit (18), 1 166 2 unlk_after_path_ptr unal bit (18), 1 167 2 str_before_path_ptr unal bit (18), 1 168 2 str_err_path_ptr unal bit (18), 1 169 2 str_after_path_ptr unal bit (18), 1 170 2 del_before_path_ptr unal bit (18), 1 171 2 del_err_path_ptr unal bit (18), 1 172 2 del_after_path_ptr unal bit (18), 1 173 2 mod_before_path_ptr unal bit (18), 1 174 2 mod_err_path_ptr unal bit (18), 1 175 2 mod_after_path_ptr unal bit (18), 1 176 2 find_before_path_ptr unal bit (18), 1 177 2 find_err_path_ptr unal bit (18), 1 178 2 find_after_path_ptr unal bit (18), 1 179 2 retr_before_path_ptr unal bit (18), 1 180 2 retr_err_path_ptr unal bit (18), 1 181 2 retr_after_path_ptr unal bit (18), 1 182 2 unused_1 unal bit (18), /* for future expansion */ 1 183 2 unused_2 unal bit (18), 1 184 2 changer_ptr unal bit (18) ; /* pointer to changer_id, changer_time structure */ 1 185 dcl ri_ptr ptr; 1 186 1 187 /* a attr_info structure contains information about an attribute in a given relation. 1 188* since attributes may appear in more than one relation, each occurence of an attribute 1 189* means that an attr_info for it will be put in that relations sublist of attributes. 1 190* the list is singly linked in definition order. the attr_info describes 1 191* the data it represents, and how that data is used during a database search. */ 1 192 dcl 1 attr_info aligned based (ai_ptr), /* info for a single attr. in attr. list */ 1 193 2 name char (32), /* name of attribute */ 1 194 2 key_attr bit (1) unal, /* on if part of primary or hash key */ 1 195 2 index_attr bit (1) unal, /* on if a secondary index */ 1 196 2 link_attr bit (1) unal, /* on if participates in link */ 1 197 2 reserved bit (33) unal, 1 198 2 index_id bit (36) aligned, /* id of index if index attr. */ 1 199 2 defn_order unal fixed bin, /* relative posit. in which defined */ 1 200 2 key_order unal fixed bin, /* relative posit. in key */ 1 201 2 bit_offset fixed bin (35), /* position in tuple */ 1 202 2 bit_length fixed bin (35), /* length if fixed */ 1 203 2 link_child_cnt fixed bin, /* number of uses of attr in child rel of link */ 1 204 2 link_par_cnt fixed bin, /* number of uses of attr in parent rel of link */ 1 205 2 domain_ptr unal bit (18), /* to domain info */ 1 206 2 rslt_ptr unal bit (18), /* ptr to info for "result" clause */ 1 207 2 fwd_thread unal bit (18), /* to next in list */ 1 208 2 changer_ptr unal bit (18) ; /* pointer to changer_id and changer_time */ 1 209 dcl ai_ptr ptr; 1 210 1 211 /* a parent_link_info structure is the carrier of foreign key definition info. 1 212* each time a foreign key definition indicates a relation as it's parent, 1 213* that relation will get a parent_link_info put in a list of associated parent_link_info's. 1 214* a relation can be parent and/or child in any number of foreign keys. 1 215* the parent_link_info structure describes the foreign key, and also points 1 216* to a list of the attributes that participate in this foreign key. 1 217* (this could be from 1 up to all attributes in the relation) 1 218* the attr_list structures are in a singly linked list in definition order 1 219* for this purpose. also pointed to is a list of child_link_info's 1 220* that describe the child relations in this foreign key. since foreign keys 1 221* may span files, not all related child_link_info's have to be in this file's 1 222* model area. */ 1 223 dcl 1 parent_link_info aligned based (pli_ptr), /* gen'l link info, appears in each area spanned by link parent */ 1 224 2 name char (32), /* name of link */ 1 225 2 singular bit (1) unal, /* on if system owned link */ 1 226 2 temp bit (1) unal, /* on if temp. order */ 1 227 2 first bit (1) unal, /* insertion indicators */ 1 228 2 last bit (1) unal, 1 229 2 next bit (1) unal, 1 230 2 prior bit (1) unal, 1 231 2 sort_rel_name bit (1) unal, /* sort -- relation name */ 1 232 2 sort_keys bit (1) unal, /* sort -- defined keys */ 1 233 2 dup_first bit (1) unal, /* duplicates first */ 1 234 2 dup_last bit (1) unal, /* duplicates last */ 1 235 2 indexed bit (1) unal, /* locate parent via index */ 1 236 2 hashed bit (1) unal, /* locate parent via hashed primary key */ 1 237 2 thread_36 bit (1) unal, /* thread size indicators */ 1 238 2 thread_27 bit (1) unal, 1 239 2 thread_18 bit (1) unal, 1 240 2 clustered bit (1) unal, /* ON => cluster option specified for this link */ 1 241 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 1 242 2 reserved bit (19) unal, /* reserved for future flags */ 1 243 2 index_id aligned bit (8), /* id of index if indexed */ 1 244 2 thread_index unal fixed bin, /* index to threads in parent */ 1 245 2 nsel_attr unal fixed bin, /* no. attr. determ. parent */ 1 246 2 n_children unal fixed bin, /* no. children in link */ 1 247 2 child_fn char (30), /* file name for first child in list */ 1 248 2 parent_ptr unal bit (18), /* to parent relation info in file model */ 1 249 2 child_ptr unal bit (18), /* to list of child info ptrs */ 1 250 2 sel_attr_ptr unal bit (18), /* to first in list of attr. determ. parent */ 1 251 2 fwd_thread unal bit (18), /* thread to next parent link info in file */ 1 252 2 rel_fwd_thread unal bit (18), /* for multiple links within a relation */ 1 253 2 sort_before_path_ptr unal bit (18), /* proc. paths and entries */ 1 254 2 sort_err_path_ptr unal bit (18), 1 255 2 sort_after_path_ptr unal bit (18), 1 256 2 srch_before_path_ptr unal bit (18), 1 257 2 srch_err_path_ptr unal bit (18), 1 258 2 srch_after_path_ptr unal bit (18), 1 259 2 link_before_path_ptr unal bit (18), 1 260 2 link_err_path_ptr unal bit (18), 1 261 2 link_after_path_ptr unal bit (18), 1 262 2 unlk_before_path_ptr unal bit (18), 1 263 2 unlk_err_path_ptr unal bit (18), 1 264 2 unlk_after_path_ptr unal bit (18), 1 265 2 unused_1 unal bit (18), /* for future expansion */ 1 266 2 unused_2 unal bit (18), 1 267 2 changer_ptr unal bit (18) ; /* pointer to changer_id, changer_time structure */ 1 268 dcl pli_ptr ptr; 1 269 1 270 /* a child_link_info structure is the counter part of a parent_link_info 1 271* for foreign key child relations. each time a relation is defined to be 1 272* a child in a foreign key, it's list of child_link_infos will be added to. 1 273* this list is singly linked in foreign key definition order. 1 274* the child_link_info points to a list of participating attributes from the 1 275* child relation by means of a singly linked list of attr_list structures 1 276* in definition order. the number of attributes in the parent attr_list 1 277* and the child attr_list lists are the same with corresponding attr_list 1 278* attributes having the same domain. all child_link_infos in this file 1 279* are on a seperately linked list. this may not include all 1 280* child_link_infos for foreign keys whose parent relation resides in this file, 1 281* since foreign keys may span files, and the child_link_info will 1 282* reside in the file containing it's associated relation_info. */ 1 283 dcl 1 child_link_info aligned based (cli_ptr), /* in same files as children */ 1 284 2 link_name char (32), /* name of foreign key involving parent relation for this child */ 1 285 2 mandatory bit (1) unal, /* on if membership mandatory */ 1 286 2 fixed bit (1) unal, /* on if membership fixed */ 1 287 2 optional bit (1) unal, /* on if membership optional */ 1 288 2 auto bit (1) unal, /* on if insertion automatic */ 1 289 2 manual bit (1) unal, /* on if insertion manual */ 1 290 2 struct_const bit (1) unal, /* on if membership constrained by attr. comp. */ 1 291 2 range_sel bit (1) unal, /* on if range type selection */ 1 292 2 key_dup_first bit (1) unal, /* sort key flags */ 1 293 2 key_dup_last bit (1) unal, 1 294 2 key_null bit (1) unal, /* on if null allowed */ 1 295 2 sel_system bit (1) unal, /* selection criteria flags */ 1 296 2 sel_current bit (1) unal, 1 297 2 sel_key bit (1) unal, 1 298 2 sel_proc bit (1) unal, 1 299 2 no_null bit (1) unal, /* if null key values not allowed */ 1 300 2 reserved bit (21) unal, 1 301 2 thread_index unal fixed bin, /* index to thread in tuple */ 1 302 2 chain_len unal fixed bin, /* no. "then-thru's" in selction crit. */ 1 303 2 n_sort_keys unal fixed bin, /* no. attr. in sort key */ 1 304 2 n_sel_items unal fixed bin, /* no. items to sel for link sel. */ 1 305 2 n_dup_prevs unal fixed bin, /* no. attr. for dup prev. */ 1 306 2 link_fwd_fn char (30), /* file name for next child info in link */ 1 307 2 parent_fn char (30), /* file name for parent info */ 1 308 2 parent_ptr unal bit (18), /* offset to parent link info */ 1 309 2 link_fwd_thread unal bit (18), /* offset for next child in link */ 1 310 2 rel_info_ptr unal bit (18), /* to corresponding rel info */ 1 311 2 dup_prev_ptr unal bit (18), /* list of attrs. for dup. prev. */ 1 312 2 sel_ptr unal bit (18), /* list of attr. for link sel. */ 1 313 2 rel_fwd_thread unal bit (18), /* for multiple links within a relation */ 1 314 2 child_fwd_thread unal bit (18), /* pointer to next in list of all child_link_infos in this file */ 1 315 2 sort_key_ptr unal bit (18), /* list of sort keys */ 1 316 2 chain_ptr unal bit (18), /* to "then thru" list */ 1 317 2 sel_proc_path_ptr unal bit (18), /* link selection proc. */ 1 318 2 link_before_path_ptr unal bit (18), /* proc. paths and entries */ 1 319 2 link_err_path_ptr unal bit (18), 1 320 2 link_after_path_ptr unal bit (18), 1 321 2 unlk_before_path_ptr unal bit (18), 1 322 2 unlk_err_path_ptr unal bit (18), 1 323 2 unlk_after_path_ptr unal bit (18), 1 324 2 srch_before_path_ptr unal bit (18), 1 325 2 srch_err_path_ptr unal bit (18), 1 326 2 srch_after_path_ptr unal bit (18), 1 327 2 unused_1 unal bit (18), /* for future expansion */ 1 328 2 unused_2 unal bit (18) ; 1 329 dcl cli_ptr ptr; 1 330 1 331 /* the attr_list structure is associated with the parent_link_info 1 332* and child_link_info structures to represent by means of a singly linked list 1 333* the participating attributes from relations in a foreign key. 1 334* the parent_link_info has a list for the parent relation, 1 335* and the child_link_info has a list for the child relation. 1 336* the participating attributes are a subset(not necessary proper) of 1 337* those attributes contained in a relation definition. 1 338* there are equal numbers of attr_list structures in the parent and 1 339* child lists of the same foreign key. the corresponding attributes in these 1 340* lists must have the same domain. */ 1 341 dcl 1 attr_list aligned based (al_ptr), /* general attr. list */ 1 342 2 attr_fn char (30), /* file name for attr. */ 1 343 2 attr_ptr unal bit (18), /* to attr info block */ 1 344 2 fwd_thread unal bit (18); /* to next in list */ 1 345 dcl al_ptr ptr; 1 346 dcl 1 sort_key aligned based (sk_ptr), /* entry in sort key list */ 1 347 2 ascend bit (1) unal, /* ascending order */ 1 348 2 descend bit (1) unal, /* descending order */ 1 349 2 reserved bit (34) unal, 1 350 2 attr_ptr unal bit (18), /* to attr info */ 1 351 2 fwd_thread unal bit (18); /* to next in list */ 1 352 dcl sk_ptr ptr; 1 353 dcl 1 dup_prev aligned based (dp_ptr), /* dup. prevention list entry */ 1 354 2 attr_ptr unal bit (18), /* to attr info */ 1 355 2 fwd_thread unal bit (18); /* to next in list */ 1 356 dcl dp_ptr ptr; 1 357 dcl 1 select_chain aligned based (sc_ptr), /* "then thru" list entry */ 1 358 2 link_fn char (30), /* file name for thru link */ 1 359 2 link_ptr unal bit (18), /* to parent link info */ 1 360 2 parent_attr_ptr unal bit (18), /* to parent ident. attr. list */ 1 361 2 comp_proc_path_ptr unal bit (18), /* comparison procedure */ 1 362 2 comp_attr_fn char (30), /* file name for comparison attr. */ 1 363 2 comp_attr_ptr unal bit (18), /* to comparison attr list */ 1 364 2 fwd_thread unal bit (18); /* to next in chain */ 1 365 dcl sc_ptr ptr; 1 366 1 367 /* END INCLUDE FILE mdbm_file_model.incl.pl1 */ 1 368 1 369 84 85 2 1 /* BEGIN INCLUDE FILE mdbm_file_model_init.incl.pl1 -- rbh 6/22/82 */ 2 2 2 3 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(82-10-12,DWoodka), approve(), audit(), install(): 2 7* Modified for DMS conversion - added primary_key_index_id to init_rel_info, 2 8* and changed init_rel_info.id to be bit (36) instead of bit (12). Deleted 2 9* child_link_ptr and parent_link_ptr, no longer needed. 2 10* 2) change(85-12-03,Spitzer), approve(85-12-03,MCR7311), 2 11* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 2 12* added (file_model relation)_copy_good fields for rmdb. 2 13* END HISTORY COMMENTS */ 2 14 2 15 2 16 /* From mdbm_file_model.incl.pl1 */ 2 17 2 18 dcl 1 init_file_model aligned internal static options (constant), /* base of segment */ 2 19 2 temporary bit (1) unal init ("0"b), /* on if file not part of db. */ 2 20 2 procedures_present bit (1) unal init ("0"b), /* on => ids procedures present */ 2 21 2 file_model_copy_good bit (1) unaligned init ("0"b), /* on => .m file is the good copy */ 2 22 2 relation_copy_good bit (1) unaligned init ("0"b), /* on => file is the good copy */ 2 23 2 reserved bit (32) unal init ("0"b), /* reserved for future flags */ 2 24 2 max_tuples fixed bin (35) init (0), /* not used */ 2 25 2 num_blocks fixed bin (35) init (0), /* not used */ 2 26 2 num_buckets fixed bin (35) init (0), /* not used */ 2 27 2 pad_1 fixed bin (35) init (0), /* for future use */ 2 28 2 pad_2 fixed bin (35) init (0), 2 29 2 30 2 ratd_len fixed bin (21) init (0), /* useless garbage */ 2 31 2 mratd_len fixed bin (21) init (0), /* useless garbage */ 2 32 2 uatd_len fixed bin (21) init (0), /* useless garbage */ 2 33 2 latd_len fixed bin (21) init (0), /* useless garbage */ 2 34 2 sratd_len fixed bin (21) init (0), /* useless garbage */ 2 35 2 suatd_len fixed bin (21) init (0), /* useless garbage */ 2 36 2 file_type unal fixed bin init (1), /* 1 */ 2 37 2 block_size unal fixed bin init (0), /* not used */ 2 38 2 block_factor unal fixed bin init (0), /* not used */ 2 39 2 bucket_density unal fixed bin init (0), /* not used */ 2 40 2 tuple_id_len unal fixed bin init (36), /* always 36? */ 2 41 2 num_rels unal fixed bin init (1), /* always 1 */ 2 42 2 num_links unal fixed bin init (0), /* not used */ 2 43 2 num_children unal fixed bin init (0), /* not used */ 2 44 2 default_rbs (3) unal fixed bin (8) init (4,4,4), /* file ring brackets when not MDBM-secured */ 2 45 2 rel_ptr unal bit (18) init ((18)"1"b), /* to first of list of rel_infos */ 2 46 2 link_ptr unal bit (18) init ((18)"1"b), /* always null */ 2 47 2 children_ptr unal bit (18) init ((18)"1"b), /* always null */ 2 48 2 cno_array_ptr unal bit (18) init ((18)"1"b), /* always null */ 2 49 2 fi_ptr unal bit (18) init ((18)"1"b), /* offset to file_info in db_model */ 2 50 2 suatd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 51 2 sratd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 52 2 latd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 53 2 uatd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 54 2 mratd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 55 2 ratd_ptr unal bit (18) init ((18)"1"b), /* garbage */ 2 56 2 ptr_pad unal bit (9) init ((9)"1"b), /* align to half-word value */ 2 57 2 unused_ptr_space unal bit (18) dimension (28) init ((28)(18)"1"b), /* free ptr space */ 2 58 2 ptr_pad2 unal bit (9) init ((9)"1"b), /* align to byte */ 2 59 2 changer_ptr unal bit (18) init ((18)"1"b); /* pointer to changer_id, changer_time structure */ 2 60 2 61 2 62 dcl 1 like_file_model aligned based (fm_ptr) like init_file_model; /* base of segment */ 2 63 2 64 2 65 dcl 1 init_rel_info aligned internal static options (constant), 2 66 2 name char (32) init (""), /* relation name */ 2 67 2 id aligned bit (36) init ("000000000000000000000000000000000001"b), /* relation id number */ 2 68 2 hashed bit (1) unal init ("0"b), /* on if hashed */ 2 69 2 duplicates bit (1) unal init ("0"b), /* on if allow dup. hash fields */ 2 70 2 via_link bit (1) unal init ("0"b), /* on if to be stored by parent */ 2 71 2 system bit (1) unal init ("0"b), /* on if dont care how stored */ 2 72 2 indexed bit (1) unal init ("0"b), /* on if secondary index */ 2 73 2 mrds_update bit (1) unal init ("1"b), /* on if updateable by MRDS */ 2 74 2 mrds_retrieve bit (1) unal init ("1"b), /* on if retrievable by MRDS */ 2 75 2 virtual bit (1) unal init ("0"b), /* if virtual relation, mapped on IDS records */ 2 76 2 procedures_present bit (1) unal init ("0"b),/* on => ids type procedures present */ 2 77 2 reserved bit (27) unal init ("0"b), /* for future flags */ 2 78 2 num_attr unal fixed bin init (0), /* number of attributes (all levels) defined */ 2 79 2 num_links_child unal fixed bin init (0), /* no. links in which child */ 2 80 2 num_links_par unal fixed bin init (0), /* no. links_in which parent */ 2 81 2 max_attr_index_id unal fixed bin init (0), /* max index id used by attr in this rel or PLI */ 2 82 2 num_key_attrs unal fixed bin init (0), /* number of attributes in primary key for this rel */ 2 83 2 nvar_atts unal fixed bin init (0), /* no. varying len. attributes */ 2 84 2 n36_thds unal fixed bin init (0), /* no. of 36-bit threads */ 2 85 2 n27_thds unal fixed bin init (0), /* no of 27-bit threads */ 2 86 2 n18_thds unal fixed bin init (0), /* no of 18-bit threads */ 2 87 2 unused_3 unal fixed bin init (0), /* element that was never used */ 2 88 2 max_data_len fixed bin (35) init (0), /* max length of data portion of tuple */ 2 89 2 avg_data_len fixed bin (35) init (0), /* average length of tuple data portion */ 2 90 2 max_key_len fixed bin (35) init (0), /* max key length if not hashed */ 2 91 2 var_offset fixed bin (35) init (1), /* position of first varying attr. */ 2 92 2 max_tuples fixed bin (35) init (0), /* max no. tuples if blocked file */ 2 93 2 fwd_thread unal bit (18) init ((18)"1"b), /* offset to next rel. in file */ 2 94 2 attr_ptr unal bit (18) init ((18)"1"b), /* to attr. info */ 2 95 2 primary_key_index_id bit (36) aligned init ("000000000000000000000000000000000001"b), 2 96 2 clink_ptr unal bit (18) init ((18)"1"b),/* offset to child info of link determining location */ 2 97 2 map_ptr unal bit (18) init ((18)"1"b), /* pointer to mapping info if virtual rel. */ 2 98 2 sec_ind_ptr unal bit (18) init ((18)"1"b), /* ptr to list of sec. ind. infos, init. not used */ 2 99 2 locator_proc_path_ptr unal bit (18) init ((18)"1"b), /* proc to determ. location */ 2 100 2 link_before_path_ptr unal bit (18) init ((18)"1"b), /* op. proc. paths and entries */ 2 101 2 link_err_path_ptr unal bit (18) init ((18)"1"b), 2 102 2 link_after_path_ptr unal bit (18) init ((18)"1"b), 2 103 2 unlk_before_path_ptr unal bit (18) init ((18)"1"b), 2 104 2 unlk_err_path_ptr unal bit (18) init ((18)"1"b), 2 105 2 unlk_after_path_ptr unal bit (18) init ((18)"1"b), 2 106 2 str_before_path_ptr unal bit (18) init ((18)"1"b), 2 107 2 str_err_path_ptr unal bit (18) init ((18)"1"b), 2 108 2 str_after_path_ptr unal bit (18) init ((18)"1"b), 2 109 2 del_before_path_ptr unal bit (18) init ((18)"1"b), 2 110 2 del_err_path_ptr unal bit (18) init ((18)"1"b), 2 111 2 del_after_path_ptr unal bit (18) init ((18)"1"b), 2 112 2 mod_before_path_ptr unal bit (18) init ((18)"1"b), 2 113 2 mod_err_path_ptr unal bit (18) init ((18)"1"b), 2 114 2 mod_after_path_ptr unal bit (18) init ((18)"1"b), 2 115 2 find_before_path_ptr unal bit (18) init ((18)"1"b), 2 116 2 find_err_path_ptr unal bit (18) init ((18)"1"b), 2 117 2 find_after_path_ptr unal bit (18) init ((18)"1"b), 2 118 2 retr_before_path_ptr unal bit (18) init ((18)"1"b), 2 119 2 retr_err_path_ptr unal bit (18) init ((18)"1"b), 2 120 2 retr_after_path_ptr unal bit (18) init ((18)"1"b), 2 121 2 unused_1 unal bit (18) init ((18)"1"b), /* for future expansion */ 2 122 2 unused_2 unal bit (18) init ((18)"1"b), 2 123 2 changer_ptr unal bit (18) init ((18)"1"b); /* pointer to changer_id, changer_time structure */ 2 124 2 125 2 126 /* END INCLUDE FILE mdbm_file_model_init.incl.pl1 */ 2 127 2 128 86 87 3 1 /* BEGIN INCLUDE FILE mdbm_db_model.incl.pl1 -- jaw, 10/2/78 */ 3 2 3 3 3 4 /****^ HISTORY COMMENTS: 3 5* 1) change(79-02-01,Gray), approve(), audit(), install(): 3 6* modified to save space occupied by model 3 7* 2) change(80-11-03,Gray), approve(), audit(), install(): 3 8* to add mdbm_secured bit in db_model 3 9* 3) change(82-04-09,Davids), approve(), audit(), install(): 3 10* collapsed the following into an unused_offset array: 3 11* chng_before_path_ptr chng_err_path_ptr chng_after_path_ptr 3 12* copy_before_path_ptr copy_err_path_ptr copy_after_path_ptr 3 13* dsply_before_path_pt dsply_err_path_pt dsply_after_path_ptr 3 14* accs_before_path_ptr accs_err_path_ptr accs_after_path_ptr 3 15* unused_1 3 16* Also changed the name of unused_2 to restructuring_history_offset 3 17* and changed the comment on the changer structure to indicate 3 18* that it will contain on database creation information. 3 19* 4) change(82-04-14,Davids), approve(), audit(), install(): 3 20* used one of the unused_offsets to point to a message which indicates 3 21* why the db is inconsistent. The offset will be null when the db is created 3 22* and set the first time the message is used. this is so it will be 3 23* consistent with existing data bases. Also added the message structure. 3 24* 5) change(82-04-28,Davids), approve(), audit(), install(): 3 25* added the undo_request element to the message structure 3 26* 6) change(82-05-04,Davids), approve(), audit(), install(): 3 27* changed unused_offset (12) to last_restructruring_history_offset and 3 28* changed restructuring_history_offset to first_restructuring_history_offset 3 29* 7) change(82-08-19,Davids), approve(), audit(), install(): 3 30* changed the meaning of db_type from 1 => relational and 2 => CODASYL to 3 31* 1 => vfile database and 2 => page_file database. Up to this point all 3 32* database types were equal to 1. 3 33* 8) change(83-02-14,Davids), approve(), audit(), install(): 3 34* changed db_type from a fixed bin unal to a substructure of 18 bit (1) unal 3 35* flags. This will allow information about transactions and dm_file 3 36* concurrency to be independent of the db_type, i.e. vfile or dm_file. The 3 37* change is compatable with all datamodels created by the released version 3 38* of mrds. 3 39* 9) change(83-02-15,Davids), approve(), audit(), install(): 3 40* added the rollback_on flag to the db_type_flags since it appears that you 3 41* can have a dmfile database that requires transactions but does not have any 3 42* journalizing. Also switched the order of the transactions_needed and 3 43* concurrency_on flags - this makes the change compatable with existing 3 44* dmfile databases except when displaying the model since concurrency_on and 3 45* rollback_on will be off in the model even though the dmfile relations had 3 46* them on during creation. 3 47* 10) change(83-02-22,Kubicar), approve(), audit(), install(): 3 48* Removed ctl_file_path_ptr. 3 49* 11) change(85-11-08,Spitzer), approve(85-12-03,MCR7311), 3 50* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 3 51* used 1 unused offset for unreferenced attribute linked lists in db_model, 3 52* 1 unused bit flag in domain_info to indicate an unreferenced domain, 1 bit 3 53* in the flag word for rmdb copying. 3 54* END HISTORY COMMENTS */ 3 55 3 56 3 57 /* this include file contains the structures that go into the make up 3 58* of the "db_model" segment in the model for the database. 3 59* in addition there file_model.m segments, 1 for each database file(see mdbm_file_model.incl.pl1) 3 60* 3 61* the db_model structure goes at the base of the segment, and contains items unique to 3 62* the whole databse. in addition, it has an area of size to fill the 3 63* rest of a segment, that holds the lists of files and domains in the database. 3 64* these lists are singly forward linked lists. all "pointers" in the database model 3 65* are maintained as offsets(bit (18)) from the base of the particular model segment 3 66* since actual pointers are process dependent on segment number. 3 67* the remaining structures are first a path_entry one to save pathnames in, 3 68* and the stack_item and constent structures, used to save a boolean 3 69* expression in polish form, with the stack represented by a linked list. 3 70* the final structure is one for identifying the status of version information */ 3 71 3 72 dcl 1 db_model aligned based (dbm_ptr),/* base of db_model segment, allocated once per database */ 3 73 2 version unal fixed bin, /* data base version, currently 4 */ 3 74 2 db_type_flags unal, 3 75 3 copy_good bit (1) unal, /* "1"b => copy of the db_model is the valid copy */ 3 76 3 unused (13) bit (1) unal, 3 77 3 rollback_on bit (1) unal, /* "1"b => before journaling is to be done */ 3 78 3 concurrency_on bit (1) unal, /* "1"b => dm_file concurrency is being used */ 3 79 3 transactions_needed bit (1) unal, /* "1"b => transactions are needed to reference data */ 3 80 3 vfile_type bit (1) unal, /* "1"b => vfile type relations, "0"b => dm_file type relations */ 3 81 2 uniq_sw_name char (32), /* per database unique attach switch name for files */ 3 82 2 consistant bit (1) unal, /* ON => correctly created/restructured database, ok to open */ 3 83 2 mdbm_secured bit (1) unal, /* on => database has been secured */ 3 84 2 reserved bit (34) unal, /* reserved for flags */ 3 85 2 blk_file_id_len unal fixed bin, /* no. bits required for blocked file id. */ 3 86 2 unblk_file_id_len unal fixed bin, /* number of file id bits, unblocked file */ 3 87 2 num_blk_files unal fixed bin, /* number of blocked files defined in db */ 3 88 2 num_unblk_files unal fixed bin, /* number of unblocked files defined in db */ 3 89 2 num_rels unal fixed bin, /* number of relations defined in db. */ 3 90 2 num_domains unal fixed bin, /* number of domains defined */ 3 91 2 num_dyn_links unal fixed bin, /* no. dynamic links defined */ 3 92 2 max_max_tuples unal fixed bin (35), /* maximum max_tuples across all files */ 3 93 2 pad_1 unal fixed bin (35), /* for future use */ 3 94 2 pad_2 unal fixed bin (35), /* for future use */ 3 95 2 version_ptr bit (18), /* offset to version structure */ 3 96 2 file_ptr unal bit (18), /* offset to first in threaded list of file_infos */ 3 97 2 domain_ptr unal bit (18), /* offset to first in list of domain_infos */ 3 98 2 unreferenced_attribute_ptr unal bit (18), /* offset to first in list of unreferenced attr_infos */ 3 99 2 unused_offsets (11) unal bit (18), /* extra offsets if needed */ 3 100 2 last_restructuring_history_offset unal bit (18), /* offset to last restructuring history entry */ 3 101 2 inconsistent_message_offset unal bit (18), /* offset to message indicating why db is inconsistent */ 3 102 2 first_restructuring_history_offset unal bit (18), /* offset to first restructuring history entry */ 3 103 2 changer_ptr unal bit (18), /* offset to information about db creation */ 3 104 2 dbm_area area (sys_info$max_seg_size - fixed (rel (addr (db_model.dbm_area))) - 1); 3 105 3 106 dcl dbm_ptr ptr; 3 107 3 108 /* the files in the database each have a file_info containing 3 109* their name, the file_model for each file is found by initiating the 3 110* segment "file_name.m" (i.e. the file's name with suffix ".m") 3 111* the file_info list is a singly linked list in definition order */ 3 112 3 113 dcl 1 file_info aligned based (fi_ptr), /* list of file names and numbers */ 3 114 2 file_name char (30), /* name of file */ 3 115 2 file_id bit (36), /* id number of file */ 3 116 2 fwd_ptr unal bit (18), /* thread to next in list */ 3 117 2 unused unal bit (18); /* for future expansion */ 3 118 3 119 dcl fi_ptr ptr; 3 120 3 121 /* each domain used in the database will have a domain info saved in the db_model 3 122* segment. it describes the domain of the given name, and it's options. 3 123* the domain_info's form a singly linked list in definition order */ 3 124 3 125 dcl 1 domain_info aligned based (di_ptr), /* one for each domain defined */ 3 126 2 name char (32), /* name of domain */ 3 127 2 db_desc_is_ptr bit (1) unal, /* on if descriptor is pointer to real desc. */ 3 128 2 user_desc_is_ptr bit (1) unal, /* on if user desc is ptr */ 3 129 2 no_conversion bit (1) unal, /* if no conversion allowed */ 3 130 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 3 131 2 unreferenced bit (1) unal, /* on => this domain is not used in any attribute */ 3 132 2 reserved bit (31) unal, 3 133 2 db_desc bit (36), /* desc. for item in db, or ptr to it */ 3 134 2 user_desc bit (36), /* desc. for user-visible attr, or ptr */ 3 135 2 ave_len fixed bin (35), /* average length of varying string */ 3 136 2 nck_items unal fixed bin, /* no. items in check stack */ 3 137 2 fwd_thread unal bit (18), /* offset to next in list */ 3 138 2 check_path_ptr unal bit (18), /* integ. check proc. */ 3 139 2 ck_stack_ptr unal bit (18), /* to check stack */ 3 140 2 encd_path_ptr unal bit (18), /* encode procedure */ 3 141 2 decd_path_ptr unal bit (18), /* decode procedure */ 3 142 2 str_before_path_ptr unal bit (18), /* proc paths and entries */ 3 143 2 str_err_path_ptr unal bit (18), 3 144 2 str_after_path_ptr unal bit (18), 3 145 2 get_before_path_ptr unal bit (18), 3 146 2 get_err_path_ptr unal bit (18), 3 147 2 get_after_path_ptr unal bit (18), 3 148 2 mod_before_path_ptr unal bit (18), 3 149 2 mod_err_path_ptr unal bit (18), 3 150 2 mod_after_path_ptr unal bit (18), 3 151 2 unused_1 unal bit (18), /* for future expansion */ 3 152 2 unused_2 unal bit (18), 3 153 2 changer_ptr unal bit (18); /* pointer to change_id and chane_time structure */ 3 154 3 155 dcl di_ptr ptr; 3 156 3 157 /* information necessary for attributes that are not used in any relation */ 3 158 3 159 dcl 1 unreferenced_attribute aligned based (ua_ptr), 3 160 2 name char (32), /* name of attribute */ 3 161 2 domain_ptr bit (18) unal, /* to domain_info */ 3 162 2 fwd_thread bit (18) unal, /* to next in list */ 3 163 2 unused (2) bit (18) unal; 3 164 3 165 dcl ua_ptr ptr; 3 166 3 167 3 168 /* space saving pathname$entryname structure, to be allocated 3 169* only when a path$entry has to be saved, else only a bit(18) 3 170* offset takes up space in the main model structure */ 3 171 3 172 declare 1 path_entry based (path_entry_ptr), 3 173 2 path char (168), /* pathname portion of desired path$entry */ 3 174 2 entry char (32), /* entryname portion of desired path$entry */ 3 175 2 reserved unal bit (36); /* for future use */ 3 176 3 177 declare path_entry_ptr ptr; 3 178 3 179 3 180 3 181 3 182 3 183 /* declarations for model of postfix stack holding the check option boolean expression 3 184* the following encoding values indicate the corresponding type of stack element 3 185* 3 186* 1 = 3 187* 2 ^= 3 188* 3 > 3 189* 4 < 3 190* 5 >= 3 191* 6 <= 3 192* 3 193* 10 and 3 194* 20 or 3 195* 30 not 3 196* 3 197* 40 - (minus) 3 198* 3 199* 50 domain variable(same name as domain) 3 200* 3 201* 60 constant(number, bit string, or character string) 3 202* 3 203**/ 3 204 3 205 3 206 declare 1 stack_item based (stack_item_ptr), /* element of stack model list */ 3 207 2 next bit (18), /* link to next in list */ 3 208 2 type fixed binary, /* code for this element type */ 3 209 2 value_ptr bit (18); /* pointer to variable holding value, 3 210* if this is a constant element type */ 3 211 3 212 declare stack_item_ptr ptr; /* pointer to a stack element */ 3 213 3 214 3 215 3 216 declare 1 constant based (constant_ptr), /* variable size space for constant's value storage */ 3 217 2 length fixed bin (35), /* length allocated to hold value */ 3 218 2 value bit (alloc_length refer (constant.length)) aligned; /* value for this constant */ 3 219 3 220 declare constant_ptr ptr; /* pointer to constant's value space */ 3 221 3 222 declare alloc_length fixed binary (35) internal static; /* amount of space to allocate for constant's value */ 3 223 3 224 /* version structure, giving status of source for CMDB/RMDB, 3 225* status of model, and status of resultant */ 3 226 3 227 /* version number is in form MM.N.Y 3 228* where MM is the major version number, N is the minor version alteration, 3 229* and Y is the lastest modification to that alteration, 3 230* where M and N represent numbers 0-9, and Y is a letter */ 3 231 3 232 declare 1 version_status unal based (version_status_ptr), 3 233 2 cmdb_rmdb, 3 234 3 major fixed bin, 3 235 3 minor fixed bin, 3 236 3 modification char (4), 3 237 2 model, 3 238 3 major fixed bin, 3 239 3 minor fixed bin, 3 240 3 modification char (4), 3 241 2 resultant, 3 242 3 major fixed bin, 3 243 3 minor fixed bin, 3 244 3 modification char (4); 3 245 3 246 declare version_status_ptr ptr; 3 247 3 248 3 249 /* maintains information only about the db creation */ 3 250 3 251 declare 1 changer unal based (changer_ptr), 3 252 2 id char (32), 3 253 2 time fixed bin (71), 3 254 2 next bit (18); /* to next in the singly linked list */ 3 255 3 256 declare changer_ptr ptr; 3 257 3 258 3 259 dcl 01 message_str unal based (message_str_ptr), /* general purpose structure to hold messages */ 3 260 02 len fixed bin, /* length of the message */ 3 261 02 text char (message_str_len refer (message_str.len)), /* actual message */ 3 262 02 name char (32), /* name of thing that set the message */ 3 263 02 undo_request char (100), /* rmdb request that will undo the operation 3 264* that caused the database to become inconsistent */ 3 265 02 mbz bit (36); /* for possible extensions, like an offset to another message */ 3 266 3 267 dcl message_str_ptr ptr; /* pointer to the message_str structure */ 3 268 3 269 dcl message_str_len fixed bin; /* initail length of the text string in message_str */ 3 270 3 271 /* END INCLUDE FILE mdbm_db_model.incl.pl1 */ 3 272 3 273 88 89 90 end rmdb_init_file_model; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/16/86 1143.8 rmdb_init_file_model.pl1 >special_ldd>install>MR12.0-1187>rmdb_init_file_model.pl1 84 1 10/16/86 1139.9 mdbm_file_model.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_file_model.incl.pl1 86 2 10/16/86 1140.0 mdbm_file_model_init.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_file_model_init.incl.pl1 88 3 10/16/86 1139.3 mdbm_db_model.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_db_model.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_dbm_ptr parameter pointer dcl 20 ref 8 27 I_fm_ptr parameter pointer dcl 21 ref 8 28 O_err_code parameter fixed bin(35,0) dcl 23 set ref 8 26* 35* O_err_msg parameter char unaligned dcl 22 set ref 8 25* 34* addr builtin function dcl 71 ref 42 before builtin function dcl 72 ref 39 changer_ptr 44(27) based bit(18) level 2 in structure "file_model" packed unaligned dcl 1-40 in procedure "rmdb_init_file_model" set ref 44* changer_ptr 32(18) based bit(18) level 2 in structure "db_model" packed unaligned dcl 3-72 in procedure "rmdb_init_file_model" ref 44 67 changer_ptr 43(18) based bit(18) level 2 in structure "rel_info" packed unaligned dcl 1-126 in procedure "rmdb_init_file_model" set ref 67* code 000100 automatic fixed bin(35,0) dcl 73 set ref 32* 33 35 db_model based structure level 1 dcl 3-72 dbm_ptr 000200 automatic pointer dcl 3-106 set ref 27* 44 67 dir 000101 automatic char(168) unaligned dcl 74 set ref 32* empty builtin function dcl 75 ref 42 file_model based structure level 1 dcl 1-40 file_name 000153 automatic char(32) unaligned dcl 76 set ref 32* 39 fixed builtin function dcl 77 ref 42 fm_area 46 based area level 2 dcl 1-40 set ref 42* 42 59 fm_ptr 000174 automatic pointer dcl 1-108 set ref 28* 32* 41 42 42 44 59 61 hcs_$fs_get_path_name 000010 constant entry external dcl 78 ref 32 init_file_model 000000 constant structure level 1 dcl 2-18 ref 41 init_rel_info 000046 constant structure level 1 dcl 2-65 ref 65 ldn 000163 automatic fixed bin(17,0) dcl 79 set ref 32* like_file_model based structure level 1 dcl 2-62 set ref 41* name based char(32) level 2 dcl 1-126 set ref 66* rel builtin function dcl 80 ref 42 61 rel_info based structure level 1 dcl 1-126 set ref 59 65* rel_name 000164 automatic char(32) unaligned dcl 81 set ref 39* 66 rel_ptr 20(27) based bit(18) level 2 packed unaligned dcl 1-40 set ref 61* ri_ptr 000176 automatic pointer dcl 1-185 set ref 59* 61 65 66 67 sys_info$max_seg_size 000012 external static fixed bin(35,0) dcl 82 ref 42 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ai_ptr automatic pointer dcl 1-209 al_ptr automatic pointer dcl 1-345 alloc_length internal static fixed bin(35,0) dcl 3-222 atd based char unaligned dcl 1-109 atd_len automatic fixed bin(17,0) dcl 1-111 atd_ptr automatic pointer dcl 1-110 attr_info based structure level 1 dcl 1-192 attr_list based structure level 1 dcl 1-341 changer based structure level 1 packed unaligned dcl 3-251 changer_ptr automatic pointer dcl 3-256 child_link_info based structure level 1 dcl 1-283 cli_ptr automatic pointer dcl 1-329 cna_ptr automatic pointer dcl 1-115 comp_no_array based structure level 1 packed unaligned dcl 1-112 constant based structure level 1 unaligned dcl 3-216 constant_ptr automatic pointer dcl 3-220 di_ptr automatic pointer dcl 3-155 domain_info based structure level 1 dcl 3-125 dp_ptr automatic pointer dcl 1-356 dup_prev based structure level 1 dcl 1-353 fi_ptr automatic pointer dcl 3-119 file_info based structure level 1 dcl 3-113 message_str based structure level 1 packed unaligned dcl 3-259 message_str_len automatic fixed bin(17,0) dcl 3-269 message_str_ptr automatic pointer dcl 3-267 ncomp_init automatic fixed bin(17,0) dcl 1-116 parent_link_info based structure level 1 dcl 1-223 path_entry based structure level 1 packed unaligned dcl 3-172 path_entry_ptr automatic pointer dcl 3-177 pli_ptr automatic pointer dcl 1-268 sc_ptr automatic pointer dcl 1-365 select_chain based structure level 1 dcl 1-357 sk_ptr automatic pointer dcl 1-352 sort_key based structure level 1 dcl 1-346 stack_item based structure level 1 unaligned dcl 3-206 stack_item_ptr automatic pointer dcl 3-212 ua_ptr automatic pointer dcl 3-165 unreferenced_attribute based structure level 1 dcl 3-159 version_status based structure level 1 packed unaligned dcl 3-232 version_status_ptr automatic pointer dcl 3-246 NAMES DECLARED BY EXPLICIT CONTEXT. exit 000266 constant label dcl 48 load_rel_info 000267 constant entry internal dcl 52 ref 46 rmdb_init_file_model 000134 constant entry external dcl 8 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 370 404 315 400 Length 646 315 14 226 53 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rmdb_init_file_model 162 external procedure is an external procedure. load_rel_info internal procedure shares stack frame of external procedure rmdb_init_file_model. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rmdb_init_file_model 000100 code rmdb_init_file_model 000101 dir rmdb_init_file_model 000153 file_name rmdb_init_file_model 000163 ldn rmdb_init_file_model 000164 rel_name rmdb_init_file_model 000174 fm_ptr rmdb_init_file_model 000176 ri_ptr rmdb_init_file_model 000200 dbm_ptr rmdb_init_file_model THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return_mac ext_entry_desc op_alloc_ op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$fs_get_path_name THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 8 000127 25 000147 26 000154 27 000155 28 000160 32 000163 33 000213 34 000215 35 000223 36 000224 39 000225 41 000237 42 000243 44 000257 46 000265 48 000266 52 000267 59 000270 61 000276 65 000303 66 000306 67 000311 69 000314 ----------------------------------------------------------- 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