COMPILATION LISTING OF SEGMENT rmdb_create_attribute Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/16/86 1339.7 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1985 * 4* * * 5* *********************************************************** */ 6 7 /* format: ^inddcls,^indattr,indnoniterend,^indnoniterdo,indend,tree,^case,insnl,comcol61,dclind5,declareind5,delnl */ 8 9 /*DESCRIPTION 10* This module actually creates an unreferenced attribute. First, it verifies 11* the input structure, creates the attribute/domain file if necessary, then 12* builds the appropriate structures in the db model segment and adds these 13* structures to the linked list of unreferenced attributes. 14**/ 15 16 /****^ HISTORY COMMENTS: 17* 1) change(85-12-03,Spitzer), approve(85-12-03,MCR7311), 18* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 19* written 20* END HISTORY COMMENTS */ 21 22 rmdb_create_attribute: 23 proc (Irmdb_ctl_ptr, Icreate_attr_info_ptr, Oerror_message, Ocode); 24 25 /* Initialization */ 26 rmdb_ctl_ptr = Irmdb_ctl_ptr; 27 create_attr_info_ptr = Icreate_attr_info_ptr; 28 29 local_iocb = rmdb_ctl.crossref_file_info.iocb_ptr; 30 dbm_ptr = rmdb_ctl.db_model_ptr; 31 32 /* Check input arguments */ 33 if create_attr_info.version ^= create_attr_info_version_1 34 then call error (error_table_$unimplemented_version, "For create_attr_info structure."); 35 36 if rmdb_ctl.absolute_db_path = "" 37 then call error (mrds_error_$no_db_path, ""); 38 39 if create_attr_info.count = 0 40 then call error (error_table_$wrong_no_of_args, "No attributes to be created."); 41 42 /* Check to see if the attributes named do not exist and the domains named 43*do exist. */ 44 if local_iocb = null 45 then do; 46 call mdbm_util_$xref_build (rmdb_ctl.temp_dir_path, rmdb_ctl.absolute_db_path, dbm_ptr, 47 rmdb_ctl.crossref_file_info.name, local_iocb, error_message, code); 48 if code ^= 0 49 then call error (code, error_message); 50 rmdb_ctl.crossref_file_info.iocb_ptr = local_iocb; 51 end; 52 53 do loop = 1 to create_attr_info.count; 54 call mdbm_util_$xref_find_record (local_iocb, DOMAIN_KEY_HEAD, create_attr_info.attribute (loop).domain, 55 null, 0, error_message, code); 56 if code = error_table_$no_record 57 then call error (mrds_error_$undefined_domain, create_attr_info.attribute (loop).domain); 58 59 call mdbm_util_$xref_find_record (local_iocb, ATTRIBUTE_KEY_HEAD, create_attr_info.attribute (loop).name, 60 null, 0, error_message, code); 61 if code = 0 62 then call error (mrds_error_$attr_already_exists, create_attr_info.attribute (loop).name); 63 end; /* do loop */ 64 65 crossref_info_record_ptr = addr (local_record_buffer); 66 crossref_info_record.count = 0; 67 68 /* Finished verifying input structure, actually create them now. */ 69 do loop = 1 to create_attr_info.count; 70 call create_an_attribute (loop); 71 end; /* do loop */ 72 73 /* Finish up */ 74 call adjust_bit_count_ (rmdb_ctl.absolute_db_path, DB_MODEL_NAME, "1"b, bcnt, code); 75 if code ^= 0 76 then call error (code, pathname_ (rmdb_ctl.absolute_db_path, DB_MODEL_NAME)); 77 call error (0, ""); 78 79 RETURN_TO_CALLER: 80 return; 81 82 error: 83 proc (code, msg); 84 85 dcl code fixed bin (35) parameter; 86 dcl msg char (*) parameter; 87 88 Ocode = code; 89 Oerror_message = msg; 90 goto RETURN_TO_CALLER; 91 end error; 92 93 /* This routine creates exactly one unreferenced attribute. First it locks the 94*db model segment, creates the necessary structure, initializes it, then links 95*it to the linked list of unreferenced attributes. It then unlocks the model 96*segment and adds the necessary history structure. Note: quits are noticed but 97*deferred until after critical code is finished. */ 98 99 create_an_attribute: 100 proc (attribute_index); 101 102 dcl attribute_index fixed bin (17) parameter; 103 104 quit_intercept_flag = "0"b; 105 on quit quit_intercept_flag = "1"b; 106 107 new_ua_ptr = null; /* BEGINNING OF CRITICAL CODE */ 108 on cleanup 109 begin; 110 call mdbm_util_$xref_destroy (rmdb_ctl.crossref_file_info.iocb_ptr, rmdb_ctl.temp_dir_path, 111 rmdb_ctl.crossref_file_info.name, (""), (0)); 112 if new_ua_ptr ^= null 113 then free new_ua_ptr -> unreferenced_attribute in (dbm_area); 114 115 call mdbm_util_$inconsistent_reset (dbm_ptr); 116 end; 117 118 call mdbm_util_$inconsistent_set (dbm_ptr, "create_attribute", 119 "Creating attribute " || create_attr_info.attribute (attribute_index).name, 120 "delete_attribute -force -inhibit_error " || rtrim (create_attr_info.attribute (attribute_index).name)); 121 122 /* Trap area conditions so that we can abort with a reasonable error message */ 123 on area 124 call error (error_table_$area_too_small, 125 "No room left in the db_model segment area to add the attribute " 126 || create_attr_info.attribute (attribute_index).name); 127 128 /* Create the unreferenced_attribute structure */ 129 allocate unreferenced_attribute in (dbm_area) set (new_ua_ptr); 130 unspec (new_ua_ptr -> unreferenced_attribute) = "0"b; 131 revert area; 132 133 /* Add domain record to the crossreference file */ 134 call mdbm_util_$xref_reference (local_iocb, DOMAIN_KEY_HEAD, 135 create_attr_info.attribute (attribute_index).domain, create_attr_info.attribute (attribute_index).name, 136 crossref_info_record_ptr, 4, error_message, code); 137 if code ^= 0 138 then call error (code, error_message); 139 140 /* Add attribute record to crossreference file */ 141 call mdbm_util_$xref_create_record (local_iocb, ATTRIBUTE_KEY_HEAD, 142 create_attr_info.attribute (attribute_index).name, crossref_info_record.offset, error_message, code); 143 if code ^= 0 144 then call error (code, error_message); 145 146 /* Fill it the unreferenced_attribute structure. */ 147 new_ua_ptr -> unreferenced_attribute.name = create_attr_info.attribute (attribute_index).name; 148 new_ua_ptr -> unreferenced_attribute.domain_ptr = crossref_info_record.offset; 149 new_ua_ptr -> unreferenced_attribute.fwd_thread = NULL_OFFSET; 150 151 /* Mark the domain in db_model referenced */ 152 di_ptr = ptr (dbm_ptr, new_ua_ptr -> unreferenced_attribute.domain_ptr); 153 domain_info.unreferenced = "0"b; 154 155 /* Add to the linked list */ 156 if db_model.unreferenced_attribute_ptr = NULL_OFFSET 157 then db_model.unreferenced_attribute_ptr = rel (new_ua_ptr); 158 else do; /* chase down to end of list */ 159 do ua_ptr = ptr (dbm_ptr, db_model.unreferenced_attribute_ptr) 160 repeat ptr (dbm_ptr, unreferenced_attribute.fwd_thread) while (rel (ua_ptr) ^= NULL_OFFSET); 161 prev_ua_ptr = ua_ptr; 162 end; /* do ua_ptr */ 163 prev_ua_ptr -> unreferenced_attribute.fwd_thread = rel (new_ua_ptr); 164 end; 165 166 call rmdb_add_rmdb_history (dbm_ptr, RMDB_ATTR_TYPE, create_attr_info.attribute (attribute_index).domain, 167 RMDB_ADD_ATTR_OP, create_attr_info.attribute (attribute_index).name, error_message, code); 168 169 call mdbm_util_$inconsistent_reset (dbm_ptr); 170 171 revert quit; /* END OF CRITICAL CODE */ 172 if quit_intercept_flag 173 then signal quit; 174 175 if code ^= 0 176 then call error (code, error_message); /* from rmdb_add_rmdb_history */ 177 178 return; 179 end create_an_attribute; 180 1 1 /* BEGIN INCLUDE FILE mdbm_db_model.incl.pl1 -- jaw, 10/2/78 */ 1 2 1 3 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(79-02-01,Gray), approve(), audit(), install(): 1 6* modified to save space occupied by model 1 7* 2) change(80-11-03,Gray), approve(), audit(), install(): 1 8* to add mdbm_secured bit in db_model 1 9* 3) change(82-04-09,Davids), approve(), audit(), install(): 1 10* collapsed the following into an unused_offset array: 1 11* chng_before_path_ptr chng_err_path_ptr chng_after_path_ptr 1 12* copy_before_path_ptr copy_err_path_ptr copy_after_path_ptr 1 13* dsply_before_path_pt dsply_err_path_pt dsply_after_path_ptr 1 14* accs_before_path_ptr accs_err_path_ptr accs_after_path_ptr 1 15* unused_1 1 16* Also changed the name of unused_2 to restructuring_history_offset 1 17* and changed the comment on the changer structure to indicate 1 18* that it will contain on database creation information. 1 19* 4) change(82-04-14,Davids), approve(), audit(), install(): 1 20* used one of the unused_offsets to point to a message which indicates 1 21* why the db is inconsistent. The offset will be null when the db is created 1 22* and set the first time the message is used. this is so it will be 1 23* consistent with existing data bases. Also added the message structure. 1 24* 5) change(82-04-28,Davids), approve(), audit(), install(): 1 25* added the undo_request element to the message structure 1 26* 6) change(82-05-04,Davids), approve(), audit(), install(): 1 27* changed unused_offset (12) to last_restructruring_history_offset and 1 28* changed restructuring_history_offset to first_restructuring_history_offset 1 29* 7) change(82-08-19,Davids), approve(), audit(), install(): 1 30* changed the meaning of db_type from 1 => relational and 2 => CODASYL to 1 31* 1 => vfile database and 2 => page_file database. Up to this point all 1 32* database types were equal to 1. 1 33* 8) change(83-02-14,Davids), approve(), audit(), install(): 1 34* changed db_type from a fixed bin unal to a substructure of 18 bit (1) unal 1 35* flags. This will allow information about transactions and dm_file 1 36* concurrency to be independent of the db_type, i.e. vfile or dm_file. The 1 37* change is compatable with all datamodels created by the released version 1 38* of mrds. 1 39* 9) change(83-02-15,Davids), approve(), audit(), install(): 1 40* added the rollback_on flag to the db_type_flags since it appears that you 1 41* can have a dmfile database that requires transactions but does not have any 1 42* journalizing. Also switched the order of the transactions_needed and 1 43* concurrency_on flags - this makes the change compatable with existing 1 44* dmfile databases except when displaying the model since concurrency_on and 1 45* rollback_on will be off in the model even though the dmfile relations had 1 46* them on during creation. 1 47* 10) change(83-02-22,Kubicar), approve(), audit(), install(): 1 48* Removed ctl_file_path_ptr. 1 49* 11) change(85-11-08,Spitzer), approve(85-12-03,MCR7311), 1 50* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 1 51* used 1 unused offset for unreferenced attribute linked lists in db_model, 1 52* 1 unused bit flag in domain_info to indicate an unreferenced domain, 1 bit 1 53* in the flag word for rmdb copying. 1 54* END HISTORY COMMENTS */ 1 55 1 56 1 57 /* this include file contains the structures that go into the make up 1 58* of the "db_model" segment in the model for the database. 1 59* in addition there file_model.m segments, 1 for each database file(see mdbm_file_model.incl.pl1) 1 60* 1 61* the db_model structure goes at the base of the segment, and contains items unique to 1 62* the whole databse. in addition, it has an area of size to fill the 1 63* rest of a segment, that holds the lists of files and domains in the database. 1 64* these lists are singly forward linked lists. all "pointers" in the database model 1 65* are maintained as offsets(bit (18)) from the base of the particular model segment 1 66* since actual pointers are process dependent on segment number. 1 67* the remaining structures are first a path_entry one to save pathnames in, 1 68* and the stack_item and constent structures, used to save a boolean 1 69* expression in polish form, with the stack represented by a linked list. 1 70* the final structure is one for identifying the status of version information */ 1 71 1 72 dcl 1 db_model aligned based (dbm_ptr),/* base of db_model segment, allocated once per database */ 1 73 2 version unal fixed bin, /* data base version, currently 4 */ 1 74 2 db_type_flags unal, 1 75 3 copy_good bit (1) unal, /* "1"b => copy of the db_model is the valid copy */ 1 76 3 unused (13) bit (1) unal, 1 77 3 rollback_on bit (1) unal, /* "1"b => before journaling is to be done */ 1 78 3 concurrency_on bit (1) unal, /* "1"b => dm_file concurrency is being used */ 1 79 3 transactions_needed bit (1) unal, /* "1"b => transactions are needed to reference data */ 1 80 3 vfile_type bit (1) unal, /* "1"b => vfile type relations, "0"b => dm_file type relations */ 1 81 2 uniq_sw_name char (32), /* per database unique attach switch name for files */ 1 82 2 consistant bit (1) unal, /* ON => correctly created/restructured database, ok to open */ 1 83 2 mdbm_secured bit (1) unal, /* on => database has been secured */ 1 84 2 reserved bit (34) unal, /* reserved for flags */ 1 85 2 blk_file_id_len unal fixed bin, /* no. bits required for blocked file id. */ 1 86 2 unblk_file_id_len unal fixed bin, /* number of file id bits, unblocked file */ 1 87 2 num_blk_files unal fixed bin, /* number of blocked files defined in db */ 1 88 2 num_unblk_files unal fixed bin, /* number of unblocked files defined in db */ 1 89 2 num_rels unal fixed bin, /* number of relations defined in db. */ 1 90 2 num_domains unal fixed bin, /* number of domains defined */ 1 91 2 num_dyn_links unal fixed bin, /* no. dynamic links defined */ 1 92 2 max_max_tuples unal fixed bin (35), /* maximum max_tuples across all files */ 1 93 2 pad_1 unal fixed bin (35), /* for future use */ 1 94 2 pad_2 unal fixed bin (35), /* for future use */ 1 95 2 version_ptr bit (18), /* offset to version structure */ 1 96 2 file_ptr unal bit (18), /* offset to first in threaded list of file_infos */ 1 97 2 domain_ptr unal bit (18), /* offset to first in list of domain_infos */ 1 98 2 unreferenced_attribute_ptr unal bit (18), /* offset to first in list of unreferenced attr_infos */ 1 99 2 unused_offsets (11) unal bit (18), /* extra offsets if needed */ 1 100 2 last_restructuring_history_offset unal bit (18), /* offset to last restructuring history entry */ 1 101 2 inconsistent_message_offset unal bit (18), /* offset to message indicating why db is inconsistent */ 1 102 2 first_restructuring_history_offset unal bit (18), /* offset to first restructuring history entry */ 1 103 2 changer_ptr unal bit (18), /* offset to information about db creation */ 1 104 2 dbm_area area (sys_info$max_seg_size - fixed (rel (addr (db_model.dbm_area))) - 1); 1 105 1 106 dcl dbm_ptr ptr; 1 107 1 108 /* the files in the database each have a file_info containing 1 109* their name, the file_model for each file is found by initiating the 1 110* segment "file_name.m" (i.e. the file's name with suffix ".m") 1 111* the file_info list is a singly linked list in definition order */ 1 112 1 113 dcl 1 file_info aligned based (fi_ptr), /* list of file names and numbers */ 1 114 2 file_name char (30), /* name of file */ 1 115 2 file_id bit (36), /* id number of file */ 1 116 2 fwd_ptr unal bit (18), /* thread to next in list */ 1 117 2 unused unal bit (18); /* for future expansion */ 1 118 1 119 dcl fi_ptr ptr; 1 120 1 121 /* each domain used in the database will have a domain info saved in the db_model 1 122* segment. it describes the domain of the given name, and it's options. 1 123* the domain_info's form a singly linked list in definition order */ 1 124 1 125 dcl 1 domain_info aligned based (di_ptr), /* one for each domain defined */ 1 126 2 name char (32), /* name of domain */ 1 127 2 db_desc_is_ptr bit (1) unal, /* on if descriptor is pointer to real desc. */ 1 128 2 user_desc_is_ptr bit (1) unal, /* on if user desc is ptr */ 1 129 2 no_conversion bit (1) unal, /* if no conversion allowed */ 1 130 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 1 131 2 unreferenced bit (1) unal, /* on => this domain is not used in any attribute */ 1 132 2 reserved bit (31) unal, 1 133 2 db_desc bit (36), /* desc. for item in db, or ptr to it */ 1 134 2 user_desc bit (36), /* desc. for user-visible attr, or ptr */ 1 135 2 ave_len fixed bin (35), /* average length of varying string */ 1 136 2 nck_items unal fixed bin, /* no. items in check stack */ 1 137 2 fwd_thread unal bit (18), /* offset to next in list */ 1 138 2 check_path_ptr unal bit (18), /* integ. check proc. */ 1 139 2 ck_stack_ptr unal bit (18), /* to check stack */ 1 140 2 encd_path_ptr unal bit (18), /* encode procedure */ 1 141 2 decd_path_ptr unal bit (18), /* decode procedure */ 1 142 2 str_before_path_ptr unal bit (18), /* proc paths and entries */ 1 143 2 str_err_path_ptr unal bit (18), 1 144 2 str_after_path_ptr unal bit (18), 1 145 2 get_before_path_ptr unal bit (18), 1 146 2 get_err_path_ptr unal bit (18), 1 147 2 get_after_path_ptr unal bit (18), 1 148 2 mod_before_path_ptr unal bit (18), 1 149 2 mod_err_path_ptr unal bit (18), 1 150 2 mod_after_path_ptr unal bit (18), 1 151 2 unused_1 unal bit (18), /* for future expansion */ 1 152 2 unused_2 unal bit (18), 1 153 2 changer_ptr unal bit (18); /* pointer to change_id and chane_time structure */ 1 154 1 155 dcl di_ptr ptr; 1 156 1 157 /* information necessary for attributes that are not used in any relation */ 1 158 1 159 dcl 1 unreferenced_attribute aligned based (ua_ptr), 1 160 2 name char (32), /* name of attribute */ 1 161 2 domain_ptr bit (18) unal, /* to domain_info */ 1 162 2 fwd_thread bit (18) unal, /* to next in list */ 1 163 2 unused (2) bit (18) unal; 1 164 1 165 dcl ua_ptr ptr; 1 166 1 167 1 168 /* space saving pathname$entryname structure, to be allocated 1 169* only when a path$entry has to be saved, else only a bit(18) 1 170* offset takes up space in the main model structure */ 1 171 1 172 declare 1 path_entry based (path_entry_ptr), 1 173 2 path char (168), /* pathname portion of desired path$entry */ 1 174 2 entry char (32), /* entryname portion of desired path$entry */ 1 175 2 reserved unal bit (36); /* for future use */ 1 176 1 177 declare path_entry_ptr ptr; 1 178 1 179 1 180 1 181 1 182 1 183 /* declarations for model of postfix stack holding the check option boolean expression 1 184* the following encoding values indicate the corresponding type of stack element 1 185* 1 186* 1 = 1 187* 2 ^= 1 188* 3 > 1 189* 4 < 1 190* 5 >= 1 191* 6 <= 1 192* 1 193* 10 and 1 194* 20 or 1 195* 30 not 1 196* 1 197* 40 - (minus) 1 198* 1 199* 50 domain variable(same name as domain) 1 200* 1 201* 60 constant(number, bit string, or character string) 1 202* 1 203**/ 1 204 1 205 1 206 declare 1 stack_item based (stack_item_ptr), /* element of stack model list */ 1 207 2 next bit (18), /* link to next in list */ 1 208 2 type fixed binary, /* code for this element type */ 1 209 2 value_ptr bit (18); /* pointer to variable holding value, 1 210* if this is a constant element type */ 1 211 1 212 declare stack_item_ptr ptr; /* pointer to a stack element */ 1 213 1 214 1 215 1 216 declare 1 constant based (constant_ptr), /* variable size space for constant's value storage */ 1 217 2 length fixed bin (35), /* length allocated to hold value */ 1 218 2 value bit (alloc_length refer (constant.length)) aligned; /* value for this constant */ 1 219 1 220 declare constant_ptr ptr; /* pointer to constant's value space */ 1 221 1 222 declare alloc_length fixed binary (35) internal static; /* amount of space to allocate for constant's value */ 1 223 1 224 /* version structure, giving status of source for CMDB/RMDB, 1 225* status of model, and status of resultant */ 1 226 1 227 /* version number is in form MM.N.Y 1 228* where MM is the major version number, N is the minor version alteration, 1 229* and Y is the lastest modification to that alteration, 1 230* where M and N represent numbers 0-9, and Y is a letter */ 1 231 1 232 declare 1 version_status unal based (version_status_ptr), 1 233 2 cmdb_rmdb, 1 234 3 major fixed bin, 1 235 3 minor fixed bin, 1 236 3 modification char (4), 1 237 2 model, 1 238 3 major fixed bin, 1 239 3 minor fixed bin, 1 240 3 modification char (4), 1 241 2 resultant, 1 242 3 major fixed bin, 1 243 3 minor fixed bin, 1 244 3 modification char (4); 1 245 1 246 declare version_status_ptr ptr; 1 247 1 248 1 249 /* maintains information only about the db creation */ 1 250 1 251 declare 1 changer unal based (changer_ptr), 1 252 2 id char (32), 1 253 2 time fixed bin (71), 1 254 2 next bit (18); /* to next in the singly linked list */ 1 255 1 256 declare changer_ptr ptr; 1 257 1 258 1 259 dcl 01 message_str unal based (message_str_ptr), /* general purpose structure to hold messages */ 1 260 02 len fixed bin, /* length of the message */ 1 261 02 text char (message_str_len refer (message_str.len)), /* actual message */ 1 262 02 name char (32), /* name of thing that set the message */ 1 263 02 undo_request char (100), /* rmdb request that will undo the operation 1 264* that caused the database to become inconsistent */ 1 265 02 mbz bit (36); /* for possible extensions, like an offset to another message */ 1 266 1 267 dcl message_str_ptr ptr; /* pointer to the message_str structure */ 1 268 1 269 dcl message_str_len fixed bin; /* initail length of the text string in message_str */ 1 270 1 271 /* END INCLUDE FILE mdbm_db_model.incl.pl1 */ 1 272 1 273 181 2 1 /* BEGIN INCLUDE FILE mdbm_file_model.incl.pl1 -- jaw, 8/29/78 */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(79-02-01,JGray), approve(), audit(), install(): 2 6* modified to save space occupied by model 2 7* 2) change(82-05-19,Davids), approve(), audit(), install(): 2 8* renamed rel_info.nsec_inds to rel_info.unused_3 because it really wasn't 2 9* the number of secondary indices in the relation - it was always zero. 2 10* 3) change(82-08-19,DWoodka), approve(), audit(), install(): 2 11* changed rel_info.id and attr_info.index_id to bit (36) unaligned for the 2 12* DMS conversion. 2 13* 4) change(82-09-20,MKubicar), approve(), audit(), install(): 2 14* changed rel_info.id and attr_info.index_id to aligned; they are needed that 2 15* way for relmgr_ calls. Also added rel_info.primary_key_index_id, needed 2 16* for relation manager changes. 2 17* 5) change(85-12-02,Spitzer), approve(85-12-02,MCR7311), 2 18* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 2 19* used 2 reserved bits to indicate whether the copy of the .m and/or 2 20* files are good (for rmdb) 2 21* END HISTORY COMMENTS */ 2 22 2 23 2 24 /* each file in the database will have a model segment with the name 2 25* file_name.m (i.e. the files name plus a suffix of ".m") 2 26* the file_model structure is allocated at the base of the segment for a given file. 2 27* it contains an area with which all other structures in this include file are allocated. 2 28* these structures contain the information about which relations, foreign keys, 2 29* and attributes are members of this file. all lists are singly linked lists in 2 30* definition order. pointers to these structures are obtained by using the "pointer" 2 31* builtin function with arguments of the segment base pointer, and the 2 32* offset (bit (18)) relative to that pointer that is actually stored in 2 33* the file model itself. this is because pointer segment numbers are 2 34* per process dependent. the major lists pointed to by the file_model structure 2 35* are the list of relations in this file(each with a contained attribute list), 2 36* and the list of foreign keys whose parent relation resides in this file 2 37* (along with a participating attribute sublist, and the child relation list, 2 38* if they are also in this file) */ 2 39 2 40 dcl 1 file_model aligned based (fm_ptr), /* base of segment */ 2 41 2 temporary bit (1) unal, /* on if file not part of db. */ 2 42 2 procedures_present bit (1) unal, /* on => ids procedures present */ 2 43 2 file_model_copy_good bit (1) unaligned, /* on => .m file is the good copy */ 2 44 2 relation_copy_good bit (1) unaligned, /* on => file is the good copy */ 2 45 2 reserved bit (32) unal, /* reserved for future flags */ 2 46 2 max_tuples fixed bin (35), /* max no. of tuples in file */ 2 47 2 num_blocks fixed bin (35), /* number of blocks in file */ 2 48 2 num_buckets fixed bin (35), /* number of buckets in file */ 2 49 2 pad_1 fixed bin (35), /* for future use */ 2 50 2 pad_2 fixed bin (35), 2 51 2 ratd_len fixed bin (21), /* length of above */ 2 52 2 mratd_len fixed bin (21), /* length of above */ 2 53 2 uatd_len fixed bin (21), /* char. length of update attach desc. */ 2 54 2 latd_len fixed bin (21), /* char. len. of attach desc. */ 2 55 2 sratd_len fixed bin (21), /* char. length of above attach desc. */ 2 56 2 suatd_len fixed bin (21), /* char. length of attach desc. */ 2 57 2 file_type unal fixed bin, /* 1 => unblocked, 2 => blocked */ 2 58 2 block_size unal fixed bin, /* no. pages in block */ 2 59 2 block_factor unal fixed bin, /* no. tuple slots per block */ 2 60 2 bucket_density unal fixed bin, /* no. of bucket headers per block, neg. => blocks per header */ 2 61 2 tuple_id_len unal fixed bin, /* no. bits needed for local tuple id */ 2 62 2 num_rels unal fixed bin, /* number of relations in file */ 2 63 2 num_links unal fixed bin, /* number of links in file */ 2 64 2 num_children unal fixed bin, /* count of all child_link_infos in this file */ 2 65 2 default_rbs (3) unal fixed bin (8), /* file ring brackets when not MDBM-secured */ 2 66 2 rel_ptr unal bit (18), /* to first of list of rel_infos */ 2 67 2 link_ptr unal bit (18), /* to first in list of parent link_infos */ 2 68 2 children_ptr unal bit (18), /* to list of all child_link_infos in this file model */ 2 69 2 cno_array_ptr unal bit (18), /* pointer to array of data component numbers */ 2 70 2 fi_ptr unal bit (18), /* offset to file_info in db_model */ 2 71 2 suatd_ptr unal bit (18), /* offset of scope_update attach desc. */ 2 72 2 sratd_ptr unal bit (18), /* offset of scope_retrieve attach desc. */ 2 73 2 latd_ptr unal bit (18), /* offset of load attach desc. */ 2 74 2 uatd_ptr unal bit (18), /* offset of update attach description for file */ 2 75 2 mratd_ptr unal bit (18), /* offset of moniter-retrieve attach desc. */ 2 76 2 ratd_ptr unal bit (18), /* offset of retrieve attach desc. */ 2 77 2 open_eu_before_path_ptr unal bit (18), /* paths and ents of file procs. */ 2 78 2 open_eu_err_path_ptr unal bit (18), 2 79 2 open_eu_after_path_ptr unal bit (18), 2 80 2 open_er_before_path_ptr unal bit (18), 2 81 2 open_er_err_path_ptr unal bit (18), 2 82 2 open_er_after_path_ptr unal bit (18), 2 83 2 open_neu_before_path_ptr unal bit (18), /* paths and ents of file procs. */ 2 84 2 open_neu_err_path_ptr unal bit (18), 2 85 2 open_neu_after_path_ptr unal bit (18), 2 86 2 open_ner_before_path_ptr unal bit (18), 2 87 2 open_ner_err_path_ptr unal bit (18), 2 88 2 open_ner_after_path_ptr unal bit (18), 2 89 2 open_pu_before_path_ptr unal bit (18), 2 90 2 open_pu_err_path_ptr unal bit (18), 2 91 2 open_pu_after_path_ptr unal bit (18), 2 92 2 open_pr_before_path_ptr unal bit (18), 2 93 2 open_pr_err_path_ptr unal bit (18), 2 94 2 open_pr_after_path_ptr unal bit (18), 2 95 2 open_cu_before_path_ptr unal bit (18), 2 96 2 open_cu_err_path_ptr unal bit (18), 2 97 2 open_cu_after_path_ptr unal bit (18), 2 98 2 open_cr_before_path_ptr unal bit (18), 2 99 2 open_cr_err_path_ptr unal bit (18), 2 100 2 open_cr_after_path_ptr unal bit (18), 2 101 2 close_before_path_ptr unal bit (18), 2 102 2 close_err_path_ptr unal bit (18), 2 103 2 close_after_path_ptr unal bit (18), 2 104 2 unused_1 unal bit (18), /* for future expansion */ 2 105 2 unused_2 unal bit (18), 2 106 2 changer_ptr unal bit (18), /* pointer to changer_id, changer_time structure */ 2 107 2 fm_area area (sys_info$max_seg_size - fixed (rel (addr (file_model.fm_area))) - 1); 2 108 dcl fm_ptr ptr; 2 109 dcl atd char (atd_len) based (atd_ptr); /* attach description for each file ready mode */ 2 110 dcl atd_ptr ptr; 2 111 dcl atd_len fixed bin; 2 112 dcl 1 comp_no_array unal based (cna_ptr), /* ordered array of data comp. nos. */ 2 113 2 ncomponents fixed bin, 2 114 2 comp_no (ncomp_init refer (comp_no_array.ncomponents)) fixed bin; 2 115 dcl cna_ptr ptr; 2 116 dcl ncomp_init fixed bin; 2 117 2 118 /* a rel_info structure contains information describing a relation. 2 119* a relation may only occur in one file, thus there is one rel_info 2 120* per relation per database, each stored in the file_model area for 2 121* the file that contains it. the list of rel_info's in this file 2 122* form a singly linked list in definition order. 2 123* the rel_info itself points to a list of the attributes it contains, 2 124* and to any parent_link or child_link info's that involve it in a foreign key */ 2 125 2 126 dcl 1 rel_info aligned based (ri_ptr), 2 127 2 name char (32), /* relation name */ 2 128 2 id bit (36) aligned, /* relation id number */ 2 129 2 hashed bit (1) unal, /* on if hashed */ 2 130 2 duplicates bit (1) unal, /* on if allow dup. hash fields */ 2 131 2 via_link bit (1) unal, /* on if to be stored by parent */ 2 132 2 system bit (1) unal, /* on if dont care how stored */ 2 133 2 indexed bit (1) unal, /* on if secondary index */ 2 134 2 mrds_update bit (1) unal, /* on if updateable by MRDS */ 2 135 2 mrds_retrieve bit (1) unal, /* on if retrievable by MRDS */ 2 136 2 virtual bit (1) unal, /* if virtual relation, mapped on IDS records */ 2 137 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 2 138 2 reserved bit (27) unal, /* for future flags */ 2 139 2 num_attr unal fixed bin, /* number of attributes (all levels) defined */ 2 140 2 num_links_child unal fixed bin, /* no. links in which child */ 2 141 2 num_links_par unal fixed bin, /* no. links_in which parent */ 2 142 2 max_attr_index_id unal fixed bin, /* max index id used by attr in this rel or PLI */ 2 143 2 num_key_attrs unal fixed bin, /* number of attributes in primary key for this rel */ 2 144 2 nvar_atts unal fixed bin, /* no. varying len. attributes */ 2 145 2 n36_thds unal fixed bin, /* no. of 36-bit threads */ 2 146 2 n27_thds unal fixed bin, /* no of 27-bit threads */ 2 147 2 n18_thds unal fixed bin, /* no of 18-bit threads */ 2 148 2 unused_3 unal fixed bin, /* element that was never used */ 2 149 2 max_data_len fixed bin (35), /* max length of data portion of tuple */ 2 150 2 avg_data_len fixed bin (35), /* average length of tuple data portion */ 2 151 2 max_key_len fixed bin (35), /* max key length if not hashed */ 2 152 2 var_offset fixed bin (35), /* position of first varying attr. */ 2 153 2 max_tuples fixed bin (35), /* max no. tuples if blocked file */ 2 154 2 fwd_thread unal bit (18), /* offsset to next rel. in file */ 2 155 2 attr_ptr unal bit (18), /* to attr. info */ 2 156 2 primary_key_index_id bit (36) aligned, /* index id of the relation's primary key */ 2 157 2 clink_ptr unal bit (18), /* offset to child info of link determining location */ 2 158 2 map_ptr unal bit (18), /* pointer to mapping info if virtual rel. */ 2 159 2 sec_ind_ptr unal bit (18), /* ptr to list of sec. ind. infos, init. not used */ 2 160 2 locator_proc_path_ptr unal bit (18), /* proc to determ. location */ 2 161 2 link_before_path_ptr unal bit (18), /* op. proc. paths and entries */ 2 162 2 link_err_path_ptr unal bit (18), 2 163 2 link_after_path_ptr unal bit (18), 2 164 2 unlk_before_path_ptr unal bit (18), 2 165 2 unlk_err_path_ptr unal bit (18), 2 166 2 unlk_after_path_ptr unal bit (18), 2 167 2 str_before_path_ptr unal bit (18), 2 168 2 str_err_path_ptr unal bit (18), 2 169 2 str_after_path_ptr unal bit (18), 2 170 2 del_before_path_ptr unal bit (18), 2 171 2 del_err_path_ptr unal bit (18), 2 172 2 del_after_path_ptr unal bit (18), 2 173 2 mod_before_path_ptr unal bit (18), 2 174 2 mod_err_path_ptr unal bit (18), 2 175 2 mod_after_path_ptr unal bit (18), 2 176 2 find_before_path_ptr unal bit (18), 2 177 2 find_err_path_ptr unal bit (18), 2 178 2 find_after_path_ptr unal bit (18), 2 179 2 retr_before_path_ptr unal bit (18), 2 180 2 retr_err_path_ptr unal bit (18), 2 181 2 retr_after_path_ptr unal bit (18), 2 182 2 unused_1 unal bit (18), /* for future expansion */ 2 183 2 unused_2 unal bit (18), 2 184 2 changer_ptr unal bit (18) ; /* pointer to changer_id, changer_time structure */ 2 185 dcl ri_ptr ptr; 2 186 2 187 /* a attr_info structure contains information about an attribute in a given relation. 2 188* since attributes may appear in more than one relation, each occurence of an attribute 2 189* means that an attr_info for it will be put in that relations sublist of attributes. 2 190* the list is singly linked in definition order. the attr_info describes 2 191* the data it represents, and how that data is used during a database search. */ 2 192 dcl 1 attr_info aligned based (ai_ptr), /* info for a single attr. in attr. list */ 2 193 2 name char (32), /* name of attribute */ 2 194 2 key_attr bit (1) unal, /* on if part of primary or hash key */ 2 195 2 index_attr bit (1) unal, /* on if a secondary index */ 2 196 2 link_attr bit (1) unal, /* on if participates in link */ 2 197 2 reserved bit (33) unal, 2 198 2 index_id bit (36) aligned, /* id of index if index attr. */ 2 199 2 defn_order unal fixed bin, /* relative posit. in which defined */ 2 200 2 key_order unal fixed bin, /* relative posit. in key */ 2 201 2 bit_offset fixed bin (35), /* position in tuple */ 2 202 2 bit_length fixed bin (35), /* length if fixed */ 2 203 2 link_child_cnt fixed bin, /* number of uses of attr in child rel of link */ 2 204 2 link_par_cnt fixed bin, /* number of uses of attr in parent rel of link */ 2 205 2 domain_ptr unal bit (18), /* to domain info */ 2 206 2 rslt_ptr unal bit (18), /* ptr to info for "result" clause */ 2 207 2 fwd_thread unal bit (18), /* to next in list */ 2 208 2 changer_ptr unal bit (18) ; /* pointer to changer_id and changer_time */ 2 209 dcl ai_ptr ptr; 2 210 2 211 /* a parent_link_info structure is the carrier of foreign key definition info. 2 212* each time a foreign key definition indicates a relation as it's parent, 2 213* that relation will get a parent_link_info put in a list of associated parent_link_info's. 2 214* a relation can be parent and/or child in any number of foreign keys. 2 215* the parent_link_info structure describes the foreign key, and also points 2 216* to a list of the attributes that participate in this foreign key. 2 217* (this could be from 1 up to all attributes in the relation) 2 218* the attr_list structures are in a singly linked list in definition order 2 219* for this purpose. also pointed to is a list of child_link_info's 2 220* that describe the child relations in this foreign key. since foreign keys 2 221* may span files, not all related child_link_info's have to be in this file's 2 222* model area. */ 2 223 dcl 1 parent_link_info aligned based (pli_ptr), /* gen'l link info, appears in each area spanned by link parent */ 2 224 2 name char (32), /* name of link */ 2 225 2 singular bit (1) unal, /* on if system owned link */ 2 226 2 temp bit (1) unal, /* on if temp. order */ 2 227 2 first bit (1) unal, /* insertion indicators */ 2 228 2 last bit (1) unal, 2 229 2 next bit (1) unal, 2 230 2 prior bit (1) unal, 2 231 2 sort_rel_name bit (1) unal, /* sort -- relation name */ 2 232 2 sort_keys bit (1) unal, /* sort -- defined keys */ 2 233 2 dup_first bit (1) unal, /* duplicates first */ 2 234 2 dup_last bit (1) unal, /* duplicates last */ 2 235 2 indexed bit (1) unal, /* locate parent via index */ 2 236 2 hashed bit (1) unal, /* locate parent via hashed primary key */ 2 237 2 thread_36 bit (1) unal, /* thread size indicators */ 2 238 2 thread_27 bit (1) unal, 2 239 2 thread_18 bit (1) unal, 2 240 2 clustered bit (1) unal, /* ON => cluster option specified for this link */ 2 241 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 2 242 2 reserved bit (19) unal, /* reserved for future flags */ 2 243 2 index_id aligned bit (8), /* id of index if indexed */ 2 244 2 thread_index unal fixed bin, /* index to threads in parent */ 2 245 2 nsel_attr unal fixed bin, /* no. attr. determ. parent */ 2 246 2 n_children unal fixed bin, /* no. children in link */ 2 247 2 child_fn char (30), /* file name for first child in list */ 2 248 2 parent_ptr unal bit (18), /* to parent relation info in file model */ 2 249 2 child_ptr unal bit (18), /* to list of child info ptrs */ 2 250 2 sel_attr_ptr unal bit (18), /* to first in list of attr. determ. parent */ 2 251 2 fwd_thread unal bit (18), /* thread to next parent link info in file */ 2 252 2 rel_fwd_thread unal bit (18), /* for multiple links within a relation */ 2 253 2 sort_before_path_ptr unal bit (18), /* proc. paths and entries */ 2 254 2 sort_err_path_ptr unal bit (18), 2 255 2 sort_after_path_ptr unal bit (18), 2 256 2 srch_before_path_ptr unal bit (18), 2 257 2 srch_err_path_ptr unal bit (18), 2 258 2 srch_after_path_ptr unal bit (18), 2 259 2 link_before_path_ptr unal bit (18), 2 260 2 link_err_path_ptr unal bit (18), 2 261 2 link_after_path_ptr unal bit (18), 2 262 2 unlk_before_path_ptr unal bit (18), 2 263 2 unlk_err_path_ptr unal bit (18), 2 264 2 unlk_after_path_ptr unal bit (18), 2 265 2 unused_1 unal bit (18), /* for future expansion */ 2 266 2 unused_2 unal bit (18), 2 267 2 changer_ptr unal bit (18) ; /* pointer to changer_id, changer_time structure */ 2 268 dcl pli_ptr ptr; 2 269 2 270 /* a child_link_info structure is the counter part of a parent_link_info 2 271* for foreign key child relations. each time a relation is defined to be 2 272* a child in a foreign key, it's list of child_link_infos will be added to. 2 273* this list is singly linked in foreign key definition order. 2 274* the child_link_info points to a list of participating attributes from the 2 275* child relation by means of a singly linked list of attr_list structures 2 276* in definition order. the number of attributes in the parent attr_list 2 277* and the child attr_list lists are the same with corresponding attr_list 2 278* attributes having the same domain. all child_link_infos in this file 2 279* are on a seperately linked list. this may not include all 2 280* child_link_infos for foreign keys whose parent relation resides in this file, 2 281* since foreign keys may span files, and the child_link_info will 2 282* reside in the file containing it's associated relation_info. */ 2 283 dcl 1 child_link_info aligned based (cli_ptr), /* in same files as children */ 2 284 2 link_name char (32), /* name of foreign key involving parent relation for this child */ 2 285 2 mandatory bit (1) unal, /* on if membership mandatory */ 2 286 2 fixed bit (1) unal, /* on if membership fixed */ 2 287 2 optional bit (1) unal, /* on if membership optional */ 2 288 2 auto bit (1) unal, /* on if insertion automatic */ 2 289 2 manual bit (1) unal, /* on if insertion manual */ 2 290 2 struct_const bit (1) unal, /* on if membership constrained by attr. comp. */ 2 291 2 range_sel bit (1) unal, /* on if range type selection */ 2 292 2 key_dup_first bit (1) unal, /* sort key flags */ 2 293 2 key_dup_last bit (1) unal, 2 294 2 key_null bit (1) unal, /* on if null allowed */ 2 295 2 sel_system bit (1) unal, /* selection criteria flags */ 2 296 2 sel_current bit (1) unal, 2 297 2 sel_key bit (1) unal, 2 298 2 sel_proc bit (1) unal, 2 299 2 no_null bit (1) unal, /* if null key values not allowed */ 2 300 2 reserved bit (21) unal, 2 301 2 thread_index unal fixed bin, /* index to thread in tuple */ 2 302 2 chain_len unal fixed bin, /* no. "then-thru's" in selction crit. */ 2 303 2 n_sort_keys unal fixed bin, /* no. attr. in sort key */ 2 304 2 n_sel_items unal fixed bin, /* no. items to sel for link sel. */ 2 305 2 n_dup_prevs unal fixed bin, /* no. attr. for dup prev. */ 2 306 2 link_fwd_fn char (30), /* file name for next child info in link */ 2 307 2 parent_fn char (30), /* file name for parent info */ 2 308 2 parent_ptr unal bit (18), /* offset to parent link info */ 2 309 2 link_fwd_thread unal bit (18), /* offset for next child in link */ 2 310 2 rel_info_ptr unal bit (18), /* to corresponding rel info */ 2 311 2 dup_prev_ptr unal bit (18), /* list of attrs. for dup. prev. */ 2 312 2 sel_ptr unal bit (18), /* list of attr. for link sel. */ 2 313 2 rel_fwd_thread unal bit (18), /* for multiple links within a relation */ 2 314 2 child_fwd_thread unal bit (18), /* pointer to next in list of all child_link_infos in this file */ 2 315 2 sort_key_ptr unal bit (18), /* list of sort keys */ 2 316 2 chain_ptr unal bit (18), /* to "then thru" list */ 2 317 2 sel_proc_path_ptr unal bit (18), /* link selection proc. */ 2 318 2 link_before_path_ptr unal bit (18), /* proc. paths and entries */ 2 319 2 link_err_path_ptr unal bit (18), 2 320 2 link_after_path_ptr unal bit (18), 2 321 2 unlk_before_path_ptr unal bit (18), 2 322 2 unlk_err_path_ptr unal bit (18), 2 323 2 unlk_after_path_ptr unal bit (18), 2 324 2 srch_before_path_ptr unal bit (18), 2 325 2 srch_err_path_ptr unal bit (18), 2 326 2 srch_after_path_ptr unal bit (18), 2 327 2 unused_1 unal bit (18), /* for future expansion */ 2 328 2 unused_2 unal bit (18) ; 2 329 dcl cli_ptr ptr; 2 330 2 331 /* the attr_list structure is associated with the parent_link_info 2 332* and child_link_info structures to represent by means of a singly linked list 2 333* the participating attributes from relations in a foreign key. 2 334* the parent_link_info has a list for the parent relation, 2 335* and the child_link_info has a list for the child relation. 2 336* the participating attributes are a subset(not necessary proper) of 2 337* those attributes contained in a relation definition. 2 338* there are equal numbers of attr_list structures in the parent and 2 339* child lists of the same foreign key. the corresponding attributes in these 2 340* lists must have the same domain. */ 2 341 dcl 1 attr_list aligned based (al_ptr), /* general attr. list */ 2 342 2 attr_fn char (30), /* file name for attr. */ 2 343 2 attr_ptr unal bit (18), /* to attr info block */ 2 344 2 fwd_thread unal bit (18); /* to next in list */ 2 345 dcl al_ptr ptr; 2 346 dcl 1 sort_key aligned based (sk_ptr), /* entry in sort key list */ 2 347 2 ascend bit (1) unal, /* ascending order */ 2 348 2 descend bit (1) unal, /* descending order */ 2 349 2 reserved bit (34) unal, 2 350 2 attr_ptr unal bit (18), /* to attr info */ 2 351 2 fwd_thread unal bit (18); /* to next in list */ 2 352 dcl sk_ptr ptr; 2 353 dcl 1 dup_prev aligned based (dp_ptr), /* dup. prevention list entry */ 2 354 2 attr_ptr unal bit (18), /* to attr info */ 2 355 2 fwd_thread unal bit (18); /* to next in list */ 2 356 dcl dp_ptr ptr; 2 357 dcl 1 select_chain aligned based (sc_ptr), /* "then thru" list entry */ 2 358 2 link_fn char (30), /* file name for thru link */ 2 359 2 link_ptr unal bit (18), /* to parent link info */ 2 360 2 parent_attr_ptr unal bit (18), /* to parent ident. attr. list */ 2 361 2 comp_proc_path_ptr unal bit (18), /* comparison procedure */ 2 362 2 comp_attr_fn char (30), /* file name for comparison attr. */ 2 363 2 comp_attr_ptr unal bit (18), /* to comparison attr list */ 2 364 2 fwd_thread unal bit (18); /* to next in chain */ 2 365 dcl sc_ptr ptr; 2 366 2 367 /* END INCLUDE FILE mdbm_file_model.incl.pl1 */ 2 368 2 369 182 3 1 /* BEGIN - mrds_rmdb_ctl.incl.pl1 */ 3 2 3 3 3 4 3 5 /****^ HISTORY COMMENTS: 3 6* 1) change(82-03-26,Davids), approve(), audit(), install(): 3 7* created 3 8* 2) change(82-05-26,Davids), approve(), audit(), install(): 3 9* added db_model_ptr 3 10* 3) change(82-06-09,Harvey), approve(), audit(), install(): 3 11* deleted ssu_ routines ptr storage 3 12* 4) change(82-08-20,Davids), approve(), audit(), install(): 3 13* added the relmgr like reference and included the rmdb_relmgr_entries 3 14* include file 3 15* 5) change(83-05-24,Davids), approve(), audit(), install(): 3 16* added the saved_res_version_ptr element 3 17* 6) change(84-10-23,Benjamin), approve(), audit(), install(): 3 18* added flags (just database_readied_by_rmdb for now). 3 19* 7) change(85-11-08,Spitzer), approve(85-11-08,MCR7311), 3 20* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 3 21* added crossref_file_info. 3 22* END HISTORY COMMENTS */ 3 23 3 24 3 25 dcl 01 rmdb_ctl based (rmdb_ctl_ptr), 3 26 02 version fixed bin, 3 27 02 rmdb_version char (16) varying, 3 28 02 absolute_db_path char (168), 3 29 02 temp_dir_path char (168), 3 30 02 work_area_ptr ptr, 3 31 02 db_model_ptr ptr, 3 32 02 saved_res_version_ptr ptr, 3 33 02 crossref_file_info, 3 34 03 iocb_ptr ptr, 3 35 03 name char (32), 3 36 02 relmgr_entries like rmdb_relmgr_entries, 3 37 02 flags, 3 38 03 database_readied_by_rmdb bit (1) unal, 3 39 03 unused bit (35) unal; 3 40 3 41 dcl RMDB_CTL_VERSION_1 fixed bin init (1) internal static options (constant); 3 42 3 43 dcl rmdb_ctl_ptr ptr; 3 44 3 45 4 1 /* START OF: rmdb_relmgr_entries.incl.pl1 * * * * * * * * * * * * * * * * */ 4 2 4 3 4 4 /****^ HISTORY COMMENTS: 4 5* 1) change(82-08-20,Davids), approve(), audit(), install(): 4 6* written 4 7* 2) change(86-01-28,Spitzer), approve(86-01-28,MCR7311), 4 8* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 4 9* add get_tuples_by_spec, put_tuple, put_tuples, create_cursor entry points. 4 10* 3) change(86-08-21,Blair), approve(86-08-21,MCR7311), 4 11* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 4 12* Back out the entries get_tuples_by_spec and put_tuples since they aren't 4 13* sufficiently well tested to be reliable. Replace with get_tuple_id and 4 14* get_tuple_by_id. 4 15* END HISTORY COMMENTS */ 4 16 4 17 4 18 dcl 01 rmdb_relmgr_entries based (rmdb_relmgr_entries_ptr), 4 19 02 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, 4 20 bit (36) aligned, fixed bin (35)), 4 21 02 delete_relation entry (char (*), char (*), fixed bin (35)), 4 22 02 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 4 23 02 close entry (bit (36) aligned, fixed bin (35)), 4 24 02 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), 4 25 bit (36) aligned, fixed bin (35)), 4 26 02 delete_index entry (bit (36) aligned, bit (36) aligned, fixed bin (35)), 4 27 02 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 4 28 02 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 4 29 02 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 4 30 02 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)); 4 31 4 32 dcl rmdb_relmgr_entries_ptr ptr; 4 33 4 34 /* END OF: rmdb_relmgr_entries.incl.pl1 * * * * * * * * * * * * * * * * */ 3 46 3 47 3 48 3 49 /* END - mrds_rmdb_ctl.incl.pl1 */ 183 5 1 /* START OF: rmdb_create_attr_info.incl.pl1 * * * * * * * * * * * * * * * * */ 5 2 5 3 5 4 /****^ HISTORY COMMENTS: 5 5* 1) change(85-12-03,Spitzer), approve(85-12-03,MCR7311), 5 6* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 5 7* Contains a list of attributes to create 5 8* END HISTORY COMMENTS */ 5 9 5 10 dcl create_attr_info_count fixed bin (17); 5 11 dcl create_attr_info_ptr ptr; 5 12 dcl create_attr_info_version_1 char (8) int static options (constant) init ("cai 1.0"); 5 13 5 14 dcl 1 create_attr_info based (create_attr_info_ptr), 5 15 2 version char (8), 5 16 2 count fixed bin (17), 5 17 2 attribute (create_attr_info_count refer (create_attr_info.count)), 5 18 3 name char (32), 5 19 3 domain char (32); 5 20 5 21 /* END OF: rmdb_create_attr_info.incl.pl1 * * * * * * * * * * * * * * * * */ 184 6 1 /* START OF: rmdb_crossref_info.incl.pl1 * * * * * * * * * * * * * * * * */ 6 2 6 3 /****^ HISTORY COMMENTS: 6 4* 1) change(85-12-03,Spitzer), approve(85-12-03,MCR7311), 6 5* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 6 6* written. 6 7* END HISTORY COMMENTS */ 6 8 6 9 /*DESCRIPTION 6 10* The following structures are the definition of the records with the keyed 6 11* vfile that is built during restructuring. This file serves as a crossreference 6 12* of unique attributes and domains used within the specified MRDS database. Each 6 13* object is a char (33); the first byte is set to an unprintable character so we 6 14* can use the index builtin to find a specific object. 6 15**/ 6 16 6 17 dcl crossref_info_record_ptr ptr; 6 18 dcl crossref_info_record_count fixed bin (21); 6 19 dcl 1 crossref_info_record based (crossref_info_record_ptr), 6 20 2 offset bit (18) unal, 6 21 2 pad bit (18) unal, 6 22 2 count fixed bin (21), 6 23 2 entry (crossref_info_record_count refer (crossref_info_record.count)) unaligned, 6 24 3 object_head char (1), 6 25 3 object char (32); 6 26 6 27 dcl crossref_info_record_objects char (33*crossref_info_record.count) 6 28 based (addr (crossref_info_record.entry(1))); 6 29 dcl OBJECT_HEAD char (1) int static options (constant) init (""); 6 30 6 31 dcl ATTRIBUTE_KEY_HEAD char (10) int static options (constant) init ("attribute:"); 6 32 dcl DOMAIN_KEY_HEAD char (7) int static options (constant) init ("domain:"); 6 33 dcl RELATION_KEY_HEAD char (9) int static options (constant) init ("relation:"); 6 34 6 35 /*DESCRIPTION 6 36* The following structures are used to contain sufficient crossreference 6 37* information for the delete_attribute and delete_domain requests. These 6 38* requests require a more complete view of a crossreference tree, associating 6 39* domains, attributes and relations in 2 directions. 6 40**/ 6 41 6 42 dcl domain_list_ptr ptr; 6 43 dcl domain_list_count fixed bin; 6 44 dcl domain_list_names char (33*domain_list.count) based (addr (domain_list.name(1))); 6 45 dcl 1 domain_list based (domain_list_ptr), 6 46 2 count fixed bin, /* number of domains in the list */ 6 47 2 name (domain_list_count refer (domain_list.count)) 6 48 char (33) unaligned, /* name of this domain */ 6 49 2 attribute_list_ptr (domain_list_count refer (domain_list.count)) 6 50 ptr; /* -> attribute_list structure */ 6 51 6 52 dcl attribute_list_ptr ptr; 6 53 dcl attribute_list_count fixed bin; 6 54 dcl attribute_list_names char (33*attribute_list.count) based (addr (attribute_list.name(1))); 6 55 dcl 1 attribute_list based (attribute_list_ptr), 6 56 2 count fixed bin, /* number of attributes in the list */ 6 57 2 name (attribute_list_count refer (attribute_list.count)) 6 58 char (33) unaligned, /* name of this attribute */ 6 59 2 domain_info_ptr (attribute_list_count refer (attribute_list.count)) 6 60 bit (18) unal, /* offset in db_model of the domain_info structure for this attribute */ 6 61 2 attribute_ptr (attribute_list_count refer (attribute_list.count)) 6 62 ptr; /* -> attribute structure */ 6 63 6 64 dcl relation_list_ptr ptr; 6 65 dcl relation_list_count fixed bin; 6 66 dcl relation_list_names char (33*relation_list.count) based (addr (relation_list.name (1))); 6 67 dcl 1 relation_list based (relation_list_ptr), 6 68 2 count fixed bin, /* number of relations that are to be touched in this operation */ 6 69 2 name (relation_list_count refer (relation_list.count)) 6 70 char (33) unaligned, /* name of this relation */ 6 71 2 relation_ptr (relation_list_count refer (relation_list.count)) 6 72 ptr; /* -> relation structure */ 6 73 6 74 dcl relation_ptr ptr; 6 75 dcl relation_attribute_count fixed bin; 6 76 dcl relation_attribute_names char (33*relation.attribute_count) based (addr (relation.attribute_names (1))); 6 77 dcl 1 relation based (relation_ptr), 6 78 2 name char (32), /* name of the relation */ 6 79 2 file_model_ptr ptr, /* -> relation.m segment */ 6 80 2 copy_file_model_ptr ptr, 6 81 2 attribute_count fixed bin, /* number of attributes defined for this relation */ 6 82 2 mbz fixed bin (35), 6 83 2 attribute (relation_attribute_count refer (relation.attribute_count)), 6 84 3 flags aligned, 6 85 4 delete bit (1) unaligned, /* ON: delete this attribute */ 6 86 4 new bit (1) unaligned, /* ON: this attribute is added to the relation */ 6 87 4 part_of_key bit (1) unaligned, /* ON: this attribute is part of the primary key */ 6 88 4 to_be_deleted bit (1) unaligned, 6 89 4 pad bit (32) unaligned, 6 90 3 domain_info_ptr bit (18) aligned, /* -> db_model domain_info structure */ 6 91 3 attribute_info_ptr ptr, /* -> file_model attribute_info structure */ 6 92 3 value_ptr ptr, /* if flags.new, this -> the value of the column to be stored */ 6 93 /* it must be of the correct data type as specified by the domain */ 6 94 2 attribute_names (relation_attribute_count refer (relation.attribute_count)) 6 95 char (33) unaligned; 6 96 6 97 dcl attribute_ptr ptr; 6 98 dcl attribute_count fixed bin; 6 99 dcl 1 attribute based (attribute_ptr), 6 100 2 count fixed bin, /* number of relations this attribute is used in */ 6 101 2 relation_idx (attribute_count refer (attribute.count)) 6 102 fixed bin; /* index into list of relation names */ 6 103 6 104 /* END OF: rmdb_crossref_info.incl.pl1 * * * * * * * * * * * * * * * * */ 185 7 1 /* BEGIN INCLUDE FILE rmdb_history_entry.incl.pl1 -- nsd, 82-04-09 */ 7 2 7 3 7 4 7 5 /****^ HISTORY COMMENTS: 7 6* 1) change(75-01-01,WhoKnows), approve(), audit(), install(): 7 7* Written. 7 8* 2) change(85-12-03,Spitzer), approve(85-12-03,MCR7311), 7 9* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 7 10* Added RMDB_ADD_(ATTR DMN)_OP, RMDB_RN_(ATTR DMN REL)_OP. 7 11* END HISTORY COMMENTS */ 7 12 7 13 7 14 /* 7 15* This include file contains the rmdb_history_entry structure which 7 16* is used for maintaining a history of the databases restructuring 7 17* events. It also contains a set of constants used in loading the 7 18* structure. 7 19* 7 20* The restructuring history is applied against the database as a 7 21* whole instead of against each structure in the db_model and file 7 22* models which was the approach originally implemented but never 7 23* really used (except to record the database creation). This is 7 24* because 1 database restructuring event, i.e. adding a new index 7 25* to a relation will change several of the structures in the model. 7 26* 7 27* For a detailed explaination of the use of this structure and the 7 28* constants see the rmdb_add_rmdb_event module. 7 29**/ 7 30 7 31 dcl 01 rmdb_history_entry aligned based (rmdb_history_entry_ptr), 7 32 02 user_id char (32), /* person_id.project_id.tag */ 7 33 02 date_time_restructured fixed bin (71), 7 34 02 type_of_object_restructured fixed bin, /* taken from constants below */ 7 35 02 object_name char (32), 7 36 02 operation fixed bin, /* taken from constants below */ 7 37 02 secondary_object_name char (32), /* i.e. name of attr just indexed in a restructured relation */ 7 38 02 offset_to_next_entry bit (18) unal, 7 39 02 offset_to_previous_entry bit (18) unal; 7 40 7 41 7 42 dcl rmdb_history_entry_ptr ptr; 7 43 7 44 7 45 dcl RMDB_DOMAIN_TYPE init (1) fixed bin internal static options (constant); 7 46 dcl RMDB_ATTR_TYPE init (2) fixed bin internal static options (constant); 7 47 dcl RMDB_REL_TYPE init (3) fixed bin internal static options (constant); 7 48 7 49 7 50 dcl RMDB_ADD_REL_OP init (1) fixed bin internal static options (constant); 7 51 dcl RMDB_DEL_REL_OP init (2) fixed bin internal static options (constant); 7 52 dcl RMDB_ADD_IDX_OP init (3) fixed bin internal static options (constant); 7 53 dcl RMDB_DEL_IDX_OP init (4) fixed bin internal static options (constant); 7 54 dcl RMDB_ADD_ATTR_OP init (5) fixed bin int static options (constant); 7 55 dcl RMDB_DEL_ATTR_OP init (6) fixed bin int static options (constant); 7 56 dcl RMDB_ADD_DMN_OP init (7) fixed bin int static options (constant); 7 57 dcl RMDB_DEL_DMN_OP init (8) fixed bin int static options (constant); 7 58 dcl RMDB_RN_ATTR_OP init (9) fixed bin int static options (constant); 7 59 dcl RMDB_RN_DMN_OP init (10) fixed bin int static options (constant); 7 60 dcl RMDB_RN_REL_OP init (11) fixed bin int static options (constant); 7 61 7 62 /* END INCLUDE FILE rmdb_history_entry.incl.pl1 */ 186 187 188 dcl addr builtin; 189 dcl adjust_bit_count_ entry (char (168), char (32), bit (1) aligned, fixed bin (35), fixed bin (35)); 190 dcl area condition; 191 dcl bcnt fixed bin (35); /* bit count */ 192 dcl cleanup condition; 193 dcl code fixed bin (35); 194 dcl DB_MODEL_NAME char (32) int static options (constant) init ("db_model"); 195 dcl error_message char (500); 196 dcl error_table_$area_too_small fixed bin (35) ext static; 197 dcl error_table_$no_record fixed bin (35) ext static; 198 dcl error_table_$unimplemented_version fixed bin (35) ext static; 199 dcl error_table_$wrong_no_of_args fixed bin (35) ext static; 200 dcl fixed builtin; 201 dcl Icreate_attr_info_ptr ptr parameter; 202 dcl Irmdb_ctl_ptr ptr parameter; 203 dcl local_iocb ptr; /* attribute/domain file iocb */ 204 dcl local_record_buffer (4) fixed bin (35); /* large enough to read the header of the crossref_info_record into */ 205 dcl loop fixed bin (17); /* loop index */ 206 dcl mdbm_util_$inconsistent_reset entry (ptr); 207 dcl mdbm_util_$inconsistent_set entry (ptr, char (*), char (*), char (*)); 208 dcl mdbm_util_$xref_build entry (char (*), char (*), ptr, char (*), ptr, char (*), fixed bin (35)); 209 dcl mdbm_util_$xref_create_record entry (ptr, char (*), char (*), bit (18), char (*), fixed bin (35)); 210 dcl mdbm_util_$xref_destroy entry (ptr, char (*), char (*), char (*), fixed bin (35)); 211 dcl mdbm_util_$xref_find_record entry (ptr, char (*), char (*), ptr, fixed bin (21), char (*), fixed bin (35)); 212 dcl mdbm_util_$xref_reference entry (ptr, char (*), char (*), char (*), ptr, fixed bin (21), char (*), fixed bin (35)); 213 dcl mrds_error_$attr_already_exists fixed bin (35) ext static; 214 dcl mrds_error_$no_db_path fixed bin (35) ext static; 215 dcl mrds_error_$undefined_domain fixed bin (35) ext static; 216 dcl new_ua_ptr ptr; /* points the new create unreferenced_attribute structure in the db_model */ 217 dcl null builtin; 218 dcl NULL_OFFSET bit (18) unaligned int static options (constant) init ((18)"1"b); 219 dcl Ocode fixed bin (35) parameter; 220 dcl Oerror_message char (*) parameter; 221 dcl pathname_ entry (char (*), char (*)) returns (char (168)); 222 dcl prev_ua_ptr ptr; 223 dcl ptr builtin; 224 dcl quit condition; 225 dcl quit_intercept_flag bit (1) aligned; /* true ::= break key was pressed */ 226 dcl rel builtin; 227 dcl rmdb_add_rmdb_history entry (ptr, fixed bin, char (32), fixed bin, char (32), char (500), fixed bin (35)); 228 dcl rtrim builtin; 229 dcl sys_info$max_seg_size fixed bin (35) ext static; 230 dcl unspec builtin; 231 232 end rmdb_create_attribute; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/16/86 1143.1 rmdb_create_attribute.pl1 >special_ldd>install>MR12.0-1187>rmdb_create_attribute.pl1 181 1 10/16/86 1139.3 mdbm_db_model.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_db_model.incl.pl1 182 2 10/16/86 1139.9 mdbm_file_model.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_file_model.incl.pl1 183 3 10/16/86 1139.6 mrds_rmdb_ctl.incl.pl1 >special_ldd>install>MR12.0-1187>mrds_rmdb_ctl.incl.pl1 3-46 4 10/16/86 1140.2 rmdb_relmgr_entries.incl.pl1 >special_ldd>install>MR12.0-1187>rmdb_relmgr_entries.incl.pl1 184 5 10/16/86 1139.5 rmdb_create_attr_info.incl.pl1 >special_ldd>install>MR12.0-1187>rmdb_create_attr_info.incl.pl1 185 6 10/16/86 1140.3 rmdb_crossref_info.incl.pl1 >special_ldd>install>MR12.0-1187>rmdb_crossref_info.incl.pl1 186 7 10/16/86 1139.6 rmdb_history_entry.incl.pl1 >special_ldd>install>MR12.0-1187>rmdb_history_entry.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. ATTRIBUTE_KEY_HEAD 000014 constant char(10) initial unaligned dcl 6-31 set ref 59* 141* DB_MODEL_NAME 000000 constant char(32) initial unaligned dcl 194 set ref 74* 75* 75* DOMAIN_KEY_HEAD 000012 constant char(7) initial unaligned dcl 6-32 set ref 54* 134* Icreate_attr_info_ptr parameter pointer dcl 201 ref 22 27 Irmdb_ctl_ptr parameter pointer dcl 202 ref 22 26 NULL_OFFSET constant bit(18) initial unaligned dcl 218 ref 149 156 159 Ocode parameter fixed bin(35,0) dcl 219 set ref 22 88* Oerror_message parameter char unaligned dcl 220 set ref 22 89* RMDB_ADD_ATTR_OP 000010 constant fixed bin(17,0) initial dcl 7-54 set ref 166* RMDB_ATTR_TYPE 000046 constant fixed bin(17,0) initial dcl 7-46 set ref 166* absolute_db_path 6 based char(168) level 2 packed unaligned dcl 3-25 set ref 36 46* 74* 75* 75* addr builtin function dcl 188 ref 65 adjust_bit_count_ 000010 constant entry external dcl 189 ref 74 area 000000 stack reference condition dcl 190 ref 123 131 attribute 3 based structure array level 2 packed unaligned dcl 5-14 attribute_index parameter fixed bin(17,0) dcl 102 ref 99 118 118 123 134 134 141 147 166 166 bcnt 000114 automatic fixed bin(35,0) dcl 191 set ref 74* cleanup 000000 stack reference condition dcl 192 ref 108 code 000115 automatic fixed bin(35,0) dcl 193 in procedure "rmdb_create_attribute" set ref 46* 48 48* 54* 56 59* 61 74* 75 75* 134* 137 137* 141* 143 143* 166* 175 175* code parameter fixed bin(35,0) dcl 85 in procedure "error" ref 82 88 count 1 based fixed bin(21,0) level 2 in structure "crossref_info_record" dcl 6-19 in procedure "rmdb_create_attribute" set ref 66* count 2 based fixed bin(17,0) level 2 in structure "create_attr_info" dcl 5-14 in procedure "rmdb_create_attribute" ref 39 53 69 create_attr_info based structure level 1 unaligned dcl 5-14 create_attr_info_ptr 000110 automatic pointer dcl 5-11 set ref 27* 33 39 53 54 56 59 61 69 118 118 123 134 134 141 147 166 166 create_attr_info_version_1 000020 constant char(8) initial unaligned dcl 5-12 ref 33 crossref_file_info 140 based structure level 2 unaligned dcl 3-25 crossref_info_record based structure level 1 unaligned dcl 6-19 crossref_info_record_ptr 000112 automatic pointer dcl 6-17 set ref 65* 66 134* 141 148 db_model based structure level 1 dcl 1-72 db_model_ptr 134 based pointer level 2 dcl 3-25 ref 30 dbm_area 34 based area level 2 dcl 1-72 ref 112 129 dbm_ptr 000100 automatic pointer dcl 1-106 set ref 30* 46* 112 115* 118* 129 152 156 156 159 159 162 166* 169* di_ptr 000102 automatic pointer dcl 1-155 set ref 152* 153 domain 13 based char(32) array level 3 packed unaligned dcl 5-14 set ref 54* 56* 134* 166* domain_info based structure level 1 dcl 1-125 domain_ptr 10 based bit(18) level 2 packed unaligned dcl 1-159 set ref 148* 152 error_message 000116 automatic char(500) unaligned dcl 195 set ref 46* 48* 54* 59* 134* 137* 141* 143* 166* 175* error_table_$area_too_small 000012 external static fixed bin(35,0) dcl 196 set ref 123* error_table_$no_record 000014 external static fixed bin(35,0) dcl 197 ref 56 error_table_$unimplemented_version 000016 external static fixed bin(35,0) dcl 198 set ref 33* error_table_$wrong_no_of_args 000020 external static fixed bin(35,0) dcl 199 set ref 39* fwd_thread 10(18) based bit(18) level 2 packed unaligned dcl 1-159 set ref 149* 162 163* iocb_ptr 140 based pointer level 3 dcl 3-25 set ref 29 50* 110* local_iocb 000314 automatic pointer dcl 203 set ref 29* 44 46* 50 54* 59* 134* 141* local_record_buffer 000316 automatic fixed bin(35,0) array dcl 204 set ref 65 loop 000322 automatic fixed bin(17,0) dcl 205 set ref 53* 54 56 59 61* 69* 70* mdbm_util_$inconsistent_reset 000022 constant entry external dcl 206 ref 115 169 mdbm_util_$inconsistent_set 000024 constant entry external dcl 207 ref 118 mdbm_util_$xref_build 000026 constant entry external dcl 208 ref 46 mdbm_util_$xref_create_record 000030 constant entry external dcl 209 ref 141 mdbm_util_$xref_destroy 000032 constant entry external dcl 210 ref 110 mdbm_util_$xref_find_record 000034 constant entry external dcl 211 ref 54 59 mdbm_util_$xref_reference 000036 constant entry external dcl 212 ref 134 mrds_error_$attr_already_exists 000040 external static fixed bin(35,0) dcl 213 set ref 61* mrds_error_$no_db_path 000042 external static fixed bin(35,0) dcl 214 set ref 36* mrds_error_$undefined_domain 000044 external static fixed bin(35,0) dcl 215 set ref 56* msg parameter char unaligned dcl 86 ref 82 89 name 3 based char(32) array level 3 in structure "create_attr_info" packed unaligned dcl 5-14 in procedure "rmdb_create_attribute" set ref 59* 61* 118 118 123 134* 141* 147 166* name 142 based char(32) level 3 in structure "rmdb_ctl" packed unaligned dcl 3-25 in procedure "rmdb_create_attribute" set ref 46* 110* name based char(32) level 2 in structure "unreferenced_attribute" dcl 1-159 in procedure "rmdb_create_attribute" set ref 147* new_ua_ptr 000324 automatic pointer dcl 216 set ref 107* 112 112 129* 130 147 148 149 152 156 163 null builtin function dcl 217 ref 44 54 54 59 59 107 112 offset based bit(18) level 2 packed unaligned dcl 6-19 set ref 141* 148 pathname_ 000046 constant entry external dcl 221 ref 75 75 prev_ua_ptr 000326 automatic pointer dcl 222 set ref 161* 163 ptr builtin function dcl 223 ref 152 159 162 quit 000000 stack reference condition dcl 224 ref 105 171 172 quit_intercept_flag 000330 automatic bit(1) dcl 225 set ref 104* 105* 172 rel builtin function dcl 226 ref 156 159 163 rmdb_add_rmdb_history 000050 constant entry external dcl 227 ref 166 rmdb_ctl based structure level 1 unaligned dcl 3-25 rmdb_ctl_ptr 000106 automatic pointer dcl 3-43 set ref 26* 29 30 36 46 46 46 50 74 75 75 110 110 110 rmdb_relmgr_entries based structure level 1 unaligned dcl 4-18 rtrim builtin function dcl 228 ref 118 temp_dir_path 60 based char(168) level 2 packed unaligned dcl 3-25 set ref 46* 110* ua_ptr 000104 automatic pointer dcl 1-165 set ref 159* 159* 161* 162 unreferenced 10(04) based bit(1) level 2 packed unaligned dcl 1-125 set ref 153* unreferenced_attribute based structure level 1 dcl 1-159 set ref 112 129 130* unreferenced_attribute_ptr 23 based bit(18) level 2 packed unaligned dcl 1-72 set ref 156 156* 159 unspec builtin function dcl 230 set ref 130* version based char(8) level 2 packed unaligned dcl 5-14 ref 33 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. OBJECT_HEAD internal static char(1) initial unaligned dcl 6-29 RELATION_KEY_HEAD internal static char(9) initial unaligned dcl 6-33 RMDB_ADD_DMN_OP internal static fixed bin(17,0) initial dcl 7-56 RMDB_ADD_IDX_OP internal static fixed bin(17,0) initial dcl 7-52 RMDB_ADD_REL_OP internal static fixed bin(17,0) initial dcl 7-50 RMDB_CTL_VERSION_1 internal static fixed bin(17,0) initial dcl 3-41 RMDB_DEL_ATTR_OP internal static fixed bin(17,0) initial dcl 7-55 RMDB_DEL_DMN_OP internal static fixed bin(17,0) initial dcl 7-57 RMDB_DEL_IDX_OP internal static fixed bin(17,0) initial dcl 7-53 RMDB_DEL_REL_OP internal static fixed bin(17,0) initial dcl 7-51 RMDB_DOMAIN_TYPE internal static fixed bin(17,0) initial dcl 7-45 RMDB_REL_TYPE internal static fixed bin(17,0) initial dcl 7-47 RMDB_RN_ATTR_OP internal static fixed bin(17,0) initial dcl 7-58 RMDB_RN_DMN_OP internal static fixed bin(17,0) initial dcl 7-59 RMDB_RN_REL_OP internal static fixed bin(17,0) initial dcl 7-60 ai_ptr automatic pointer dcl 2-209 al_ptr automatic pointer dcl 2-345 alloc_length internal static fixed bin(35,0) dcl 1-222 atd based char unaligned dcl 2-109 atd_len automatic fixed bin(17,0) dcl 2-111 atd_ptr automatic pointer dcl 2-110 attr_info based structure level 1 dcl 2-192 attr_list based structure level 1 dcl 2-341 attribute based structure level 1 unaligned dcl 6-99 attribute_count automatic fixed bin(17,0) dcl 6-98 attribute_list based structure level 1 unaligned dcl 6-55 attribute_list_count automatic fixed bin(17,0) dcl 6-53 attribute_list_names based char unaligned dcl 6-54 attribute_list_ptr automatic pointer dcl 6-52 attribute_ptr automatic pointer dcl 6-97 changer based structure level 1 packed unaligned dcl 1-251 changer_ptr automatic pointer dcl 1-256 child_link_info based structure level 1 dcl 2-283 cli_ptr automatic pointer dcl 2-329 cna_ptr automatic pointer dcl 2-115 comp_no_array based structure level 1 packed unaligned dcl 2-112 constant based structure level 1 unaligned dcl 1-216 constant_ptr automatic pointer dcl 1-220 create_attr_info_count automatic fixed bin(17,0) dcl 5-10 crossref_info_record_count automatic fixed bin(21,0) dcl 6-18 crossref_info_record_objects based char unaligned dcl 6-27 domain_list based structure level 1 unaligned dcl 6-45 domain_list_count automatic fixed bin(17,0) dcl 6-43 domain_list_names based char unaligned dcl 6-44 domain_list_ptr automatic pointer dcl 6-42 dp_ptr automatic pointer dcl 2-356 dup_prev based structure level 1 dcl 2-353 fi_ptr automatic pointer dcl 1-119 file_info based structure level 1 dcl 1-113 file_model based structure level 1 dcl 2-40 fixed builtin function dcl 200 fm_ptr automatic pointer dcl 2-108 message_str based structure level 1 packed unaligned dcl 1-259 message_str_len automatic fixed bin(17,0) dcl 1-269 message_str_ptr automatic pointer dcl 1-267 ncomp_init automatic fixed bin(17,0) dcl 2-116 parent_link_info based structure level 1 dcl 2-223 path_entry based structure level 1 packed unaligned dcl 1-172 path_entry_ptr automatic pointer dcl 1-177 pli_ptr automatic pointer dcl 2-268 rel_info based structure level 1 dcl 2-126 relation based structure level 1 unaligned dcl 6-77 relation_attribute_count automatic fixed bin(17,0) dcl 6-75 relation_attribute_names based char unaligned dcl 6-76 relation_list based structure level 1 unaligned dcl 6-67 relation_list_count automatic fixed bin(17,0) dcl 6-65 relation_list_names based char unaligned dcl 6-66 relation_list_ptr automatic pointer dcl 6-64 relation_ptr automatic pointer dcl 6-74 ri_ptr automatic pointer dcl 2-185 rmdb_history_entry based structure level 1 dcl 7-31 rmdb_history_entry_ptr automatic pointer dcl 7-42 rmdb_relmgr_entries_ptr automatic pointer dcl 4-32 sc_ptr automatic pointer dcl 2-365 select_chain based structure level 1 dcl 2-357 sk_ptr automatic pointer dcl 2-352 sort_key based structure level 1 dcl 2-346 stack_item based structure level 1 unaligned dcl 1-206 stack_item_ptr automatic pointer dcl 1-212 sys_info$max_seg_size external static fixed bin(35,0) dcl 229 version_status based structure level 1 packed unaligned dcl 1-232 version_status_ptr automatic pointer dcl 1-246 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN_TO_CALLER 000673 constant label dcl 79 ref 90 create_an_attribute 000731 constant entry internal dcl 99 ref 70 error 000675 constant entry internal dcl 82 ref 33 36 39 48 56 61 75 77 123 137 143 175 rmdb_create_attribute 000143 constant entry external dcl 22 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2100 2152 1603 2110 Length 2572 1603 52 404 275 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rmdb_create_attribute 316 external procedure is an external procedure. error 65 internal procedure is called by several nonquick procedures. create_an_attribute 158 internal procedure enables or reverts conditions. on unit on line 105 64 on unit on unit on line 108 88 on unit on unit on line 123 100 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rmdb_create_attribute 000100 dbm_ptr rmdb_create_attribute 000102 di_ptr rmdb_create_attribute 000104 ua_ptr rmdb_create_attribute 000106 rmdb_ctl_ptr rmdb_create_attribute 000110 create_attr_info_ptr rmdb_create_attribute 000112 crossref_info_record_ptr rmdb_create_attribute 000114 bcnt rmdb_create_attribute 000115 code rmdb_create_attribute 000116 error_message rmdb_create_attribute 000314 local_iocb rmdb_create_attribute 000316 local_record_buffer rmdb_create_attribute 000322 loop rmdb_create_attribute 000324 new_ua_ptr rmdb_create_attribute 000326 prev_ua_ptr rmdb_create_attribute 000330 quit_intercept_flag rmdb_create_attribute THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc return_mac tra_ext_1 signal_op enable_op shorten_stack ext_entry_desc int_entry int_entry_desc op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. adjust_bit_count_ mdbm_util_$inconsistent_reset mdbm_util_$inconsistent_set mdbm_util_$xref_build mdbm_util_$xref_create_record mdbm_util_$xref_destroy mdbm_util_$xref_find_record mdbm_util_$xref_reference pathname_ rmdb_add_rmdb_history THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$area_too_small error_table_$no_record error_table_$unimplemented_version error_table_$wrong_no_of_args mrds_error_$attr_already_exists mrds_error_$no_db_path mrds_error_$undefined_domain LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000136 26 000156 27 000162 29 000165 30 000167 33 000171 36 000215 39 000237 44 000262 46 000266 48 000326 50 000344 53 000347 54 000357 56 000427 59 000454 61 000524 63 000550 65 000552 66 000554 69 000555 70 000565 71 000573 74 000575 75 000617 77 000656 79 000673 82 000674 88 000710 89 000715 90 000725 99 000730 104 000736 105 000740 107 000761 108 000764 110 001000 112 001034 115 001044 116 001055 118 001056 123 001162 129 001232 130 001242 131 001245 134 001246 137 001324 141 001344 143 001410 147 001430 148 001442 149 001444 152 001446 153 001453 156 001455 159 001466 161 001476 162 001500 163 001506 166 001512 169 001542 171 001552 172 001553 175 001561 178 001601 ----------------------------------------------------------- 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