COMPILATION LISTING OF SEGMENT rmdb_create_and_pop_rel Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 08/01/88 1332.8 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* *********************************************************** */ 8 9 rmdb_create_and_pop_rel: proc (I_rmdb_ctl_ptr, I_db_path, I_temp_dir_path, I_sel_exp, 10 I_rmdb_sel_val_info_ptr, I_index_attrs_ptr, O_err_msg, O_err_code); 11 12 /* BEGIN_DESCRIPTION 13* 14* The purpose of this procedure is to create and populate a relation 15* given a selection expression like that provided for define_temp_rel. 16* The relation name is contained in the I_index_attrs structure. The 17* attributes for the relation are defined by the selected attributes 18* specified in the selection expression. Indexed attributes are in 19* the index_attr_structure, and were defined outside this procedure. 20* 21* This procedure opens the database twice: to translate the selection 22* expression to get the relation attributes, and after the relation 23* has been created and is needed to store the selected tuples. 24* 25* . END_DESCRIPTION 26**/ 27 28 /* HISTORY 29* 82-04-23 Written by Roger Lackey 30* 31* 82-06-15 Roger Lackey : added the init of db_model_ptr to 32* rmdb_delete_rel_info in tidy_up procedure. 33* 34* 82-06-25 Roger Lackey : changed to use divide builtin and undo request 35* to use -brief instead of -force 36* 37* 82-07-01 Roger Lackey : Modified the calls to mu_db_inconsistent to use 38* mdbm_util_$inconsistent_* for binding. 39* 40* 82-07-02 R. Harvey : Modified calls to mrds_dsl_translate, mu_define_area, 41* and mu_get_tuple for binding. 42* 43* 82-07-01 Roger Lackey : changed mu_database_index$get_resultant_model_pointer 44* to mdbm_util_$get_resultant_model_pointer and 45* mu_store$store_direct to mdbm_util_$store_direct 46* for binding 47* 48* 82-08-20 D. Woodka : deleted reference to rm_rel_info.max_data_len for 49* DMS conversion. 50* 51* 82-09-15 Mike Kubicar : converted to use vectors. 52* 53* 82-11-18 D. Woodka : changed calling sequence to include rmdb_ctl_ptr. 54* 55* 83-02-07 Mike Kubicar : Added transaction processing include files. 56* 57* 83-02-15 Davids: modified to use the new db_type_flags in the db_model 58* structure instead of the old numeric db_type. 59* 60* 83-04-08 Mike Kubicar : Changed calling sequence of mdbm_util_$direct. 61* 62**/ 63 64 65 /****^ HISTORY COMMENTS: 66* 1) change(87-01-22,Hergert), approve(88-07-11,MCR7903), 67* audit(88-07-26,Dupuis), install(88-08-01,MR12.2-1073): 68* For new parser, changed referneces of sel_ptr to select_list_ptr. 69* END HISTORY COMMENTS */ 70 71 72 /* PARAMETERS */ 73 dcl I_rmdb_ctl_ptr ptr; /* ptr to rmdb_ctl used to access relation_manager entries */ 74 dcl I_db_path char (*) parameter;/* Database path were are working with */ 75 dcl I_temp_dir_path char (*) parameter;/* Temporary diretory pathname */ 76 dcl I_sel_exp char (*) parameter;/* Selection expresion like that of define_temp_rel */ 77 dcl I_rmdb_sel_val_info_ptr ptr parameter; /* Pointer rmdb_sel_val_info structure */ 78 dcl I_index_attrs_ptr pointer parameter; /* Pointer to the rmdb_index_attrs structure */ 79 dcl O_err_msg char (*) parameter;/* Error message text */ 80 dcl O_err_code fixed bin (35) parameter; /* Error code */ 81 82 83 /* rmdb_create_and_pop_rel: proc (I_rmdb_ctl_ptr, I_db_path, I_temp_dir_path, I_sel_exp, 84* I_rmdb_sel_val_info_ptr, I_index_attrs_ptr, O_err_msg, O_err_code); */ 85 86 87 must_delete_relation = "0"b; 88 sel_exp_ptr = addr (I_sel_exp); 89 sel_exp_len = length (I_sel_exp); 90 rmdb_sel_val_info_ptr = I_rmdb_sel_val_info_ptr; 91 rmdb_ix_attrs_ptr = I_index_attrs_ptr; 92 rmdb_ctl_ptr = I_rmdb_ctl_ptr; 93 O_err_msg = ""; 94 O_err_code = 0; 95 rel_name = rtrim (rmdb_ix_attrs.relation_name); 96 dbi = 0; 97 ftf = "1"b; /* first time flag */ 98 99 on cleanup call tidy_up; 100 101 if I_db_path = " " then 102 call error (mrds_error_$no_db_path, ""); 103 else db_path = I_db_path; 104 105 call hcs_$initiate (db_path, "db_model", "", 0, 0, dbm_ptr, code); /* Get pointer to db_model */ 106 if dbm_ptr = null then call error (mrds_error_$no_database, "^/" || db_path); 107 108 if db_model.db_type_flags.transactions_needed 109 then do; 110 mstxn_transactions_needed = "1"b; 111 call transaction_manager_$get_current_txn_id (mstxn_txn_id, mstxn_code); 112 if mstxn_code = 0 then do; 113 mstxn_txn_id = "0"b; 114 call error (error_table_$action_not_performed, 115 "Relations may not be created while a transaction " || 116 "is in progress. Commit or abort the transaction " || 117 "and try again."); 118 end; 119 end; 120 else mstxn_transactions_needed = "0"b; 121 mstxn_txn_id = "0"b; 122 123 /* See if a relation by this name already exists in db */ 124 125 call hcs_$initiate (db_path, rel_name || ".m", "", 0, 0, fm_ptr, code); 126 127 if fm_ptr ^= null then call error (mrds_error_$dup_rel, "^/" || rel_name); 128 129 on cleanup 130 begin; 131 call tidy_up; 132 call mstxn_cleanup; 133 end; 134 on any_other call mstxn_any_other; 1 1 /* ====== BEGIN INCLUDE FILE mrds_start_transaction.incl.pl1 =========================== */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), 1 7* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 1 8* This entry is being made to cover the changes made on 85-05-06 and 1 9* 85-04-19 by Thanh Nguyen. The dependency on dbcb.user_started_transaction 1 10* was removed because not all modules need the dbcb, and the 1 11* user_transaction_id field was added for mrds_dsl_retrieve (mrds error 1 12* list #136). 1 13* END HISTORY COMMENTS */ 1 14 1 15 1 16 /* 1 17* BEGIN_DESCRIPTION 1 18* 1 19* A generalized routine accessed by all MRDS modules (with the temporary 1 20* (perhaps) exception of restructuring modules) that must start transactions 1 21* if none are present. The intent is that it be executed as inline code. 1 22* The variable mstxn_transactions_needed must be set prior to entering this 1 23* code. In most cases a simple assignment from dbcb_data.transactions_needed 1 24* will suffice. Included are procedures called mstxn_cleanup and 1 25* mstxn_any_other. These procedures must be called by cleanup and any_other 1 26* handlers in the program. Such handlers should be established just prior to 1 27* the inclusion of this code and disabled just following the inclusion of 1 28* mrds_finish_transaction. Directly prior to establishing the handlers 1 29* mstxn_txn_id must be set to "0"b. This must be done even though this 1 30* include file does the same, because this code might not have been entered 1 31* yet when the handler is invoked. Directly following this include file the 1 32* contents of mstxn_code should be examined. If zero, then either the 1 33* transaction was successfully started or no transaction was required. If the 1 34* mrds_finish_transaction code is referenced in general error handling 1 35* situations where the possibility exists that the code in this include file 1 36* has not been executed, it is necessary to initialize mstxn_txn_id to "0"b at 1 37* the beginning of the program. 1 38* 1 39* END_DESCRIPTION 1 40* 1 41* Written 82-09-28 by Paul W. Benjamin. 1 42* Modified 82-12-09 by PWB to include mstxn_any_other. 1 43* Modified 83-01-07 by PWB to not reference the dbcb. 1 44* Modified 83-01-10 by PWB to add a call to continue_to_signal_ to the 1 45* any_other handler in situations where the module did 1 46* not start the transaction. 1 47* Modified 83-05-05 by PWB to abandon when abort fails. 1 48* Modified 83-05-18 by PWB to use mstxn_temp_code in calls to abandon and 1 49* and abort. 1 50* Modified 83-05-19 by PWB to handle transaction_deadlock and 1 51* transaction_bj_full conditions. 1 52* Modified 84-02-04 by PWB to add trailing underscores to the 2 conditions 1 53* and to handle transaction_lock_timeout_. 1 54* Modified 85-04-14 by Thanh Nguyen: Added code to set the 1 55* dbcb.user_started_transaction flag. 1 56* Modified 85-04-19 by Thanh Nguyen to add user_started_transaction flag. 1 57* Modified 85-05-06 By Thanh Nguyen to synchronize this include file in the 1 58* directory >ldd>include and >exl>mrd>i 1 59**/ 1 60 1 61 dcl continue_to_signal_ entry (fixed bin(35)); 1 62 dcl dm_error_$no_current_transaction fixed bin (35) ext static; 1 63 dcl error_table_$null_info_ptr fixed bin(35) ext static; 1 64 dcl find_condition_info_ entry (ptr, ptr, fixed bin(35)); 1 65 dcl mstxn_code fixed bin (35); 1 66 dcl mstxn_retries fixed; 1 67 dcl mstxn_temp_code fixed bin (35); 1 68 dcl mstxn_transactions_needed bit (1) aligned; 1 69 dcl user_started_transaction bit (1) aligned; 1 70 dcl mstxn_txn_id bit (36) aligned; 1 71 dcl user_transaction_id bit (36) aligned; 1 72 dcl transaction_manager_$abandon_txn entry (bit (36) aligned, fixed bin (35)); 1 73 dcl transaction_manager_$abort_txn entry (bit (36) aligned, fixed bin (35)); 1 74 dcl transaction_manager_$begin_txn entry (fixed bin, fixed bin (35), bit (36) aligned, fixed bin (35)); 1 75 dcl transaction_manager_$get_current_txn_id entry (bit (36) aligned, fixed bin (35)); 1 76 dcl transaction_manager_$handle_conditions entry (); 1 77 dcl 1 mstxn_condition_info like condition_info; 1 78 2 1 /* START OF: dm_tm_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 2 2 2 3 /* HISTORY: 2 4* 2 5*Designed by Matthew C. Pierret, 01/26/82. 2 6*Coded by Jeffrey D. Ives, 04/30/82. 2 7*Modified: 2 8*10/18/82 by Steve Herbst: Names changed. 2 9*01/19/83 by Steve Herbst: Added (LOWEST HIGHEST)_MODE. 2 10**/ 2 11 2 12 dcl (LOWEST_MODE init (1), 2 13 HIGHEST_MODE init (8)) fixed bin int static options (constant); 2 14 2 15 dcl TM_NORMAL_MODE fixed bin static options (constant) init (1); 2 16 dcl TM_STATISTICAL_MODE fixed bin static options (constant) init (2); 2 17 dcl TM_READ_ONLY_MODE fixed bin static options (constant) init (3); 2 18 dcl TM_NEVER_WRITE_MODE fixed bin static options (constant) init (4); 2 19 dcl TM_TEST_NORMAL_MODE fixed bin static options (constant) init (5); 2 20 dcl TM_TEST_STATISTICAL_MODE fixed bin static options (constant) init (6); 2 21 dcl TM_TEST_READ_ONLY_MODE fixed bin static options (constant) init (7); 2 22 dcl TM_TEST_NEVER_WRITE_MODE fixed bin static options (constant) init (8); 2 23 2 24 /* END OF: dm_tm_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 1 79 1 80 3 1 /* BEGIN INCLUDE FILE ... condition_info.incl.pl1 */ 3 2 3 3 /* Structure for find_condition_info_. 3 4* 3 5* Written 1-Mar-79 by M. N. Davidoff. 3 6**/ 3 7 3 8 /* automatic */ 3 9 3 10 declare condition_info_ptr pointer; 3 11 3 12 /* based */ 3 13 3 14 declare 1 condition_info aligned based (condition_info_ptr), 3 15 2 mc_ptr pointer, /* pointer to machine conditions at fault time */ 3 16 2 version fixed binary, /* Must be 1 */ 3 17 2 condition_name char (32) varying, /* name of condition */ 3 18 2 info_ptr pointer, /* pointer to the condition data structure */ 3 19 2 wc_ptr pointer, /* pointer to wall crossing machine conditions */ 3 20 2 loc_ptr pointer, /* pointer to location where condition occured */ 3 21 2 flags unaligned, 3 22 3 crawlout bit (1), /* on if condition occured in lower ring */ 3 23 3 pad1 bit (35), 3 24 2 pad2 bit (36), 3 25 2 user_loc_ptr pointer, /* ptr to most recent nonsupport loc before condition occurred */ 3 26 2 pad3 (4) bit (36); 3 27 3 28 /* internal static */ 3 29 3 30 declare condition_info_version_1 3 31 fixed binary internal static options (constant) initial (1); 3 32 3 33 /* END INCLUDE FILE ... condition_info.incl.pl1 */ 1 81 1 82 1 83 mstxn_code = 0; 1 84 mstxn_txn_id = "0"b; 1 85 1 86 if ^mstxn_transactions_needed /* only need transactions */ 1 87 then goto mstxn_exit; /* for protected page files */ 1 88 mstxn_retries = 0; 1 89 call transaction_manager_$get_current_txn_id (mstxn_txn_id, mstxn_code); 1 90 if mstxn_code ^= dm_error_$no_current_transaction /* and if none already in progress */ 1 91 then do; 1 92 user_started_transaction = "1"b; 1 93 user_transaction_id = mstxn_txn_id; /* better save it for mrds_dsl_retrieve */ 1 94 mstxn_txn_id = "0"b; /* you didn't start it, it's none of your business */ 1 95 goto mstxn_exit; 1 96 end; 1 97 1 98 user_started_transaction = "0"b; 1 99 call transaction_manager_$begin_txn (TM_NORMAL_MODE, 0, mstxn_txn_id, mstxn_code); 1 100 user_transaction_id = mstxn_txn_id; /* better save it for mrds_dsl_retrieve */ 1 101 1 102 mstxn_cleanup: 1 103 proc; 1 104 1 105 /* This procedure MUST be called by a cleanup handler. */ 1 106 1 107 if mstxn_txn_id ^= "0"b 1 108 then do; 1 109 call transaction_manager_$abort_txn (mstxn_txn_id, mstxn_temp_code); 1 110 if mstxn_temp_code ^= 0 1 111 then call transaction_manager_$abandon_txn (mstxn_txn_id, mstxn_temp_code); 1 112 end; 1 113 1 114 end mstxn_cleanup; 1 115 1 116 mstxn_any_other: 1 117 proc; 1 118 1 119 /* This procedure MUST be called by an any_other handler. */ 1 120 1 121 if mstxn_txn_id ^= "0"b 1 122 then do; 1 123 call find_condition_info_ (null (), addr(mstxn_condition_info), mstxn_temp_code); 1 124 if mstxn_condition_info.condition_name = "transaction_deadlock_" 1 125 then do; 1 126 mftxn_code = dm_error_$lock_deadlock; 1 127 goto mftxn_check_code; 1 128 end; 1 129 else if mstxn_condition_info.condition_name = "transaction_bj_full_" 1 130 | mstxn_condition_info.condition_name = "transaction_lock_timeout_" 1 131 then do; 1 132 mftxn_code = dm_error_$bj_journal_full; 1 133 goto mftxn_check_code; 1 134 end; 1 135 else call transaction_manager_$handle_conditions; 1 136 end; 1 137 else call continue_to_signal_ (mstxn_code); /* code returned will always be zero */ 1 138 end mstxn_any_other; 1 139 1 140 mstxn_exit: 1 141 1 142 /* ------ END INCLUDE FILE mrds_start_transaction.incl.pl1 --------------------------- */ 135 136 if mstxn_code ^= 0 137 then call error (mstxn_code, "Could not start a transaction while creating relation " || rtrim (rel_name) || "."); 138 call dsl_$open (db_path, dbi, EXCLUSIVE_UPDATE, code); 139 if code ^= 0 then call error (code, "^/" || db_path); 140 141 call mdbm_util_$get_resultant_model_pointer (dbi, dbcb_ptr); /* Get the dbcb pointer */ 142 if dbcb_ptr = null then 143 call error (mrds_error_$invalid_db_index, "Getting dbcb_ptr"); 144 145 call mdbm_util_$define_temp_dir_area (dbcb.def_temp_rel_area_ptr, dbi, (sys_info$max_seg_size), 146 "MRDS.def_tr", "0"b /* not extensible */, "1"b /* no freeing */, "0"b, 147 "0"b /* no zeroing */, code); 148 work_area_ptr = dbcb.def_temp_rel_area_ptr; 149 if code ^= 0 then call error (code, ""); 150 151 num_sel_vals = rmdb_sel_val_info.sv_num; /* Cause translate changes them */ 152 sel_val_arg_list_ptr = rmdb_sel_val_info.data_list_ptr; 153 sel_val_desc_list_ptr = rmdb_sel_val_info.desc_list_ptr; 154 155 call mdbm_util_$mrds_dsl_translate (dbcb_ptr, work_area_ptr, 4, sel_exp_ptr, sel_exp_len, 156 sel_val_arg_list_ptr, sel_val_desc_list_ptr, 157 num_sel_vals, code); 158 if code ^= 0 then call error (code, "^/""" || I_sel_exp || """"); 159 160 if ^dbcb.val_dtr then call error (mrds_error_$inval_dtr_expr, 161 "^/""" || I_sel_exp || """"); 162 163 if dbcb.ss_ptr ^= null then do; /* set ptrs needed later */ 164 ss_ptr = dbcb.ss_ptr; 165 select_list_ptr = select_sets.items.select_ptr (1); 166 range_ptr = select_sets.items.range_ptr (1); 167 end; 168 else do; 169 range_ptr = dbcb.range_ptr; /* initialize */ 170 select_list_ptr = dbcb.select_ptr; 171 end; 172 173 rmdb_create_rel_info_alloc = select_list.num_items; 174 allocate rmdb_create_rel_info in (work_area) set (rmdb_create_rel_info_ptr); 175 rmdb_create_rel_info.version = RMDB_CREATE_REL_INFO_VERSION_1; 176 rmdb_create_rel_info.db_path = I_db_path; 177 rmdb_create_rel_info.temp_directory_path = I_temp_dir_path; 178 rmdb_create_rel_info.db_model_ptr = dbm_ptr; 179 rmdb_create_rel_info.relation_name = rmdb_ix_attrs.relation_name; 180 rmdb_create_rel_info.num_attrs = select_list.num_items; 181 182 do i = 1 to select_list.num_items; 183 rai_ptr = select_list.item.ai_ptr (i); /* Get rm_attr_info_ptr */ 184 rmdb_create_rel_info.attrs (i).name = rm_attr_info.model_name; 185 rmdb_create_rel_info.attrs (i).primary_key = select_list.item (i).key; 186 rmdb_create_rel_info.attrs (i).indexed = "0"b; /* Will mark those index in index_attr_mark proc */ 187 rmdb_create_rel_info.attrs (i).mbz = "0"b; 188 end; 189 190 call index_attr_mark; /* Internal proc */ 191 192 must_delete_relation = "1"b; /* In case an error occurs during creating */ 193 194 /* The call to rmdb_create_relation will set the db inconsistent during the 195* creation period but will then return the db to a consistent state prior to 196* returning */ 197 198 call rmdb_create_relation (rmdb_ctl_ptr, rmdb_create_rel_info_ptr, "0"b /* Not called from request level */, err_msg, code); 199 if code ^= 0 then call error (code, err_msg); 200 201 call dsl_$close (dbi, code); 202 if code ^= 0 then call error (code, "First close of db"); 203 204 dbi = 0; 205 206 call store; /* Internal procedure */ 207 208 must_delete_relation = "0"b; 209 210 if ftf then /* The relation was created 211* but no tuples stored because nothing was found that 212* matched the selection_exp */ 213 call error (mrds_error_$no_tuple, 214 "^/The relation was created but was not populated because" || 215 "^/there were no tuples that satisfied the selection expression."); 216 call tidy_up; 217 218 exit: 219 mftxn_code = O_err_code; 4 1 /* ====== BEGIN INCLUDE FILE mrds_finish_transaction.incl.pl1 =========================== */ 4 2 4 3 4 4 4 5 /****^ HISTORY COMMENTS: 4 6* 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), 4 7* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 4 8* This entry is being made to cover the change made on 85-05-06 by Thanh 4 9* Nguyen. The code now checks a local flag. (mrds error list #136). 4 10* END HISTORY COMMENTS */ 4 11 4 12 4 13 /* 4 14* BEGIN_DESCRIPTION 4 15* 4 16* A generalized routine accessed by all MRDS modules that begin and commit 4 17* transactions. The intent is that it be executed as inline code. It is 4 18* assumed that mrds_start_transaction was executed previously in the 4 19* procedure. Prior to this include file the program should assign the value 4 20* of its local error code to mftxn_code. The program utilizing this 4 21* include file must supply a function labeled should_rollback that returns 4 22* bit (1). This routine should examine the error code mftxn_code and whether 4 23* the transaction should be aborted or rolled back. "0"b means abort and "1"b 4 24* means rollback. This procedure may choose to simply return "0"b as it 4 25* appears that MRDS will generally NOT rollback transactions. This routine 4 26* does rollback and restart if the before journal is full but only attempts it 4 27* once. A procedure labelled restore_significant_data must also be supplied, 4 28* where any data that was saved prior to the transaction is restored. A 4 29* procedure consisting solely of a return statement can be supplied if 4 30* necessary. After execution of this include file, mftxn_code must be 4 31* examined. If it was 0 before entering the code and is non-zero afterward, 4 32* then the commit has failed. Otherwise it will be unchanged. 4 33* 4 34* END_DESCRIPTION 4 35* 4 36* Written 82-09-30 by Paul W. Benjamin. 4 37* Modified 83-01-13 by PWB to add retry on deadlocks and to return a non-zero 4 38* error code only when the transaction is in an error state. 4 39* Modified 83-02-04 by PWB to reset transaction id to 0 upon completion. 4 40* Modified 83-05-05 by PWB to abort when rollback fails, abandon when abort 4 41* fails, and to abort rather than rollback when bj is full. 4 42* Modified 83-05-18 by PWB to use mftxn_temp_code in calls to abandon, abort 4 43* and rollback. 4 44* Modified 83-05-19 by PWB to add mftxn_check_code label. It is transferred 4 45* to by the mstxn_any_other procedure. 4 46* Modified 85-04-14 by Thanh Nguyen not to commit the transaction in case of 4 47* the user already started his own transaction. 4 48* Modified 85-05-06 by Thanh Nguyen to synchronize this include file between 4 49* the directory >ldd>include and >exl>mrd>i. 4 50**/ 4 51 4 52 dcl dm_error_$bj_journal_full fixed bin(35) ext static; 4 53 dcl dm_error_$lock_deadlock fixed bin(35) ext static; 4 54 dcl mftxn_code fixed bin (35); 4 55 dcl mftxn_temp_code fixed bin (35); 4 56 dcl transaction_manager_$commit_txn entry (bit (36) aligned, fixed bin (35)); 4 57 dcl transaction_manager_$rollback_txn entry (bit (36) aligned, fixed bin (17), fixed bin (35)); 4 58 4 59 4 60 if mstxn_txn_id = "0"b | user_started_transaction = "1"b /* No transaction or we did not started it */ 4 61 then do; 4 62 mftxn_code = 0; 4 63 goto mftxn_exit; 4 64 end; 4 65 mftxn_check_code: 4 66 if mftxn_code = 0 4 67 then do; 4 68 call transaction_manager_$commit_txn (mstxn_txn_id, mftxn_code); 4 69 if mftxn_code ^= 0 4 70 then do; 4 71 call transaction_manager_$abort_txn (mstxn_txn_id, mftxn_temp_code); 4 72 if mftxn_temp_code ^= 0 4 73 then call transaction_manager_$abandon_txn (mstxn_txn_id, mftxn_temp_code); 4 74 end; 4 75 end; 4 76 else do; 4 77 call restore_significant_data; 4 78 if mftxn_code = dm_error_$lock_deadlock /* retry just once if deadlock */ 4 79 & mstxn_retries < 1 4 80 then do; 4 81 mstxn_retries = mstxn_retries + 1; 4 82 call transaction_manager_$rollback_txn (mstxn_txn_id, 0, mftxn_temp_code); 4 83 if mftxn_temp_code ^= 0 4 84 then do; 4 85 call transaction_manager_$abort_txn (mstxn_txn_id, mftxn_temp_code); 4 86 if mftxn_temp_code ^= 0 4 87 then call transaction_manager_$abandon_txn (mstxn_txn_id, mftxn_temp_code); 4 88 end; 4 89 else do; 4 90 mstxn_code = 0; 4 91 goto mstxn_exit; /* go back and try again */ 4 92 end; 4 93 end; 4 94 else if should_rollback () /* let the program decide */ 4 95 then do; 4 96 call transaction_manager_$rollback_txn (mstxn_txn_id, 0, mftxn_temp_code); 4 97 if mftxn_temp_code ^= 0 4 98 then do; 4 99 call transaction_manager_$abort_txn (mstxn_txn_id, mftxn_temp_code); 4 100 if mftxn_temp_code ^= 0 4 101 then call transaction_manager_$abandon_txn (mstxn_txn_id, mftxn_temp_code); 4 102 end; 4 103 else do; 4 104 mstxn_code = 0; 4 105 goto mstxn_exit; /* go back and try again */ 4 106 end; 4 107 end; 4 108 else do; 4 109 call transaction_manager_$abort_txn (mstxn_txn_id, mftxn_temp_code); 4 110 if mftxn_temp_code ^= 0 4 111 then call transaction_manager_$abandon_txn (mstxn_txn_id, mftxn_temp_code); 4 112 end; 4 113 end; 4 114 mstxn_txn_id = "0"b; /* should never be nonzero unless there is a txn */ 4 115 mftxn_exit: 4 116 4 117 /* ------ END INCLUDE FILE mrds_finish_transaction.incl.pl1 --------------------------- */ 220 221 if mftxn_code ^= 0 then do; 222 O_err_code = mftxn_code; 223 O_err_msg = "Could not finish a transaction while creating relation " || rtrim (rel_name) || "."; 224 end; 225 return; 226 227 228 /* * * * * * * * * * * * * index_attr_mark * * * * * * * * * * * * * * */ 229 230 231 index_attr_mark: proc; 232 233 do k = 1 to rmdb_ix_attrs.num_used; /* All indexed attrs */ 234 235 attr_name = rmdb_ix_attrs.an (k); 236 237 found = "0"b; 238 239 do j = 1 to rmdb_create_rel_info.num_attrs while (^found); /* Search for name in list */ 240 241 if attr_name = rmdb_create_rel_info.attrs (j).name then do; 242 243 if rmdb_create_rel_info.attrs (j).indexed = "1"b then 244 call error (mrds_error_$previously_defined_index, "^/" || attr_name); 245 246 rmdb_create_rel_info.attrs (j).indexed = "1"b; /* Mark as indexed */ 247 found = "1"b; 248 end; 249 250 end; 251 252 if ^found then call error (mrds_error_$undef_attr, 253 "^/" || attr_name); 254 255 end; /* END All indexed attrs */ 256 257 end index_attr_mark; 258 259 /* * * * * * * * * * * * * * * store * * * * * * * * * * * * * * * */ 260 261 store: proc; 262 263 /* This internal procedure opens the db for the second time so the opening 264* includes the newly created relation and stores each tuple selected. 265* 266* If a tuple's primary key is found to duplicate that of a previously stored 267* tuple the second tuple is NOT stored and no error reported. 268* 269* The database is set inconsistent just prior to beginning the stores */ 270 271 272 273 /* Open db again this time with new relation in it */ 274 275 call dsl_$open (db_path, dbi, EXCLUSIVE_UPDATE, code); 276 if code ^= 0 then call error (code, "^/" || db_path); 277 278 call mdbm_util_$get_resultant_model_pointer (dbi, dbcb_ptr); /* Get the dbcb pointer */ 279 if dbcb_ptr = null then 280 call error (mrds_error_$invalid_db_index, "Getting dbcb_ptr"); 281 282 call mdbm_util_$define_temp_dir_area (dbcb.def_temp_rel_area_ptr, dbi, (sys_info$max_seg_size), 283 "MRDS.def_tr", "0"b /* not extensible */, "1"b /* no freeing */, "0"b, 284 "0"b /* no zeroing */, code); 285 work_area_ptr = dbcb.def_temp_rel_area_ptr; 286 287 if code ^= 0 then call error (code, ""); 288 289 num_sel_vals = rmdb_sel_val_info.sv_num; /* Cause translate changes them */ 290 sel_val_arg_list_ptr = rmdb_sel_val_info.data_list_ptr; 291 sel_val_desc_list_ptr = rmdb_sel_val_info.desc_list_ptr; 292 293 call mdbm_util_$mrds_dsl_translate (dbcb_ptr, work_area_ptr, 4, sel_exp_ptr, sel_exp_len, 294 sel_val_arg_list_ptr, sel_val_desc_list_ptr, 295 num_sel_vals, code); 296 if code ^= 0 then call error (code, "^/""" || I_sel_exp || """"); 297 298 if dbcb.ss_ptr ^= null then do; /* set ptrs needed later */ 299 ss_ptr = dbcb.ss_ptr; 300 select_list_ptr = select_sets.items (1).select_ptr; 301 range_ptr = select_sets.items (1).range_ptr; 302 ti_ptr = select_sets.items (1).ti_ptr; 303 end; 304 else do; 305 range_ptr = dbcb.range_ptr; /* initialize */ 306 select_list_ptr = dbcb.select_ptr; 307 ti_ptr = dbcb.ti_ptr; 308 end; 309 310 rdbi_ptr = dbcb.rdbi_ptr; /* Pointer to rm_db_info */ 311 rmra_ptr = rm_db_info.ra_ptr; /* find rel info */ 312 313 /* search for rel_name in rm_rel_array so we can get the rmri_ptr */ 314 315 i = index (string (rm_rel_array.name), "!" || 316 rmdb_ix_attrs.relation_name); 317 i = (divide ((i - 1), 33, 17)) + 1; /* convert from char to array index */ 318 rmri_ptr = rm_rel_array.rel_data.ri_ptr (i); 319 dbcb.last_store_rel_name = "!!!!!!!... ...!!!!!"; /* Temparory store bad rel name incase this store fails */ 320 321 call mdbm_util_$inconsistent_set (dbm_ptr, "create_relation", /* Cause rmdb_create_relation reset it */ 322 "Creating relation " || rel_name, "delete_relation " || rel_name || " -brief"); 323 324 quit_received = "0"b; /* Not yet */ 325 326 stv_number_of_dimensions = mrds_data_$max_attributes; 327 allocate simple_typed_vector; 328 329 simple_typed_vector.type = SIMPLE_TYPED_VECTOR_TYPE; 330 331 332 call mdbm_util_$mu_get_tuple (dbcb_ptr, work_area_ptr, rmri_ptr, simple_typed_vector_ptr, code); /* get a tuple */ 333 334 RESTART: on quit quit_received = "1"b; /* Hold off quits til end of loop */ 335 336 do while (code = 0); /* As long as there are tuples to be retrieved */ 337 338 call mdbm_util_$store_direct (dbcb_ptr, 339 rmri_ptr, simple_typed_vector_ptr, code); /* add tuple */ 340 if code = 0 | code = dm_error_$key_duplication then do; 341 /* ignore duplicates */ 342 ftf = "0"b; 343 dbcb.another_flag = "1"b; 344 call mdbm_util_$mu_get_tuple (dbcb_ptr, work_area_ptr, rmri_ptr, simple_typed_vector_ptr, code); 345 end; 346 347 if quit_received then do; /* If user quit during the loop so we will NOW let it go thru */ 348 quit_received = "0"b; 349 revert quit; 350 signal quit; 351 on quit quit_received = "1"b; 352 end; 353 354 end; 355 356 revert quit; 357 358 if quit_received then do; /* If user quit during the loop so we will NOW let it go thru */ 359 quit_received = "0"b; 360 signal quit; 361 end; 362 363 on cleanup call tidy_up; 364 365 if code = mrds_error_$tuple_not_found then code = 0; 366 else call error (code, ""); 367 368 369 370 end store; 371 372 373 /* * * * * * * * * * * * * * * error * * * * * * * * * * * * * * */ 374 375 376 377 error: proc (err_code, err_message); 378 379 dcl err_code fixed bin (35); 380 dcl err_message char (*); 381 382 383 O_err_code = err_code; 384 O_err_msg = err_message; 385 call tidy_up; 386 goto exit; 387 388 end error; 389 390 391 392 393 394 395 396 397 /* * * * * * * * * * * * * * * * tidy_up * * * * * * * * * * * * * * * */ 398 399 tidy_up: proc; 400 401 code = 0; 402 403 if dbi ^= 0 then call dsl_$close (dbi, code); 404 if code = 0 then dbi = 0; 405 406 if must_delete_relation then do; 407 delete_rel_info.version = RMDB_DELETE_REL_INFO_VERSION_1; 408 delete_rel_info.absolute_db_path = db_path; 409 delete_rel_info.db_model_ptr = dbm_ptr; 410 delete_rel_info.relation_name = rel_name; 411 delete_rel_info.brief = "1"b; 412 delete_rel_info.mbz = "0"b; 413 414 call rmdb_delete_relation$cleanup (rmdb_ctl_ptr, addr (delete_rel_info), err_msg, code); 415 end; 416 417 if code = 0 then call mdbm_util_$inconsistent_reset (dbm_ptr); /* Make db consistnert */ 418 419 420 end tidy_up; 421 422 /*********** 423** 424** These routines are used by the transaction processing include files. 425** Restore_significant_data is called to reinitialize variables in case 426** of a rollback. Should_rollback determines whether a transaction should 427** be rolled back or aborted on error. Currently, it is always aborted. 428** 429***********/ 430 431 432 restore_significant_data: 433 proc; 434 delete_rel_info.version = RMDB_DELETE_REL_INFO_VERSION_1; 435 delete_rel_info.absolute_db_path = db_path; 436 delete_rel_info.db_model_ptr = dbm_ptr; 437 delete_rel_info.relation_name = rel_name; 438 delete_rel_info.brief = "1"b; 439 delete_rel_info.mbz = "0"b; 440 call rmdb_delete_relation$cleanup (rmdb_ctl_ptr, 441 addr (delete_rel_info), err_msg, code); 442 must_delete_relation = "0"b; 443 ftf = "1"b; 444 end restore_significant_data; 445 446 447 448 should_rollback: 449 proc returns (bit (1)); 450 return ("0"b); 451 end should_rollback; 452 453 454 dcl addr builtin; 455 dcl any_other condition; 456 dcl attr_name char (32); 457 dcl cleanup condition; 458 dcl code fixed bin (35); 459 dcl dbi fixed bin (35); 460 dcl db_path char (168); 461 dcl divide builtin; 462 dcl dsl_$close entry () options (variable); 463 dcl dsl_$open entry () options (variable); 464 dcl err_msg char (256); 465 dcl error_table_$action_not_performed fixed bin (35) ext static; 466 dcl EXCLUSIVE_UPDATE int static options (constant) init (4); 467 dcl fixed builtin; 468 dcl fm_ptr ptr; 469 dcl found bit (1); 470 dcl ftf bit (1) aligned; 471 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 472 dcl i fixed bin; 473 dcl index builtin; 474 dcl j fixed bin; 475 dcl k fixed bin; 476 dcl length builtin; 477 dcl dm_error_$key_duplication fixed bin (35) ext static; 478 dcl mrds_data_$max_select_items ext fixed bin (35); 479 dcl mdbm_util_$mrds_dsl_translate entry (ptr, ptr, fixed bin, ptr, fixed bin, ptr, ptr, fixed bin, fixed bin (35)); 480 dcl mrds_error_$dup_rel fixed bin (35) ext static; 481 dcl mrds_error_$invalid_db_index fixed bin (35) ext static; 482 dcl mrds_error_$inval_dtr_expr fixed bin (35) ext static; 483 dcl mrds_error_$no_database fixed bin (35) ext static; 484 dcl mrds_error_$no_db_path fixed bin (35) ext static; 485 dcl mrds_error_$no_tuple fixed bin (35) ext static; 486 dcl mrds_error_$previously_defined_index fixed bin (35) ext static; 487 dcl mrds_error_$tuple_not_found fixed bin (35) ext static; 488 dcl mrds_error_$undef_attr fixed bin (35) ext static; 489 dcl must_delete_relation bit (1); 490 dcl mdbm_util_$get_resultant_model_pointer entry (fixed bin (35), ptr); 491 dcl mdbm_util_$inconsistent_reset entry (ptr); 492 dcl mdbm_util_$inconsistent_set entry (ptr, char (*), char (*), char (*)); 493 dcl mdbm_util_$define_temp_dir_area entry (ptr, fixed bin (35), fixed bin (18), char (11), bit (1) aligned, bit (1) aligned, bit (1) aligned, bit (1) aligned, fixed bin (35)); 494 dcl mdbm_util_$mu_get_tuple entry (ptr, ptr, ptr, ptr, fixed bin (35)); 495 dcl mdbm_util_$store_direct entry (ptr, ptr, ptr, fixed bin (35)); 496 dcl mrds_data_$max_attributes ext fixed bin (35); 497 dcl null builtin; 498 dcl num_sel_vals fixed bin; 499 dcl quit condition; 500 dcl quit_received bit (1); 501 dcl range_ptr ptr; 502 dcl rel builtin; 503 dcl rel_name char (32) varying; 504 dcl rmdb_create_relation entry (ptr, ptr, bit (1), char (*), fixed bin (35)); 505 dcl rmdb_ctl_ptr ptr; 506 dcl rmdb_delete_relation$cleanup entry (ptr, ptr, char (*), fixed bin (35)); 507 dcl rtrim builtin; 508 dcl sel_exp_len fixed bin; 509 dcl sel_exp_ptr ptr; 510 dcl sel_val_arg_list_ptr ptr; 511 dcl sel_val_desc_list_ptr ptr; 512 dcl string builtin; 513 dcl sys_info$max_seg_size fixed bin (35) ext static; 514 dcl work_area area based (work_area_ptr); 515 dcl work_area_ptr ptr; 516 517 518 519 520 dcl 1 delete_rel_info aligned 521 like rmdb_delete_rel_info; 522 523 5 1 /* BEGIN mrds_dbcb.incl.pl1 -- jaw, 11/7/78 */ 5 2 5 3 5 4 5 5 /****^ HISTORY COMMENTS: 5 6* 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), 5 7* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 5 8* This entry is being made to cover the change made on 85-07-01 by Thanh 5 9* Nguyen. The scopes_changed flag was added to make checking for this 5 10* more efficient (mrds error list #137). 5 11* 2) change(86-06-10,Blair), approve(86-08-07,MCR7491), 5 12* audit(86-08-07,Gilcrease), install(86-08-15,MR12.0-1127): 5 13* Add a bit called dont_check_txn_id to indicate whether or not we should 5 14* care if multiple txns use the same selection_expression. (mrds #156) 5 15* 3) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 5 16* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 5 17* Added parser_work_area_ptr and mrds_se_info_ptr for new parser. 5 18* END HISTORY COMMENTS */ 5 19 5 20 5 21 /* WARNING 5 22* If the dbcb structure is changed then the mrds_data_ 5 23* item saved_res_version MUST be incremented to invalidate all 5 24* existing saved resultants 5 25**/ 5 26 5 27 /* HISTORY : 5 28* 5 29* modified by Jim Gray - - 80-10-24, to add new_select_expr bit for 5 30* tid_list management 5 31* 5 32* 81-1-9 Jim Gray : added like reference for ease in making the 5 33* phony resultant in mu_database_index, without having the area dcl 5 34* included. 5 35* 5 36* 81-06-17 Roger Lackey : added last_store_rel_name for use by 5 37* mrds_dsl_store 5 38* 5 39* 81-06-26 Roger Lackey : Added no_optimize and print_search_order 5 40* switches 5 41* 5 42* 81-07-06 Jim Gray : added identifier for the current selection 5 43* expression, so that relation statistics can be updated relative 5 44* to number of selection expressions seem. Also removed init for 5 45* last_store_rel_name, as this iw now properly done in 5 46* mrds_dsl_init_res. 5 47* 5 48* 81-07-17 Roger Lackey : added pred_ptr and unused_ptrs. 5 49* 5 50* 82-08-19 Mike Kubicar : added store_vector field. This is needed 5 51* for the conversion to the relation manager. 5 52* 5 53* 82-08-23 Davids: added the relmgr_entries and access_costs 5 54* substructures so that the entries and costs can change 5 55* depending on the type of database that is opened. 5 56* 5 57* 82-09-09 Mike Kubicar : added modify_vector field. This is needed 5 58* since modify uses a different vector type (general) than does store. 5 59* 5 60* 82-09-20 Davids: changed names of (store modify)_vector to 5 61* (store modify)_vector_ptr. Also (delete modify)_tuple_by_id to 5 62* (delete modify)_tuples_by_id. added the element cursor_storage_ptr 5 63* which should be inited to null and will be set by mu_cursor_manager_$get 5 64* during the first call. 5 65* 5 66* 82-09-21 Davids: renamed cursor_storage_ptr to cursor_ptrs_storage_ptr 5 67* since it deals with the pointers to the cursors and not the cursors 5 68* themelves and added the element cursor_storage_area_ptr which points 5 69* to the area where the cursors are kept. 5 70* 5 71* 82-09-22 Davids: renamed the transact_ctl_seg to transactions_needed. 5 72* the transact_ctl_seg always had a value of 0 and really didn't mean 5 73* anything. 5 74* 5 75* 82-09-22 Mike Kubicar : added create_relation, create_index and 5 76* destroy_relation_by_opening to relmgr_entries. They are needed 5 77* by mrds_dsl_define_temp_rel. 5 78* 5 79* 82-09-24 Donna Woodka : added put_tuple to relmgr_entries. It 5 80* is needed by mu_store. 5 81* 5 82* 82-11-12 Davids: changed the declaration of the access_costs from fixed 5 83* bin to float bin since the values are not integers. 5 84* 5 85* 83-02-02 Davids: added the dbc_uid element. This will allow mrds to make 5 86* sure that the dbc_ptr still points to the correct segment. Element was 5 87* added to the end of the structure to allow modules that don't use 5 88* the element to continue to reference the dbcb structure without recompiling. 5 89* 5 90* 83-02-25 Davids: added the concurrency_on and rollback_on elements. These 5 91* are needed so that temp rels can be created with the same file attributes 5 92* as the permanent relations. 5 93* 5 94* 83-05-02 Mike Kubicar : Deleted get_next_search_specification_ptr and 5 95* added the resultant_in_pdir bit. 5 96* 5 97* 83-05-18 Davids: reduced the number of reserved bits to 14 (from 15) and 5 98* added the res_already_made element. 5 99* 5 100* 83-05-24 Mike Kubicar : Updated the relation manager calling sequences. 5 101* 5 102* 83-08-03 Mike Kubicar : Added the element_id_list_segment_ptr and removed 5 103* one of the unused pointers. 5 104* 5 105* 83-09-20 Ron Harvey: Added relmgr_entries.get_population. 5 106* 5 107* 84-08-27 John Hergert: Created compiled_se_info_ptr from unused_ptrs(2) 5 108* leaving unused_ptrs(1). 5 109* 5 110* 85-01-15 Thanh Nguyen: Added the work_area_ptr and removed the last 5 111* unused_ptrs (1). 5 112* 5 113* 85-04-12 Thanh Nguyen: Added user_started_transaction and 5 114* non_shared_to_shared flags. Also added se_transaction_id and some more 5 115* spare ptrs, entries and reserved storages for future enhancement, since 5 116* we changed the saved_res_version from rslt0001 to rslt0002. 5 117* 5 118* 85-07-01 Thanh Nguyen: Added scopes_changed flag. This flag is set by 5 119* common routine of mrds_dsl_set_scope, reset by mrds_dsl_optimize and 5 120* mrds_dsl_gen_srch_prog when building of a new search_vars. 5 121**/ 5 122 5 123 5 124 /* this structure is based on the {unique_name}.mrds.dbcb segment 5 125* that constitutes the non-secure portion of the resultant model that is 5 126* created during the opening of a database. it contains variables that 5 127* are used during the runtime access of the database, and an area 5 128* for evaluation of requests. it points to four other 5 129* segments in the resultant model, {unique_name}.mrds.rdbi, the secure 5 130* portion of the resultant(see mdbm_rm_db_info.incl.pl1), 5 131* {unique_name}.mrds.select, an area for selection expression evaluation, 5 132* {unique_name}.mrds.curdat, and {unique_name}.mrds.stadat, two segments 5 133* used in the elimination of duplicate tuples during a retrieve. 5 134* the dbcb area holds the structure in mdbm_scope_info.incl.pl1 5 135* that is used when the database is using the file scope mechanism 5 136* for concurrency control over file readying. the segment overlayed via 5 137* mrds_dbc.incl.pl1 structure is pointed to and also handles concurrency control, 5 138* across database openings. the pointer to this dbcb structure is kept in a table 5 139* which associates database indexes(returned from a call to dsl_$open), with particular 5 140* opening instances of resultant models. (see mu_database_index routine) */ 5 141 5 142 dcl 1 dbcb aligned based (dbcb_ptr), /* DBCB -- non-secure portion */ 5 143 2 data like dbcb_data, 5 144 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (dbcb.static_area)))); 5 145 5 146 dcl dbcb_ptr ptr; 5 147 5 148 declare 1 dbcb_data based, /* info part of dbcb, separated out so that 5 149* like references can avoid getting the area declaration */ 5 150 2 rdbi_ptr ptr, /* pointer to write protected mdbm_util_ info. */ 5 151 2 range_ptr ptr, /* ptr to range structure, or null */ 5 152 2 select_ptr ptr, /* ptr to select list, or null */ 5 153 2 sv_ptr ptr, /* pointer to search variables */ 5 154 2 so_ptr ptr, /* pointer to search operators */ 5 155 2 ti_ptr ptr, /* pointer to tuple info */ 5 156 2 lit_ptr ptr, /* pointer to the literal area, or null */ 5 157 2 current_ptr ptr, /* ptr to select list resulting from -current clause */ 5 158 2 ss_ptr ptr, /* ptr to select sets block if not simple s.e. */ 5 159 2 retr_info_ptr ptr, /* ptr to retrieve info area */ 5 160 2 trel_info_ptr ptr, /* ptr to retrieve info area */ 5 161 2 sti_ptr ptr, /* pointer to store info */ 5 162 2 dbc_ptr ptr, /* pointer to the data base control segment */ 5 163 2 sfi_ptr ptr, /* points to head of scalar function list */ 5 164 2 scope_ptr ptr, /* points to array of scope tuples */ 5 165 2 select_area_ptr ptr, /* ptr to area for current selection expression allocations */ 5 166 2 current_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 5 167* for eliminating duplicate tuples. */ 5 168 2 static_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve 5 169* for eliminating duplicate tuples. */ 5 170 2 store_area_ptr ptr, /* temp storage area for dsl_$store */ 5 171 2 retrieve_area_ptr ptr, /* temp storage for dsl_$retrieve */ 5 172 2 modify_area_ptr ptr, /* temp storage area for dsl_$modify */ 5 173 2 delete_area_ptr ptr, /* temp storage area for dsl_$delete */ 5 174 2 def_temp_rel_area_ptr ptr, /* temp storage area for dsl_$define_temp_rel */ 5 175 2 pred_ptr ptr, /* Pointer to pred_array */ 5 176 2 store_vector_ptr ptr, /* Vector structure used during store operations */ 5 177 2 modify_vector_ptr ptr, /* Used during modifies */ 5 178 2 element_id_list_segment_ptr ptr, /* Points to the segment used to hold element_id_list structures */ 5 179 2 compiled_se_info_ptr ptr, /* points to the segment containing all info on compiled sexs */ 5 180 2 work_area_ptr ptr, /* Work area for encode/decode value allocations in mu_retrieve */ 5 181 2 se_info_ptr ptr, /* Points to se_info struct. Primarily for error reports */ 5 182 2 parser_work_area_ptr ptr, /* work area for parser */ 5 183 2 reserved_ptrs (4) ptr, /* Reserved for future use */ 5 184 2 another_flag bit (1) unal, /* on if predicate was -another */ 5 185 2 current_flag bit (1) unal, /* on if predicate was -current clause */ 5 186 2 dbc_incr bit (1) unal, /* on if dbc open mode has been incremented for this user */ 5 187 2 delete_flag bit (1) unal, /* On if search was called from mrds_dsl_sec_delete */ 5 188 2 dup_retain bit (1) unaligned, /* On if dup tuples allowed for retrieval */ 5 189 2 prev_select bit (1) unal, /* on if prev. select block processed in this s.e. */ 5 190 2 possible_op bit (1) unal, /* on of arith op. allowed */ 5 191 2 sel_clause bit (1) unal, /* on if currently in select clause */ 5 192 2 dsm_sw bit (1) unal, /* on if data base was opened via data submodel */ 5 193 2 val_rtrv bit (1) unal, /* if s.e. valid for retrieve */ 5 194 2 val_mod bit (1) unal, /* for modify */ 5 195 2 val_del bit (1) unal, /* for delete */ 5 196 2 val_dtr bit (1) unal, /* for define temp rel */ 5 197 2 transactions_needed bit (1) unal, /* On => transaction must be started or in progress does 5 198* not imply that the database is of type page_file */ 5 199 2 open_mode bit (3) unal, /* 0=>unknown, 1=>r, 2=>u, 3=>er, 4=>eu, >4=>bad */ 5 200 2 new_select_expr bit (1) unal, /* on => starting a new tid list management period */ 5 201 2 no_optimize bit (1) unal, /* On => no optimize */ 5 202 2 print_search_order bit (1) unal, /* On => print the search order */ 5 203 2 resultant_in_pdir bit (1) unal, /* On => Temp segments are in the process dir */ 5 204 2 res_already_made bit (1) unal, /* On => resultant has been made based on a saved copy */ 5 205 2 user_started_transaction bit (1) unal, /* On => user already started his own transaction. */ 5 206 2 non_shared_to_shared bit (1) unal, /* On => user changed the scope from non shared to shared 5 207* inside a sequence of -another selection expression. */ 5 208 2 scopes_changed bit (1) unal, /* On => scopes had been changed by set_scopes or delete_scopes */ 5 209 2 dont_check_txn_id bit (1) unal, /* On => cpmd needs same selection exp across multiple txns */ 5 210 2 reserved bit (10) unal, /* reserved for future use */ 5 211 2 nseq_sch fixed bin (35), /* no. tuples located via sequential search */ 5 212 2 nind_sch fixed bin (35), /* no. tuples located via index search */ 5 213 2 nhash_sch fixed bin (35), /* no. tuples located via hash search */ 5 214 2 nlk_sch fixed bin (35), /* no tuples located via link search */ 5 215 2 cur_lit_offset fixed bin (35), /* current bit offset in literal string */ 5 216 2 dbi fixed bin (35), /* database index for this opening */ 5 217 2 last_s_e_id_num fixed bin (35), /* identifying number for last selection expression seen */ 5 218 2 se_transaction_id bit (36) aligned, /* transaction id from beginning of select expression */ 5 219 2 last_store_rel_name char (32), /* Name of relation last used for store */ 5 220 2 cursor_ptrs_storage_ptr ptr, /* pointer to space where cursor ptrs are stored */ 5 221 2 cursor_storage_area_ptr ptr, /* pointer to area where the cursors are kept */ 5 222 2 reserved_words (10) fixed bin (35), /* Reserved for future use */ 5 223 2 relmgr_entries, /* relation manager entries */ 5 224 3 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 5 225 3 close entry (bit (36) aligned, fixed bin (35)), 5 226 3 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)), 5 227 3 destroy_cursor entry (ptr, ptr, fixed bin (35)), 5 228 3 set_scope entry (bit (36) aligned, bit (2) aligned, bit (2) aligned, fixed bin (35)), 5 229 3 delete_tuples_by_id entry (ptr, ptr, fixed bin (35), fixed bin (35)), 5 230 3 modify_tuples_by_id entry (ptr, ptr, ptr, fixed bin (35), fixed bin (35)), 5 231 3 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 5 232 3 get_tuples_by_spec entry (ptr, ptr, ptr, ptr, ptr, fixed bin (35)), 5 233 3 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 5 234 3 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 5 235 3 get_count entry (ptr, ptr, fixed bin (35), fixed bin (35)), 5 236 3 get_duplicate_key_count entry (ptr, bit (36) aligned, fixed bin (17), fixed bin (35), fixed bin (35)), 5 237 3 get_population entry (ptr, fixed bin (35), fixed bin (35)), 5 238 3 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, bit (36) aligned, fixed bin (35)), 5 239 3 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), bit (36) aligned, fixed bin (35)), 5 240 3 destroy_relation_by_path entry (char (*), char (*), fixed bin (35)), 5 241 3 reserved_entries (5) entry (), 5 242 2 access_costs, /* access costs for permute */ 5 243 3 total_primary_key_cost float bin, 5 244 3 access_cost float bin, 5 245 3 access_overhead float bin, 5 246 3 us_access_cost float bin, 5 247 3 os_access_cost float bin, 5 248 2 dbc_uid bit (36) aligned, /* uid of the segment containing the dbc structure */ 5 249 2 concurrency_on bit (1) unal, /* "1"b implies dmfile concurrency is being used */ 5 250 2 rollback_on bit (1) unal; /* "1"b iomplies before journaling is to be done */ 5 251 5 252 /* END mrds_dbcb.incl.pl1 */ 5 253 5 254 524 525 6 1 /* BEGIN mdbm_rm_rel_array.incl.pl1 -- jaw, 8/9/78 */ 6 2 6 3 /* WARNING 6 4* If the rm_rel_array structure is changed then the mrds_data_ 6 5* item saved_res_version MUST be incremented to invalidate all 6 6* existing saved resultants 6 7**/ 6 8 6 9 /* HISTORY: 6 10* 6 11* 81-05-28 Jim Gray : added model_name and file_id as part of 6 12* combining funtions of file_array and rel_array into one 6 13* structure. This will only allow 1 relation per file model now. 6 14* Also changed structure to allow more efficient searching 6 15* via and index builtin, rather than a programmed loop. 6 16* Search is now I = index(string(rm_rel_array.name), "!" || in_name) 6 17* with I = ((I - 1) / 33) + 1 to convert from a char to array index. 6 18* 6 19**/ 6 20 6 21 6 22 /* this structure is allocated in the static are of the structure 6 23* in mdbm_rm_db_info.incl.pl1, the secure portion of the database 6 24* resultant model upon opening the database. two copies are 6 25* allocated, one for temporary relations, initially empty, and one 6 26* for relations known to the opener, which has a length sufficient 6 27* for all relations known to the user, but whose names, etc. will 6 28* not be filled in until the file containing that particular 6 29* relation is readied. the rm_db_info structure contains a pointer 6 30* to the rel_arrays, and the array entries, when "readied", point 6 31* to the mdbm_rm_rel_info.incl.pl1 structures containing model 6 32* information about the relation, it's attributes, etc. */ 6 33 6 34 dcl 1 rm_rel_array aligned based (rmra_ptr), /* array of open relations */ 6 35 2 num_rels fixed bin, /* no. rels in db. */ 6 36 2 name (1:rm_num_rels_init refer (rm_rel_array.num_rels)) unal, 6 37 3 mark char (1) unal, /* separator character = "!" */ 6 38 3 submodel char (32) unal, /* name of relation is submodel view, model opening => model name */ 6 39 2 rel_data (rm_num_rels_init refer (rm_rel_array.num_rels)), 6 40 3 model_name char (30), /* name of relation in model */ 6 41 3 ri_ptr ptr unal ; /* pointer to rm_rel_info */ 6 42 6 43 dcl rmra_ptr ptr; 6 44 dcl rm_num_rels_init fixed bin; 6 45 6 46 /* END mdbm_rm_rel_array.incl.pl1 */ 6 47 6 48 526 527 7 1 /* BEGIN INCLUDE FILE mdbm_db_model.incl.pl1 -- jaw, 10/2/78 */ 7 2 7 3 7 4 /****^ HISTORY COMMENTS: 7 5* 1) change(79-02-01,Gray), approve(), audit(), install(): 7 6* modified to save space occupied by model 7 7* 2) change(80-11-03,Gray), approve(), audit(), install(): 7 8* to add mdbm_secured bit in db_model 7 9* 3) change(82-04-09,Davids), approve(), audit(), install(): 7 10* collapsed the following into an unused_offset array: 7 11* chng_before_path_ptr chng_err_path_ptr chng_after_path_ptr 7 12* copy_before_path_ptr copy_err_path_ptr copy_after_path_ptr 7 13* dsply_before_path_pt dsply_err_path_pt dsply_after_path_ptr 7 14* accs_before_path_ptr accs_err_path_ptr accs_after_path_ptr 7 15* unused_1 7 16* Also changed the name of unused_2 to restructuring_history_offset 7 17* and changed the comment on the changer structure to indicate 7 18* that it will contain on database creation information. 7 19* 4) change(82-04-14,Davids), approve(), audit(), install(): 7 20* used one of the unused_offsets to point to a message which indicates 7 21* why the db is inconsistent. The offset will be null when the db is created 7 22* and set the first time the message is used. this is so it will be 7 23* consistent with existing data bases. Also added the message structure. 7 24* 5) change(82-04-28,Davids), approve(), audit(), install(): 7 25* added the undo_request element to the message structure 7 26* 6) change(82-05-04,Davids), approve(), audit(), install(): 7 27* changed unused_offset (12) to last_restructruring_history_offset and 7 28* changed restructuring_history_offset to first_restructuring_history_offset 7 29* 7) change(82-08-19,Davids), approve(), audit(), install(): 7 30* changed the meaning of db_type from 1 => relational and 2 => CODASYL to 7 31* 1 => vfile database and 2 => page_file database. Up to this point all 7 32* database types were equal to 1. 7 33* 8) change(83-02-14,Davids), approve(), audit(), install(): 7 34* changed db_type from a fixed bin unal to a substructure of 18 bit (1) unal 7 35* flags. This will allow information about transactions and dm_file 7 36* concurrency to be independent of the db_type, i.e. vfile or dm_file. The 7 37* change is compatable with all datamodels created by the released version 7 38* of mrds. 7 39* 9) change(83-02-15,Davids), approve(), audit(), install(): 7 40* added the rollback_on flag to the db_type_flags since it appears that you 7 41* can have a dmfile database that requires transactions but does not have any 7 42* journalizing. Also switched the order of the transactions_needed and 7 43* concurrency_on flags - this makes the change compatable with existing 7 44* dmfile databases except when displaying the model since concurrency_on and 7 45* rollback_on will be off in the model even though the dmfile relations had 7 46* them on during creation. 7 47* 10) change(83-02-22,Kubicar), approve(), audit(), install(): 7 48* Removed ctl_file_path_ptr. 7 49* 11) change(85-11-08,Spitzer), approve(85-12-03,MCR7311), 7 50* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 7 51* used 1 unused offset for unreferenced attribute linked lists in db_model, 7 52* 1 unused bit flag in domain_info to indicate an unreferenced domain, 1 bit 7 53* in the flag word for rmdb copying. 7 54* END HISTORY COMMENTS */ 7 55 7 56 7 57 /* this include file contains the structures that go into the make up 7 58* of the "db_model" segment in the model for the database. 7 59* in addition there file_model.m segments, 1 for each database file(see mdbm_file_model.incl.pl1) 7 60* 7 61* the db_model structure goes at the base of the segment, and contains items unique to 7 62* the whole databse. in addition, it has an area of size to fill the 7 63* rest of a segment, that holds the lists of files and domains in the database. 7 64* these lists are singly forward linked lists. all "pointers" in the database model 7 65* are maintained as offsets(bit (18)) from the base of the particular model segment 7 66* since actual pointers are process dependent on segment number. 7 67* the remaining structures are first a path_entry one to save pathnames in, 7 68* and the stack_item and constent structures, used to save a boolean 7 69* expression in polish form, with the stack represented by a linked list. 7 70* the final structure is one for identifying the status of version information */ 7 71 7 72 dcl 1 db_model aligned based (dbm_ptr),/* base of db_model segment, allocated once per database */ 7 73 2 version unal fixed bin, /* data base version, currently 4 */ 7 74 2 db_type_flags unal, 7 75 3 copy_good bit (1) unal, /* "1"b => copy of the db_model is the valid copy */ 7 76 3 unused (13) bit (1) unal, 7 77 3 rollback_on bit (1) unal, /* "1"b => before journaling is to be done */ 7 78 3 concurrency_on bit (1) unal, /* "1"b => dm_file concurrency is being used */ 7 79 3 transactions_needed bit (1) unal, /* "1"b => transactions are needed to reference data */ 7 80 3 vfile_type bit (1) unal, /* "1"b => vfile type relations, "0"b => dm_file type relations */ 7 81 2 uniq_sw_name char (32), /* per database unique attach switch name for files */ 7 82 2 consistant bit (1) unal, /* ON => correctly created/restructured database, ok to open */ 7 83 2 mdbm_secured bit (1) unal, /* on => database has been secured */ 7 84 2 reserved bit (34) unal, /* reserved for flags */ 7 85 2 blk_file_id_len unal fixed bin, /* no. bits required for blocked file id. */ 7 86 2 unblk_file_id_len unal fixed bin, /* number of file id bits, unblocked file */ 7 87 2 num_blk_files unal fixed bin, /* number of blocked files defined in db */ 7 88 2 num_unblk_files unal fixed bin, /* number of unblocked files defined in db */ 7 89 2 num_rels unal fixed bin, /* number of relations defined in db. */ 7 90 2 num_domains unal fixed bin, /* number of domains defined */ 7 91 2 num_dyn_links unal fixed bin, /* no. dynamic links defined */ 7 92 2 max_max_tuples unal fixed bin (35), /* maximum max_tuples across all files */ 7 93 2 pad_1 unal fixed bin (35), /* for future use */ 7 94 2 pad_2 unal fixed bin (35), /* for future use */ 7 95 2 version_ptr bit (18), /* offset to version structure */ 7 96 2 file_ptr unal bit (18), /* offset to first in threaded list of file_infos */ 7 97 2 domain_ptr unal bit (18), /* offset to first in list of domain_infos */ 7 98 2 unreferenced_attribute_ptr unal bit (18), /* offset to first in list of unreferenced attr_infos */ 7 99 2 unused_offsets (11) unal bit (18), /* extra offsets if needed */ 7 100 2 last_restructuring_history_offset unal bit (18), /* offset to last restructuring history entry */ 7 101 2 inconsistent_message_offset unal bit (18), /* offset to message indicating why db is inconsistent */ 7 102 2 first_restructuring_history_offset unal bit (18), /* offset to first restructuring history entry */ 7 103 2 changer_ptr unal bit (18), /* offset to information about db creation */ 7 104 2 dbm_area area (sys_info$max_seg_size - fixed (rel (addr (db_model.dbm_area))) - 1); 7 105 7 106 dcl dbm_ptr ptr; 7 107 7 108 /* the files in the database each have a file_info containing 7 109* their name, the file_model for each file is found by initiating the 7 110* segment "file_name.m" (i.e. the file's name with suffix ".m") 7 111* the file_info list is a singly linked list in definition order */ 7 112 7 113 dcl 1 file_info aligned based (fi_ptr), /* list of file names and numbers */ 7 114 2 file_name char (30), /* name of file */ 7 115 2 file_id bit (36), /* id number of file */ 7 116 2 fwd_ptr unal bit (18), /* thread to next in list */ 7 117 2 unused unal bit (18); /* for future expansion */ 7 118 7 119 dcl fi_ptr ptr; 7 120 7 121 /* each domain used in the database will have a domain info saved in the db_model 7 122* segment. it describes the domain of the given name, and it's options. 7 123* the domain_info's form a singly linked list in definition order */ 7 124 7 125 dcl 1 domain_info aligned based (di_ptr), /* one for each domain defined */ 7 126 2 name char (32), /* name of domain */ 7 127 2 db_desc_is_ptr bit (1) unal, /* on if descriptor is pointer to real desc. */ 7 128 2 user_desc_is_ptr bit (1) unal, /* on if user desc is ptr */ 7 129 2 no_conversion bit (1) unal, /* if no conversion allowed */ 7 130 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 7 131 2 unreferenced bit (1) unal, /* on => this domain is not used in any attribute */ 7 132 2 reserved bit (31) unal, 7 133 2 db_desc bit (36), /* desc. for item in db, or ptr to it */ 7 134 2 user_desc bit (36), /* desc. for user-visible attr, or ptr */ 7 135 2 ave_len fixed bin (35), /* average length of varying string */ 7 136 2 nck_items unal fixed bin, /* no. items in check stack */ 7 137 2 fwd_thread unal bit (18), /* offset to next in list */ 7 138 2 check_path_ptr unal bit (18), /* integ. check proc. */ 7 139 2 ck_stack_ptr unal bit (18), /* to check stack */ 7 140 2 encd_path_ptr unal bit (18), /* encode procedure */ 7 141 2 decd_path_ptr unal bit (18), /* decode procedure */ 7 142 2 str_before_path_ptr unal bit (18), /* proc paths and entries */ 7 143 2 str_err_path_ptr unal bit (18), 7 144 2 str_after_path_ptr unal bit (18), 7 145 2 get_before_path_ptr unal bit (18), 7 146 2 get_err_path_ptr unal bit (18), 7 147 2 get_after_path_ptr unal bit (18), 7 148 2 mod_before_path_ptr unal bit (18), 7 149 2 mod_err_path_ptr unal bit (18), 7 150 2 mod_after_path_ptr unal bit (18), 7 151 2 unused_1 unal bit (18), /* for future expansion */ 7 152 2 unused_2 unal bit (18), 7 153 2 changer_ptr unal bit (18); /* pointer to change_id and chane_time structure */ 7 154 7 155 dcl di_ptr ptr; 7 156 7 157 /* information necessary for attributes that are not used in any relation */ 7 158 7 159 dcl 1 unreferenced_attribute aligned based (ua_ptr), 7 160 2 name char (32), /* name of attribute */ 7 161 2 domain_ptr bit (18) unal, /* to domain_info */ 7 162 2 fwd_thread bit (18) unal, /* to next in list */ 7 163 2 unused (2) bit (18) unal; 7 164 7 165 dcl ua_ptr ptr; 7 166 7 167 7 168 /* space saving pathname$entryname structure, to be allocated 7 169* only when a path$entry has to be saved, else only a bit(18) 7 170* offset takes up space in the main model structure */ 7 171 7 172 declare 1 path_entry based (path_entry_ptr), 7 173 2 path char (168), /* pathname portion of desired path$entry */ 7 174 2 entry char (32), /* entryname portion of desired path$entry */ 7 175 2 reserved unal bit (36); /* for future use */ 7 176 7 177 declare path_entry_ptr ptr; 7 178 7 179 7 180 7 181 7 182 7 183 /* declarations for model of postfix stack holding the check option boolean expression 7 184* the following encoding values indicate the corresponding type of stack element 7 185* 7 186* 1 = 7 187* 2 ^= 7 188* 3 > 7 189* 4 < 7 190* 5 >= 7 191* 6 <= 7 192* 7 193* 10 and 7 194* 20 or 7 195* 30 not 7 196* 7 197* 40 - (minus) 7 198* 7 199* 50 domain variable(same name as domain) 7 200* 7 201* 60 constant(number, bit string, or character string) 7 202* 7 203**/ 7 204 7 205 7 206 declare 1 stack_item based (stack_item_ptr), /* element of stack model list */ 7 207 2 next bit (18), /* link to next in list */ 7 208 2 type fixed binary, /* code for this element type */ 7 209 2 value_ptr bit (18); /* pointer to variable holding value, 7 210* if this is a constant element type */ 7 211 7 212 declare stack_item_ptr ptr; /* pointer to a stack element */ 7 213 7 214 7 215 7 216 declare 1 constant based (constant_ptr), /* variable size space for constant's value storage */ 7 217 2 length fixed bin (35), /* length allocated to hold value */ 7 218 2 value bit (alloc_length refer (constant.length)) aligned; /* value for this constant */ 7 219 7 220 declare constant_ptr ptr; /* pointer to constant's value space */ 7 221 7 222 declare alloc_length fixed binary (35) internal static; /* amount of space to allocate for constant's value */ 7 223 7 224 /* version structure, giving status of source for CMDB/RMDB, 7 225* status of model, and status of resultant */ 7 226 7 227 /* version number is in form MM.N.Y 7 228* where MM is the major version number, N is the minor version alteration, 7 229* and Y is the lastest modification to that alteration, 7 230* where M and N represent numbers 0-9, and Y is a letter */ 7 231 7 232 declare 1 version_status unal based (version_status_ptr), 7 233 2 cmdb_rmdb, 7 234 3 major fixed bin, 7 235 3 minor fixed bin, 7 236 3 modification char (4), 7 237 2 model, 7 238 3 major fixed bin, 7 239 3 minor fixed bin, 7 240 3 modification char (4), 7 241 2 resultant, 7 242 3 major fixed bin, 7 243 3 minor fixed bin, 7 244 3 modification char (4); 7 245 7 246 declare version_status_ptr ptr; 7 247 7 248 7 249 /* maintains information only about the db creation */ 7 250 7 251 declare 1 changer unal based (changer_ptr), 7 252 2 id char (32), 7 253 2 time fixed bin (71), 7 254 2 next bit (18); /* to next in the singly linked list */ 7 255 7 256 declare changer_ptr ptr; 7 257 7 258 7 259 dcl 01 message_str unal based (message_str_ptr), /* general purpose structure to hold messages */ 7 260 02 len fixed bin, /* length of the message */ 7 261 02 text char (message_str_len refer (message_str.len)), /* actual message */ 7 262 02 name char (32), /* name of thing that set the message */ 7 263 02 undo_request char (100), /* rmdb request that will undo the operation 7 264* that caused the database to become inconsistent */ 7 265 02 mbz bit (36); /* for possible extensions, like an offset to another message */ 7 266 7 267 dcl message_str_ptr ptr; /* pointer to the message_str structure */ 7 268 7 269 dcl message_str_len fixed bin; /* initail length of the text string in message_str */ 7 270 7 271 /* END INCLUDE FILE mdbm_db_model.incl.pl1 */ 7 272 7 273 528 529 8 1 /* BEGIN mrds_select_list.incl.pl1 -- jaw 10/20/78 */ 8 2 8 3 /* HISTORY: 8 4* 8 5* 81-06-01 Jim Gray : removed user len and type elements, 8 6* since mu_convert rather than assign_ is now used. 8 7* 8 8* 84-11-22 John Hergert: added fr_ptr 8 9* 8 10*/****^ HISTORY COMMENTS: 8 11* 1) change(86-07-17,Dupuis), approve(86-08-05,MCR7491), audit(86-08-08,Blair), 8 12* install(86-08-15,MR12.0-1127): 8 13* 85-11-22 Hergert: Added variable var_exists so that it may be kept 8 14* around per select expression (in sets) and when compiling. (mrds #158) 8 15* 2) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 8 16* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 8 17* For new parser, (and general readability) renamed sel_ptr to 8 18* select_list_ptr. 8 19* END HISTORY COMMENTS */ 8 20 8 21 8 22 dcl 1 select_list based (select_list_ptr), /* tabular representation of -select clause */ 8 23 2 num_vars fixed bin, /* number of free variables */ 8 24 2 mla_ptr ptr, /* pointer to array of move list pointers */ 8 25 2 fr_ptr ptr, /* pointer to free_raltions struct in mrds_dsl_select_clause */ 8 26 2 num_items fixed bin, /* number of attributes specified in select list */ 8 27 2 var_exists (36) bit(1), 8 28 2 item (mrds_data_$max_select_items refer (select_list.num_items)), 8 29 3 must_convert bit (1) unal, /* on if conversion required */ 8 30 3 key bit (1) unal, /* on if to be key attr. in temp. rel. */ 8 31 3 index bit (1) unal, /* on if index attribute in temp rel */ 8 32 3 reserved bit (33) unal, /* reserved for future use */ 8 33 3 var_index fixed bin, /* index of assoc. tuple variable */ 8 34 3 ai_ptr ptr, /* ptr to attr_info */ 8 35 3 user_desc_ptr ptr, /* to descriptor for user value */ 8 36 3 user_ptr ptr ; /* pointer to user's area */ 8 37 8 38 dcl select_list_ptr ptr int automatic init (null ()); 8 39 8 40 dcl 1 move_list_array (select_list.num_vars) based (select_list.mla_ptr), 8 41 2 var_index fixed bin, 8 42 2 ml_ptr ptr; 8 43 8 44 /* END mrds_select_list.incl.pl1 */ 8 45 530 531 9 1 /* BEGIN mrds_select_sets.incl.pl1 rdl, 2/27/79 */ 9 2 9 3 dcl 1 select_sets aligned based (ss_ptr), 9 4 2 dup_retain bit (1) unal, /* ON => duplicate selected tuples must be preserved */ 9 5 2 pad bit (35) unal, /* Resevered for furture use */ 9 6 2 domains (mrds_data_$max_select_items) char (32), /* domain name of each select item */ 9 7 2 nitems fixed bin, /* Number of items in this structure */ 9 8 2 items (nitems_init refer (select_sets.nitems)), 9 9 3 oper_flag bit (1) unal, /* On => this item is an operator */ 9 10 3 pad bit (35) unal, /* Reserved for future use */ 9 11 3 op_code fixed bin, /* Valid only if oper_flag id on 9 12* 1 -> union 9 13* 2 => intersection 9 14* 3 => Difference */ 9 15 3 range_ptr ptr, /* Valid only if oper_flag is OFF, these pointers are */ 9 16 3 select_ptr ptr, /* used by mrds_dsl_search */ 9 17 3 so_ptr ptr, 9 18 3 ti_ptr ptr; /* to tuple info structure for this block */ 9 19 9 20 9 21 dcl ss_ptr ptr; /* Pointer to the selected sets */ 9 22 dcl nitems_init fixed bin; 9 23 9 24 dcl UNION fixed bin internal static options (constant) init (1); 9 25 dcl INTERSECTION fixed bin internal static options (constant) init (2); 9 26 dcl DIFFERENCE fixed bin internal static options (constant) init (3); 9 27 9 28 /* END mrds_dsl_select_sets.incl.pl1 */ 9 29 532 533 10 1 /* BEGIN INCLUDE rmdb_create_rel_info.incl.pl1 */ 10 2 10 3 /* Contains relation name and all attributes that are associated with the 10 4* relation being created. Attributes which are to be indexed are flagged. */ 10 5 10 6 /* HISTORY: 10 7* Created 82-03-22 by R. Lackey 10 8**/ 10 9 10 10 10 11 dcl 1 rmdb_create_rel_info aligned based (rmdb_create_rel_info_ptr), 10 12 2 version fixed bin, /* Version number of this structure */ 10 13 2 db_path char (168), /* Absolute pathname of database */ 10 14 2 temp_directory_path char (168), /* Absolute pathname of directory to be used for temp space */ 10 15 2 db_model_ptr ptr, /* Pointer to db_model */ 10 16 2 relation_name char (32) unal, /* Name of relation being created */ 10 17 2 num_attrs fixed bin, /* Number of attributes 10 18* for this relation */ 10 19 2 attrs (rmdb_create_rel_info_alloc /* Attribute info */ 10 20 refer (rmdb_create_rel_info.num_attrs)) aligned 10 21 like attr_def_info; 10 22 10 23 10 24 dcl 1 attr_def_info based (adi_ptr), /* Attribute definition info */ 10 25 2 name char (32) unal, /* Attribute name */ 10 26 2 primary_key bit (1) unal, /* Primary key attribute */ 10 27 2 indexed bit (1) unal, /* On => attribute is to be indexed */ 10 28 2 mbz bit (34) unal; /* For future reference */ 10 29 10 30 dcl adi_ptr pointer; /* Pointer to attr_def_info structure */ 10 31 dcl rmdb_create_rel_info_ptr pointer; /* Based structure pointer */ 10 32 dcl rmdb_create_rel_info_alloc fixed bin; /* Allocation size of attribute info for structure */ 10 33 dcl RMDB_CREATE_REL_INFO_VERSION_1 int static options (constant) init (1); 10 34 10 35 10 36 dcl 1 rmdb_ix_attrs aligned based (rmdb_ix_attrs_ptr), /* List of names of attributes to be indexed */ 10 37 2 version fixed bin, 10 38 2 relation_name char (32), /* Name of the relation */ 10 39 2 num_used fixed bin, 10 40 2 an (rmdb_ix_attrs_alloc refer (rmdb_ix_attrs.num_used)) char (32); 10 41 10 42 dcl rmdb_ix_attrs_alloc fixed bin; 10 43 dcl rmdb_ix_attrs_ptr ptr; 10 44 dcl RMDB_IX_ATTRS_VERSION_1 int static options (constant) init (1); 10 45 10 46 dcl 1 rmdb_sel_val_info aligned based (rmdb_sel_val_info_ptr), /* Selection value info */ 10 47 2 version fixed bin, 10 48 2 sv_num fixed bin, /* Number of select values */ 10 49 2 data_list_ptr ptr, /* Pointer to list of ptrs to sv data */ 10 50 2 desc_list_ptr ptr; /* Pointer to list of ptrs to sv descriptors */ 10 51 10 52 dcl rmdb_sel_val_info_ptr ptr; 10 53 dcl RMDB_SEL_VAL_INFO_VERSION_1 int static options (constant) init (1); 10 54 10 55 /* END INCLUDE rmdb_create_rel_info.incl.pl1 */ 534 535 11 1 /* BEGIN mdbm_rm_rel_info.incl.pl1 -- jaw, 11/16/78 */ 11 2 11 3 /* WARNING 11 4* If the rm_rel_info structure is changed then the mrds_data_ 11 5* item saved_res_version MUST be incremented to invalidate all 11 6* existing saved resultants 11 7**/ 11 8 11 9 /* HISTORY: 11 10* 11 11* Modified by Jim Gray - - May 1980, to include model number of 11 12* attributes, and varying attributes, so that partial view 11 13* submodels will have the info needed to properly set up the 11 14* varying length array headers in the tuple structure. 11 15* 11 16* Modified by Jim Gray - - 80-11-06, to rename r_perm = 11 17* status_perm, s_perm = append_tuple_perm, d_perm = 11 18* delete_tuple_perm, and make m_perm = unused_perm. 11 19* 11 20* 81-01-23 Jim Gray : added bit to indicate whether the last model 11 21* view attribute was varying character or bit, since a partial view 11 22* submodel will not have this information in the resultant, and it 11 23* is needed for determining the new tuple length in mus_mod_ubtup, 11 24* since with exact length storage of varying length attributes, 11 25* each tuple can be a different length, which is can only be 11 26* determined by examining the tuple itself. 11 27* 11 28* 81-01-29 Jim Gray : added curent tuple count, to provide for 11 29* interface to allow temp rel population to be known, and to 11 30* provide a more efficient means of finding an approx. current perm 11 31* relation population. 11 32* 11 33* 81-05-28 Jim Gray : removed structure elements referring to 11 34* blocked files, foreign keys, and ids procedures. Also set number 11 35* of files per rel to a constant of 1. 11 36* 11 37* 81-05-28 Jim Gray : combined data from rm_file_info into this 11 38* structure so that only one structure per relation is needed. 11 39* 11 40* 81-07-02 Jim Gray : added total_key and dup_key vfile statistics 11 41* counts. Also added number of operations count since last 11 42* statistics update, and a time since the statistics were last 11 43* updated. 11 44* 11 45* 81-07-06 Jim Gray : added a per selection expression update 11 46* identifier so that small relations could be updated on a per S.E. 11 47* basis 11 48* 11 49* 82-04-21 R. Lackey : Added number_selected (ri_niocbs_init refer (rm_rel_info.niocbs)) fixed bin (35) 11 50* to end of structure TR 12205 (Suggestion). 11 51* 11 52* 82-08-19 D. Woodka : Removed rm_rel_info.max_data_len field for 11 53* the DMS conversion. 11 54* 11 55* 82-08-30 Davids: added the opening_id element and removed the iocb 11 56* array and the niocb element for DMS conversion. Also removed the 11 57* number_selected array (and ri_niocbs_init) since subsets are not 11 58* going to be used. 11 59* 11 60* 82-09-20 Mike Kubicar : changed rm_rel_info.rel_id to bit (36) aligned 11 61* so that it can be used with relation manager. Also added 11 62* rm_rel_info.primary_key_index_id for relation manager. 11 63* 11 64* 82-09-22 Mike Kubicar : Removed the, now useless, fields var_attr_ptrs, 11 65* nvar_atts, model_nvar_atts. 11 66* 11 67* 82-09-24 Davids: Removed current_key_count and current_dup_key_count 11 68* since the duplicate key count for each secondary index is now being 11 69* kept in the attr_info structure and key_count was only needed to 11 70* help in calculating the average selectivity of each index which 11 71* can now be gotten directly from each index's dup key count. Also 11 72* removed the file_id element since it is no longer needed for 11 73* anything. 11 74* 11 75* 82-09-27 Mike Kubicar : removed file_id_len for the same reason file_id 11 76* was removed. 11 77* 11 78* 82-11-05 Mike Kubicar : added a pointer to an id_list structure to be 11 79* used when retrieving tuples from this relation. 11 80* 11 81* 83-04-06 Davids: Added the scope_flags_ptr which points to the scope_flags structure 11 82* for the relation. Note that this structure is part of the resultant NOT 11 83* part of the db.control structure. The scopes are duplicated in the resultant 11 84* to reduce contention for the db.control structure. Note also that the pointer 11 85* will always point to a scope_flags structure even if no scopes have been 11 86* set on the relation, the structure is allocated when the db is opened. 11 87**/ 11 88 11 89 11 90 /* DESCRIPTION: 11 91* 11 92* This structure is allocated in the area part of the structure in 11 93* mdbm_rm_db_info.incl.pl1 as part of the resultant model created 11 94* at open time for a database. There will be one of these 11 95* rm_rel_info structures for each relation appearing in the 11 96* database view (there may be less than the total in the database 11 97* for a submodel openings). There will also be one for each 11 98* temporary relation currently defined for that opening. 11 99* 11 100* The structure in mdbm_rm_rel_array.incl.pl1 contains pointers to 11 101* all rm_rel_info structures allocated. It is used for searching 11 102* for the appropriate structure. This array is pointed to by 11 103* rm_db_info. There are two arrays, one for perm rels, one for temp 11 104* rels. 11 105* 11 106* The rm_rel_info structure points to the 11 107* mdbm_rm_attr_info.incl.pl1 structures, one for each attribute 11 108* appearing in this view of the relation. Each of these in turn 11 109* point to a mdbm_rm_domain_info.incl.pl1 structure for the domain 11 110* info for each attr. 11 111* 11 112* Most of the other information here deals with specifics of the 11 113* relation's logical definition, such as key and secondary index 11 114* attribute inidicators, security permissions, and tuple physical 11 115* construction details. 11 116* 11 117**/ 11 118 11 119 dcl 1 rm_rel_info aligned based (rmri_ptr), /* relation information */ 11 120 2 name char (32), /* from submodel */ 11 121 2 model_name char (30), /* from model */ 11 122 2 rel_id bit (36) aligned, /* unique id. */ 11 123 2 retrieve bit (1) unal, /* operations allowed by this view */ 11 124 2 modify bit (1) unal, 11 125 2 delete bit (1) unal, 11 126 2 store bit (1) unal, 11 127 2 total_key bit (1) unal, /* on if view includes full primary key */ 11 128 2 indexed bit (1) unal, /* on if exists sec. index */ 11 129 2 mdbm_secured bit (1) unal, /* on if mdbm must check security */ 11 130 2 status_perm bit (1) unal, /* if user has status. perm. */ 11 131 2 append_tuple_perm bit (1) unal, /* if user has store perm. */ 11 132 2 delete_tuple_perm bit (1) unal, /* if user has del. perm. */ 11 133 2 unused_perm bit (1) unal, /* for future use. */ 11 134 2 last_model_attr_char_var bit (1) unal, /* on => last model varying attr is char */ 11 135 2 reserved bit (24) unal, /* for future use */ 11 136 2 num_attr fixed bin, /* total no. of attr. in rel. */ 11 137 2 model_num_attr fixed bin, /* total attrs in model relation */ 11 138 2 nkey_attr fixed bin, /* no. of key attr. */ 11 139 2 model_nkey_attr fixed bin, /* total number of keys in model */ 11 140 2 primary_key_index_id bit (36) aligned, /* Index id of relation's primary key */ 11 141 2 nsec_inds fixed bin, /* no. sec. indexes */ 11 142 2 max_key_len fixed bin (35), /* max length (chars) of primary key */ 11 143 2 current_tuple_population fixed bin (35), /* last known total tuple count for this relation */ 11 144 2 last_statistics_update_count fixed bin, /* number of operations's, since this rels stats were updated */ 11 145 2 last_statistics_update_time fixed bin (71),/* last time this rels stats were updated */ 11 146 2 last_statistics_update_s_e_ref_num fixed bin (35), /* last select expr ID that updated this rels stats */ 11 147 2 ready_mode fixed bin, /* 1 => r, 2 => mr, 3 => u, 4 => l, 5 => sr, 6 => su */ 11 148 2 file_type fixed bin, /* 1 => unblocked, 2 => blocked, 3 => temporary */ 11 149 2 tuple_id_len fixed bin, /* no. bits in local tuple id */ 11 150 2 opening_id bit (36) aligned, /* relation manager opening is */ 11 151 2 key_attr_ptrs (nkey_attr_init refer (rm_rel_info.nkey_attr)) ptr, /* ptrs to key attr. */ 11 152 2 attr_ptrs (natts_init refer (rm_rel_info.num_attr)) ptr, /* ptrs to all attr. */ 11 153 2 id_list_ptr ptr, /* Id list for retrieves from the relation */ 11 154 2 scope_flags_ptr ptr; /* pointer to the scope_flags structure for the rel */ 11 155 11 156 dcl rmri_ptr ptr; 11 157 dcl (nkey_attr_init, 11 158 natts_init, 11 159 nvar_atts_init) fixed bin; 11 160 11 161 /* END mdbm_rm_rel_info.incl.pl1 */ 11 162 11 163 536 537 12 1 /* BEGIN mdbm_rm_db_info.incl.pl1 -- jaw, 11/7/78 */ 12 2 12 3 12 4 12 5 /****^ HISTORY COMMENTS: 12 6* 1) change(86-08-13,Hergert),, approve(88-06-28,MCR7903), 12 7* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 12 8* Removed change of 84-11-02. i.e. replaced even_word_pad. 12 9* END HISTORY COMMENTS */ 12 10 12 11 12 12 /* WARNING 12 13* If the rm_db_info structure is changed then the mrds_data_ 12 14* item saved_res_version MUST be incremented to invalidate all 12 15* existing saved resultants 12 16**/ 12 17 12 18 /* DESCRIPTION: This structure is based on a segment 12 19* {unique_name}.mrds.rdbi that represents the secure portion of the 12 20* resultant model that is created partially at database open time, 12 21* (the rm_file_array, and rm_rel_array) and partially at ready_file 12 22* time, (the rm_file_info, rm_rel_info, rm_attr_info, 12 23* rm_domain_info, rm_plink_info and rm_clink_info). it's purpose is 12 24* to provide an efficient means of accessing database model 12 25* information, as seen from the possibly submodel view of the user, 12 26* and his current state of "files readied". it is the secure part 12 27* because it contains the model information which needs to be 12 28* protected from general knowledge, and this segment will 12 29* eventually be capable of being in a lower ring. the structure 12 30* itself points to four arrays that are allocated in it's area, 12 31* that in turn point to the other structures mentions above, also 12 32* allocated in the rm_db_info.static_area. the arrays are the 12 33* rm_file_array, and rm_rel_array. their are a pair for temporary 12 34* relations, initially empty, and a pair for normal model 12 35* files/relations. the normal rm_file_array is initialized to a 12 36* list of all known file names, the rm_rel_array only gets relation 12 37* names as files are readied. the rm_file_array points to 12 38* rm_file_infos for each file (see mdbm_rm_file_info.incl.pl1) and 12 39* the rm_rel_array points to rm_rel_info for each relation 12 40* "readied". (see mdbm_rm_rel_info.incl.pl1). (the arrays are in 12 41* mdbm_rm_file_array.incl.pl1 and mdbm_rm_rel_array.incl.pl1). the 12 42* file infos point to contained rel infos, the rel infos point to 12 43* contained attr infos, and those in turn to domain infos. (see 12 44* mdbm_rm_attr_info.incl.pl1 and mdbm_rm_domain_info.incl.pl1) 12 45* foreign keys are represented by the structures 12 46* mdbm_rm_plink_info.incl.pl1, and mdbm_rm_clink_info.incl.pl1. the 12 47* pathnames of the model and submodel, if any, are also maintained 12 48* in rm_db_info. the pointer to this rm_db_info segment is obtained 12 49* from the dbcb segment tructure(see mrds_dbcb.incl.pl1) see the 12 50* individual include files for further organization information, 12 51* and particular data structures. 12 52* 12 53* HISTORY: 12 54* 12 55* 80-02-01 Jim Gray : Modified to put area on even word boundary, 12 56* so that define_area_ could be used to make it an extensible area 12 57* 12 58* 81-1-9 Jim Gray : added like reference to make the phony 12 59* resultant in mu_database_index easier to keep, since no reference 12 60* to the area is needed. 12 61* 12 62* 81-1-12 Jim Gray : added version of submodel used in opening to 12 63* resultant. 12 64* 12 65* 81-05-13 Rickie E. Brinegar: added the administrator bit to the 12 66* structure. 12 67* 12 68* 81-05-28 Jim Gray : removed pointers to file_arrays, since they 12 69* are now combined into the rel_array. Removed the control file 12 70* info which was unused. Added pointer to head of domain list, 12 71* which is to be used to insure only one copy of each domain info. 12 72* 12 73* 83-05-19 Davids: Added the saved_res_version element. 12 74* 12 75* 84-11-02 Thanh Nguyen: Replaced the even_word_pad by the 12 76* ref_name_proc_ptr to point to list of reference name of the 12 77* check, encode, or decode proc. 12 78* 12 79* CAUTION: The structure entries from db_version to sm_path should 12 80* not be moved or have their declarations changed because they are 12 81* used in the handling of old version database openings. 12 82* 12 83* 12 84**/ 12 85 12 86 dcl 1 rm_db_info aligned based (rdbi_ptr), /* data base info, located at base of res. dm. seg. */ 12 87 2 data like rm_db_info_data, 12 88 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (rm_db_info.static_area)))); 12 89 12 90 dcl rdbi_ptr ptr; 12 91 12 92 declare 1 rm_db_info_data based, /* separate declaration of info, so others can use 12 93* like reference to it without getting the area as well */ 12 94 2 db_version fixed bin, /* version no. of db */ 12 95 2 sm_version fixed bin unal, /* version of submodel used unal, 0 if model opening */ 12 96 2 val_level fixed bin unal, /* validation level for this db. */ 12 97 2 db_path char (168), /* abs. path of db. */ 12 98 2 sm_path char (168), /* path of submodel or model */ 12 99 2 mdbm_secured bit (1) unal, /* ON => database is secured */ 12 100 2 administrator bit (1) unal, /* ON => user is an administrator */ 12 101 2 pad bit (34) unal, /* for future use */ 12 102 2 saved_res_version char (8), /* version of the saved resultant in the 12 103* dbcb and rdbi segments in the db dir */ 12 104 2 domain_list_ptr ptr, /* pointer to head of list of domain_info's */ 12 105 2 ra_ptr ptr, /* pointer to rel. array */ 12 106 2 tra_ptr ptr, /* to rel array for temp rels */ 12 107 2 even_word_pad fixed bin (71) aligned; /* padding to put area on even word boundary */ 12 108 12 109 /* END mdbm_rm_db_info.incl.pl1 */ 12 110 12 111 538 539 13 1 /* BEGIN mdbm_rm_attr_info.incl.pl1 -- jaw, 11/16/78 */ 13 2 13 3 /* WARNING 13 4* If the rm_attr_info structure is changed then the mrds_data_ 13 5* item saved_res_version MUST be incremented to invalidate all 13 6* existing saved resultants 13 7**/ 13 8 13 9 /* 13 10* 13 11* Modified by Jim Gray - - 80-11-05, to add mdbm_secured bit, so 13 12* that rm_rel_info does not have to be checked 13 13* 13 14* 81-05-28 Jim Gray : removed structure elements referring to 13 15* foreign keys. 13 16* 13 17* 82-08-19 D. Woodka : removed rm_attr_info.bit_offset for the DMS 13 18* conversion. 13 19* 13 20* 82-09-15 Davids: added the number_of_dups field. 13 21* 13 22* 82-09-20 Mike Kubicar : changed the index_id field to be bit (36) 13 23* aligned. This is to conform with the new definition in the database 13 24* model. Also removed the now useless field varying. 13 25* 13 26* 82-11-05 Davids: added the field model_defn_order and clarified the 13 27* comment for the field defn_order. 13 28* 13 29* 83-05-23 Mike Kubicar : changed number_of_dups to fixed bin (35) since 13 30* that's what relation manager returns. 13 31* 13 32**/ 13 33 13 34 13 35 /* 13 36* this structure is allocated in the static area of 13 37* mdbm_rm_db_info.incl.pl1 once for each attribute per relation in 13 38* a readied file. it in turn points to 13 39* mdbm_rm_domain_info.incl.pl1 for the attributes domain. the 13 40* rm_attr_info is pointed to by mdbm_rm_rel_info.incl.pl1. all 13 41* structures are in the rm_db_info area. the attribute data 13 42* position within a tuple as stored in the data file are kept in 13 43* this resultant model of the attribute. 13 44* */ 13 45 13 46 dcl 1 rm_attr_info aligned based (rai_ptr), /* resultant attr. info */ 13 47 2 name char (32), /* from submodel */ 13 48 2 model_name char (32), /* from model */ 13 49 2 key_attr bit (1) unal, /* if key attribute */ 13 50 2 index_attr bit (1) unal, /* if secondary index */ 13 51 2 read_perm bit (1) unal, /* user has retr. permission */ 13 52 2 modify_perm bit (1) unal, /* user has modify permission */ 13 53 2 mdbm_secured bit (1) unal, /* on => database secured */ 13 54 2 reserved bit (30) unal, /* for future use */ 13 55 2 index_id bit (36) aligned, /* index id if index_attr */ 13 56 2 defn_order fixed bin, /* relative order in which attr is defined in the view */ 13 57 2 key_order fixed bin, /* relative order defined in prim. key */ 13 58 2 bit_length fixed bin (35), /* length if fixed, max. len. if var. */ 13 59 2 domain_ptr ptr, /* to domain info */ 13 60 2 number_of_dups fixed bin (35), /* if the attribute is indexed this will 13 61* be the number of duplicate values, exact 13 62* for a page_file database, an estimate for a vfile type */ 13 63 2 model_defn_order fixed bin; /* relative order in which attr is defined in the model */ 13 64 13 65 dcl rai_ptr ptr int automatic init (null ()); 13 66 13 67 /* END mdbm_rm_attr_info.incl.pl1 */ 13 68 13 69 540 541 14 1 /* BEGIN mrds_tuple_info.incl.pl1 -- jaw 11/2/78 */ 14 2 14 3 /* HISTORY: 14 4* 14 5* Modified in March 1977 by O Friesen to hold allocated ptr and length 14 6* 82-10-29 Mike Kubicar : Made tuple_id aligned 14 7* 14 8**/ 14 9 14 10 dcl 1 tuple_info aligned based (ti_ptr), 14 11 2 num_tuples fixed bin, /* no. of tuples for which info given */ 14 12 2 tuple (ti_ntuples_init refer (tuple_info.num_tuples)), 14 13 3 tuple_ptr ptr, /* pointer to found tuple */ 14 14 3 tuple_id bit (36) aligned, /* tuple id for found tuple */ 14 15 3 var_index fixed bin; /* index to tuple variable */ 14 16 14 17 dcl ti_ptr ptr; 14 18 dcl ti_ntuples_init fixed bin; 14 19 14 20 /* END mrds_tuple_info.incl.pl1 */ 14 21 542 543 15 1 /* BEGIN INCLUDE rmdb_delete_rel_info.incl.pl1 */ 15 2 15 3 /* Contains name of relation to be deleted 15 4* dtabase_pathname 15 5* and arugment flags like -force 15 6**/ 15 7 15 8 /* HISTORY 15 9* 82-04-30 Created by Roger Lackey 15 10* 15 11* 82-06-25 Roger Lackey: Changed force bit to brief 15 12**/ 15 13 15 14 15 15 dcl 1 rmdb_delete_rel_info aligned based (rmdb_delete_rel_info_ptr), 15 16 2 version fixed bin, 15 17 2 absolute_db_path char (168), /* Absolute database pathname */ 15 18 2 db_model_ptr ptr, /* Pointer to db_model */ 15 19 2 relation_name char (32), /* Name of relation to be deleted */ 15 20 2 brief bit (1) unal, /* On => Brief option */ 15 21 2 mbz bit (35) unal init ("0"b); /* For future use */ 15 22 15 23 dcl rmdb_delete_rel_info_ptr ptr; 15 24 dcl RMDB_DELETE_REL_INFO_VERSION_1 fixed bin int static options (constant) init (1); 15 25 15 26 /* END INCLUDE rmdb_delete_rel_info.incl.pl1 */ 544 545 16 1 /* *********************************************************** 16 2* * * 16 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 16 4* * * 16 5* *********************************************************** */ 16 6 /* BEGIN INCLUDE FILE - vu_typed_vector.incl.pl1 */ 16 7 16 8 /* Written by Lindsey Spratt, 04/02/82. 16 9*Modified: 16 10*09/01/82 by Lindsey Spratt: Changed value_ptr in simple_typed_vector to be 16 11* unaligned. Changed the type number of the simple_typed_vector to 16 12* "3" from "1". The OLD_SIMPLE_TYPED_VECTOR_TYPE is now an invalid 16 13* type. 16 14**/ 16 15 16 16 /* format: style2,ind3 */ 16 17 dcl 1 simple_typed_vector based (simple_typed_vector_ptr), 16 18 2 type fixed bin (17) unal, 16 19 2 number_of_dimensions 16 20 fixed bin (17) unal, 16 21 2 dimension (stv_number_of_dimensions refer (simple_typed_vector.number_of_dimensions)), 16 22 3 value_ptr ptr unaligned; 16 23 16 24 dcl 1 general_typed_vector based (general_typed_vector_ptr), 16 25 2 type fixed bin (17) unal, 16 26 2 number_of_dimensions 16 27 fixed bin (17) unal, 16 28 2 dimension (gtv_number_of_dimensions refer (general_typed_vector.number_of_dimensions)), 16 29 3 identifier fixed bin (17) unal, 16 30 3 pad bit (18) unal, 16 31 3 value_ptr ptr unal; 16 32 16 33 dcl simple_typed_vector_ptr 16 34 ptr; 16 35 dcl stv_number_of_dimensions 16 36 fixed bin (17); 16 37 16 38 dcl general_typed_vector_ptr 16 39 ptr; 16 40 dcl gtv_number_of_dimensions 16 41 fixed bin (17); 16 42 16 43 dcl ( 16 44 OLD_SIMPLE_TYPED_VECTOR_TYPE 16 45 init (1), /* value_ptr was aligned. */ 16 46 GENERAL_TYPED_VECTOR_TYPE 16 47 init (2), 16 48 SIMPLE_TYPED_VECTOR_TYPE 16 49 init (3) 16 50 ) fixed bin (17) internal static options (constant); 16 51 16 52 /* END INCLUDE FILE - vu_typed_vector.incl.pl1 */ 546 547 548 549 end rmdb_create_and_pop_rel; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/01/88 1300.0 rmdb_create_and_pop_rel.pl1 >special_ldd>install>MR12.2-1073>rmdb_create_and_pop_rel.pl1 135 1 02/05/86 1416.4 mrds_start_transaction.incl.pl1 >ldd>include>mrds_start_transaction.incl.pl1 1-79 2 01/07/85 0900.0 dm_tm_modes.incl.pl1 >ldd>include>dm_tm_modes.incl.pl1 1-81 3 06/28/79 1204.8 condition_info.incl.pl1 >ldd>include>condition_info.incl.pl1 220 4 02/05/86 1416.4 mrds_finish_transaction.incl.pl1 >ldd>include>mrds_finish_transaction.incl.pl1 524 5 08/01/88 1300.0 mrds_dbcb.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_dbcb.incl.pl1 526 6 10/14/83 1609.1 mdbm_rm_rel_array.incl.pl1 >ldd>include>mdbm_rm_rel_array.incl.pl1 528 7 10/17/86 1404.3 mdbm_db_model.incl.pl1 >ldd>include>mdbm_db_model.incl.pl1 530 8 08/01/88 1300.0 mrds_select_list.incl.pl1 >special_ldd>install>MR12.2-1073>mrds_select_list.incl.pl1 532 9 10/14/83 1608.4 mrds_select_sets.incl.pl1 >ldd>include>mrds_select_sets.incl.pl1 534 10 10/14/83 1609.0 rmdb_create_rel_info.incl.pl1 >ldd>include>rmdb_create_rel_info.incl.pl1 536 11 10/14/83 1609.1 mdbm_rm_rel_info.incl.pl1 >ldd>include>mdbm_rm_rel_info.incl.pl1 538 12 08/01/88 1310.7 mdbm_rm_db_info.incl.pl1 >special_ldd>install>MR12.2-1073>mdbm_rm_db_info.incl.pl1 540 13 10/14/83 1609.1 mdbm_rm_attr_info.incl.pl1 >ldd>include>mdbm_rm_attr_info.incl.pl1 542 14 10/14/83 1609.0 mrds_tuple_info.incl.pl1 >ldd>include>mrds_tuple_info.incl.pl1 544 15 10/14/83 1609.0 rmdb_delete_rel_info.incl.pl1 >ldd>include>rmdb_delete_rel_info.incl.pl1 546 16 10/14/83 1609.1 vu_typed_vector.incl.pl1 >ldd>include>vu_typed_vector.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. EXCLUSIVE_UPDATE 000023 constant fixed bin(17,0) initial dcl 466 set ref 138* 275* I_db_path parameter char packed unaligned dcl 74 ref 9 101 103 176 I_index_attrs_ptr parameter pointer dcl 78 ref 9 91 I_rmdb_ctl_ptr parameter pointer dcl 73 ref 9 92 I_rmdb_sel_val_info_ptr parameter pointer dcl 77 ref 9 90 I_sel_exp parameter char packed unaligned dcl 76 set ref 9 88 89 158 160 296 I_temp_dir_path parameter char packed unaligned dcl 75 ref 9 177 O_err_code parameter fixed bin(35,0) dcl 80 set ref 9 94* 218 222* 383* O_err_msg parameter char packed unaligned dcl 79 set ref 9 93* 223* 384* RMDB_CREATE_REL_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 10-33 ref 175 RMDB_DELETE_REL_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 15-24 ref 407 434 SIMPLE_TYPED_VECTOR_TYPE constant fixed bin(17,0) initial dcl 16-43 ref 329 TM_NORMAL_MODE 000025 constant fixed bin(17,0) initial dcl 2-15 set ref 1-99* absolute_db_path 1 000406 automatic char(168) level 2 dcl 520 set ref 408* 435* addr builtin function dcl 454 ref 88 1-123 1-123 414 414 440 440 ai_ptr 12 based pointer array level 3 dcl 8-22 ref 183 an 12 based char(32) array level 2 dcl 10-36 ref 235 another_flag 106 based bit(1) level 3 packed packed unaligned dcl 5-142 set ref 343* any_other 000144 stack reference condition dcl 455 ref 134 attr_def_info based structure level 1 packed packed unaligned dcl 10-24 attr_name 000152 automatic char(32) packed unaligned dcl 456 set ref 235* 241 243 252 attrs 141 based structure array level 2 dcl 10-11 brief 66 000406 automatic bit(1) level 2 packed packed unaligned dcl 520 set ref 411* 438* cleanup 000162 stack reference condition dcl 457 ref 99 129 363 code 000170 automatic fixed bin(35,0) dcl 458 set ref 105* 125* 138* 139 139* 145* 149 149* 155* 158 158* 198* 199 199* 201* 202 202* 275* 276 276* 282* 287 287* 293* 296 296* 332* 336 338* 340 340 344* 365 365* 366* 401* 403* 404 414* 417 440* condition_info based structure level 1 dcl 3-14 condition_name 3 000110 automatic varying char(32) level 2 dcl 1-77 set ref 1-124 1-129 1-129 continue_to_signal_ 000010 constant entry external dcl 1-61 ref 1-137 data based structure level 2 in structure "rm_db_info" dcl 12-86 in procedure "rmdb_create_and_pop_rel" data based structure level 2 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" data_list_ptr 2 based pointer level 2 dcl 10-46 ref 152 290 db_model based structure level 1 dcl 7-72 db_model_ptr 126 based pointer level 2 in structure "rmdb_create_rel_info" dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 178* db_model_ptr 54 000406 automatic pointer level 2 in structure "delete_rel_info" dcl 520 in procedure "rmdb_create_and_pop_rel" set ref 409* 436* db_path 000172 automatic char(168) packed unaligned dcl 460 in procedure "rmdb_create_and_pop_rel" set ref 103* 105* 106 125* 138* 139 275* 276 408 435 db_path 1 based char(168) level 2 in structure "rmdb_create_rel_info" dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 176* db_type_flags 0(18) based structure level 2 packed packed unaligned dcl 7-72 dbcb based structure level 1 dcl 5-142 dbcb_data based structure level 1 unaligned dcl 5-148 dbcb_ptr 000476 automatic pointer dcl 5-146 set ref 141* 142 145 148 155* 160 163 164 169 170 278* 279 282 285 293* 298 299 305 306 307 310 319 332* 338* 343 344* dbi 000171 automatic fixed bin(35,0) dcl 459 set ref 96* 138* 141* 145* 201* 204* 275* 278* 282* 403 403* 404* dbm_ptr 000502 automatic pointer dcl 7-106 set ref 105* 106 108 178 321* 409 417* 436 def_temp_rel_area_ptr 54 based pointer level 3 dcl 5-142 set ref 145* 148 282* 285 delete_rel_info 000406 automatic structure level 1 dcl 520 set ref 414 414 440 440 desc_list_ptr 4 based pointer level 2 dcl 10-46 ref 153 291 divide builtin function dcl 461 ref 317 dm_error_$bj_journal_full 000030 external static fixed bin(35,0) dcl 4-52 ref 1-132 dm_error_$key_duplication 000050 external static fixed bin(35,0) dcl 477 ref 340 dm_error_$lock_deadlock 000032 external static fixed bin(35,0) dcl 4-53 ref 4-78 1-126 dm_error_$no_current_transaction 000012 external static fixed bin(35,0) dcl 1-62 ref 1-90 dsl_$close 000040 constant entry external dcl 462 ref 201 403 dsl_$open 000042 constant entry external dcl 463 ref 138 275 err_code parameter fixed bin(35,0) dcl 379 ref 377 383 err_message parameter char packed unaligned dcl 380 ref 377 384 err_msg 000244 automatic char(256) packed unaligned dcl 464 set ref 198* 199* 414* 440* error_table_$action_not_performed 000044 external static fixed bin(35,0) dcl 465 set ref 114* find_condition_info_ 000014 constant entry external dcl 1-64 ref 1-123 fm_ptr 000344 automatic pointer dcl 468 set ref 125* 127 found 000346 automatic bit(1) packed unaligned dcl 469 set ref 237* 239 247* 252 ftf 000347 automatic bit(1) dcl 470 set ref 97* 210 342* 443* hcs_$initiate 000046 constant entry external dcl 471 ref 105 125 i 000350 automatic fixed bin(17,0) dcl 472 set ref 182* 183 184 185 185 186 187* 315* 317* 317 318 index builtin function dcl 473 ref 315 indexed 151(01) based bit(1) array level 3 packed packed unaligned dcl 10-11 set ref 186* 243 246* item 10 based structure array level 2 unaligned dcl 8-22 items based structure array level 2 dcl 9-3 j 000351 automatic fixed bin(17,0) dcl 474 set ref 239* 241 243 246* k 000352 automatic fixed bin(17,0) dcl 475 set ref 233* 235* key 10(01) based bit(1) array level 3 packed packed unaligned dcl 8-22 ref 185 last_store_rel_name 117 based char(32) level 3 dcl 5-142 set ref 319* length builtin function dcl 476 ref 89 mbz 66(01) 000406 automatic bit(35) initial level 2 in structure "delete_rel_info" packed packed unaligned dcl 520 in procedure "rmdb_create_and_pop_rel" set ref 412* 439* 520* mbz 151(02) based bit(34) array level 3 in structure "rmdb_create_rel_info" packed packed unaligned dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 187* mdbm_util_$define_temp_dir_area 000106 constant entry external dcl 493 ref 145 282 mdbm_util_$get_resultant_model_pointer 000100 constant entry external dcl 490 ref 141 278 mdbm_util_$inconsistent_reset 000102 constant entry external dcl 491 ref 417 mdbm_util_$inconsistent_set 000104 constant entry external dcl 492 ref 321 mdbm_util_$mrds_dsl_translate 000054 constant entry external dcl 479 ref 155 293 mdbm_util_$mu_get_tuple 000110 constant entry external dcl 494 ref 332 344 mdbm_util_$store_direct 000112 constant entry external dcl 495 ref 338 mftxn_code 000142 automatic fixed bin(35,0) dcl 4-54 set ref 218* 4-62* 4-65 4-68* 4-69 4-78 4-115 222 1-126* 1-132* mftxn_temp_code 000143 automatic fixed bin(35,0) dcl 4-55 set ref 4-71* 4-72 4-72* 4-82* 4-83 4-85* 4-86 4-86* 4-96* 4-97 4-99* 4-100 4-100* 4-109* 4-110 4-110* model_name 10 based char(32) level 2 dcl 13-46 ref 184 mrds_data_$max_attributes 000114 external static fixed bin(35,0) dcl 496 ref 326 mrds_data_$max_select_items 000052 external static fixed bin(35,0) dcl 478 ref 165 166 300 301 302 mrds_error_$dup_rel 000056 external static fixed bin(35,0) dcl 480 set ref 127* mrds_error_$inval_dtr_expr 000062 external static fixed bin(35,0) dcl 482 set ref 160* mrds_error_$invalid_db_index 000060 external static fixed bin(35,0) dcl 481 set ref 142* 279* mrds_error_$no_database 000064 external static fixed bin(35,0) dcl 483 set ref 106* mrds_error_$no_db_path 000066 external static fixed bin(35,0) dcl 484 set ref 101* mrds_error_$no_tuple 000070 external static fixed bin(35,0) dcl 485 set ref 210* mrds_error_$previously_defined_index 000072 external static fixed bin(35,0) dcl 486 set ref 243* mrds_error_$tuple_not_found 000074 external static fixed bin(35,0) dcl 487 ref 365 mrds_error_$undef_attr 000076 external static fixed bin(35,0) dcl 488 set ref 252* mstxn_code 000100 automatic fixed bin(35,0) dcl 1-65 set ref 111* 112 1-83* 1-89* 1-90 1-99* 1-140 1-140* 4-90* 4-104* 1-137* mstxn_condition_info 000110 automatic structure level 1 unaligned dcl 1-77 set ref 1-123 1-123 mstxn_retries 000101 automatic fixed bin(17,0) dcl 1-66 set ref 1-88* 4-78 4-81* 4-81 mstxn_temp_code 000102 automatic fixed bin(35,0) dcl 1-67 set ref 1-109* 1-110 1-110* 1-123* mstxn_transactions_needed 000103 automatic bit(1) dcl 1-68 set ref 110* 120* 1-86 mstxn_txn_id 000105 automatic bit(36) dcl 1-70 set ref 111* 113* 121* 1-84* 1-89* 1-93 1-94* 1-99* 1-100 4-60 4-68* 4-71* 4-72* 4-82* 4-85* 4-86* 4-96* 4-99* 4-100* 4-109* 4-110* 4-114* 1-107 1-109* 1-110* 1-121 must_delete_relation 000353 automatic bit(1) packed unaligned dcl 489 set ref 87* 192* 208* 406 442* name 141 based char(32) array level 3 in structure "rmdb_create_rel_info" packed packed unaligned dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 184* 241 name 1 based structure array level 2 in structure "rm_rel_array" packed packed unaligned dcl 6-34 in procedure "rmdb_create_and_pop_rel" ref 315 null builtin function dcl 497 ref 106 127 142 163 8-38 13-65 1-123 1-123 279 298 num_attrs 140 based fixed bin(17,0) level 2 dcl 10-11 set ref 174* 180* 239 num_items 6 based fixed bin(17,0) level 2 dcl 8-22 ref 173 180 182 num_rels based fixed bin(17,0) level 2 dcl 6-34 ref 315 318 num_sel_vals 000354 automatic fixed bin(17,0) dcl 498 set ref 151* 155* 289* 293* num_used 11 based fixed bin(17,0) level 2 dcl 10-36 ref 233 number_of_dimensions 0(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 16-17 set ref 327* primary_key 151 based bit(1) array level 3 packed packed unaligned dcl 10-11 set ref 185* quit 000000 stack reference condition dcl 499 ref 334 349 350 351 356 360 quit_received 000355 automatic bit(1) packed unaligned dcl 500 set ref 324* 334* 347 348* 351* 358 359* ra_ptr 134 based pointer level 3 dcl 12-86 ref 311 rai_ptr 000524 automatic pointer initial dcl 13-65 set ref 183* 184 13-65* range_ptr 2 based pointer level 3 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" ref 169 305 range_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "rmdb_create_and_pop_rel" ref 166 301 range_ptr 000356 automatic pointer dcl 501 in procedure "rmdb_create_and_pop_rel" set ref 166* 169* 301* 305* rdbi_ptr based pointer level 3 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" ref 310 rdbi_ptr 000522 automatic pointer dcl 12-90 in procedure "rmdb_create_and_pop_rel" set ref 310* 311 rel_data based structure array level 2 dcl 6-34 rel_name 000360 automatic varying char(32) dcl 503 set ref 95* 125 127 1-140 223 321 321 410 437 relation_name 130 based char(32) level 2 in structure "rmdb_create_rel_info" packed packed unaligned dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 179* relation_name 56 000406 automatic char(32) level 2 in structure "delete_rel_info" dcl 520 in procedure "rmdb_create_and_pop_rel" set ref 410* 437* relation_name 1 based char(32) level 2 in structure "rmdb_ix_attrs" dcl 10-36 in procedure "rmdb_create_and_pop_rel" ref 95 179 315 ri_ptr based pointer array level 3 packed packed unaligned dcl 6-34 ref 318 rm_attr_info based structure level 1 dcl 13-46 rm_db_info based structure level 1 dcl 12-86 rm_db_info_data based structure level 1 unaligned dcl 12-92 rm_rel_array based structure level 1 dcl 6-34 rmdb_create_rel_info based structure level 1 dcl 10-11 set ref 174 rmdb_create_rel_info_alloc 000512 automatic fixed bin(17,0) dcl 10-32 set ref 173* 174 174 rmdb_create_rel_info_ptr 000510 automatic pointer dcl 10-31 set ref 174* 175 176 177 178 179 180 184 185 186 187 198* 239 241 243 246 rmdb_create_relation 000116 constant entry external dcl 504 ref 198 rmdb_ctl_ptr 000372 automatic pointer dcl 505 set ref 92* 198* 414* 440* rmdb_delete_rel_info based structure level 1 dcl 15-15 rmdb_delete_relation$cleanup 000120 constant entry external dcl 506 ref 414 440 rmdb_ix_attrs based structure level 1 dcl 10-36 rmdb_ix_attrs_ptr 000514 automatic pointer dcl 10-43 set ref 91* 95 179 233 235 315 rmdb_sel_val_info based structure level 1 dcl 10-46 rmdb_sel_val_info_ptr 000516 automatic pointer dcl 10-52 set ref 90* 151 152 153 289 290 291 rmra_ptr 000500 automatic pointer dcl 6-43 set ref 311* 315 318 rmri_ptr 000520 automatic pointer dcl 11-156 set ref 318* 332* 338* 344* rtrim builtin function dcl 507 ref 95 1-140 223 sel_exp_len 000374 automatic fixed bin(17,0) dcl 508 set ref 89* 155* 293* sel_exp_ptr 000376 automatic pointer dcl 509 set ref 88* 155* 293* sel_val_arg_list_ptr 000400 automatic pointer dcl 510 set ref 152* 155* 290* 293* sel_val_desc_list_ptr 000402 automatic pointer dcl 511 set ref 153* 155* 291* 293* select_list based structure level 1 unaligned dcl 8-22 select_list_ptr 000504 automatic pointer initial dcl 8-38 set ref 165* 170* 173 180 182 183 185 8-38* 300* 306* select_ptr 4 based pointer level 3 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" ref 170 306 select_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "rmdb_create_and_pop_rel" ref 165 300 select_sets based structure level 1 dcl 9-3 simple_typed_vector based structure level 1 packed packed unaligned dcl 16-17 set ref 327 simple_typed_vector_ptr 000530 automatic pointer dcl 16-33 set ref 327* 329 332* 338* 344* ss_ptr 20 based pointer level 3 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" ref 163 164 298 299 ss_ptr 000506 automatic pointer dcl 9-21 in procedure "rmdb_create_and_pop_rel" set ref 164* 165 166 299* 300 301 302 string builtin function dcl 512 ref 315 stv_number_of_dimensions 000532 automatic fixed bin(17,0) dcl 16-35 set ref 326* 327 327 sv_num 1 based fixed bin(17,0) level 2 dcl 10-46 ref 151 289 sys_info$max_seg_size 000122 external static fixed bin(35,0) dcl 513 ref 145 282 temp_directory_path 53 based char(168) level 2 dcl 10-11 set ref 177* ti_ptr 000526 automatic pointer dcl 14-17 in procedure "rmdb_create_and_pop_rel" set ref 302* 307* ti_ptr based pointer array level 3 in structure "select_sets" dcl 9-3 in procedure "rmdb_create_and_pop_rel" ref 302 ti_ptr 12 based pointer level 3 in structure "dbcb" dcl 5-142 in procedure "rmdb_create_and_pop_rel" ref 307 transaction_manager_$abandon_txn 000016 constant entry external dcl 1-72 ref 4-72 4-86 4-100 4-110 1-110 transaction_manager_$abort_txn 000020 constant entry external dcl 1-73 ref 4-71 4-85 4-99 4-109 1-109 transaction_manager_$begin_txn 000022 constant entry external dcl 1-74 ref 1-99 transaction_manager_$commit_txn 000034 constant entry external dcl 4-56 ref 4-68 transaction_manager_$get_current_txn_id 000024 constant entry external dcl 1-75 ref 111 1-89 transaction_manager_$handle_conditions 000026 constant entry external dcl 1-76 ref 1-135 transaction_manager_$rollback_txn 000036 constant entry external dcl 4-57 ref 4-82 4-96 transactions_needed 0(34) based bit(1) level 3 packed packed unaligned dcl 7-72 ref 108 type based fixed bin(17,0) level 2 packed packed unaligned dcl 16-17 set ref 329* user_started_transaction 000104 automatic bit(1) dcl 1-69 set ref 1-92* 1-98* 4-60 user_transaction_id 000106 automatic bit(36) dcl 1-71 set ref 1-93* 1-100* val_dtr 106(12) based bit(1) level 3 packed packed unaligned dcl 5-142 ref 160 version based fixed bin(17,0) level 2 in structure "rmdb_create_rel_info" dcl 10-11 in procedure "rmdb_create_and_pop_rel" set ref 175* version 000406 automatic fixed bin(17,0) level 2 in structure "delete_rel_info" dcl 520 in procedure "rmdb_create_and_pop_rel" set ref 407* 434* work_area based area(1024) dcl 514 ref 174 work_area_ptr 000404 automatic pointer dcl 515 set ref 148* 155* 174 285* 293* 332* 344* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DIFFERENCE internal static fixed bin(17,0) initial dcl 9-26 GENERAL_TYPED_VECTOR_TYPE internal static fixed bin(17,0) initial dcl 16-43 HIGHEST_MODE internal static fixed bin(17,0) initial dcl 2-12 INTERSECTION internal static fixed bin(17,0) initial dcl 9-25 LOWEST_MODE internal static fixed bin(17,0) initial dcl 2-12 OLD_SIMPLE_TYPED_VECTOR_TYPE internal static fixed bin(17,0) initial dcl 16-43 RMDB_IX_ATTRS_VERSION_1 internal static fixed bin(17,0) initial dcl 10-44 RMDB_SEL_VAL_INFO_VERSION_1 internal static fixed bin(17,0) initial dcl 10-53 TM_NEVER_WRITE_MODE internal static fixed bin(17,0) initial dcl 2-18 TM_READ_ONLY_MODE internal static fixed bin(17,0) initial dcl 2-17 TM_STATISTICAL_MODE internal static fixed bin(17,0) initial dcl 2-16 TM_TEST_NEVER_WRITE_MODE internal static fixed bin(17,0) initial dcl 2-22 TM_TEST_NORMAL_MODE internal static fixed bin(17,0) initial dcl 2-19 TM_TEST_READ_ONLY_MODE internal static fixed bin(17,0) initial dcl 2-21 TM_TEST_STATISTICAL_MODE internal static fixed bin(17,0) initial dcl 2-20 UNION internal static fixed bin(17,0) initial dcl 9-24 adi_ptr automatic pointer dcl 10-30 alloc_length internal static fixed bin(35,0) dcl 7-222 changer based structure level 1 packed packed unaligned dcl 7-251 changer_ptr automatic pointer dcl 7-256 condition_info_ptr automatic pointer dcl 3-10 condition_info_version_1 internal static fixed bin(17,0) initial dcl 3-30 constant based structure level 1 unaligned dcl 7-216 constant_ptr automatic pointer dcl 7-220 di_ptr automatic pointer dcl 7-155 domain_info based structure level 1 dcl 7-125 error_table_$null_info_ptr external static fixed bin(35,0) dcl 1-63 fi_ptr automatic pointer dcl 7-119 file_info based structure level 1 dcl 7-113 fixed builtin function dcl 467 general_typed_vector based structure level 1 packed packed unaligned dcl 16-24 general_typed_vector_ptr automatic pointer dcl 16-38 gtv_number_of_dimensions automatic fixed bin(17,0) dcl 16-40 message_str based structure level 1 packed packed unaligned dcl 7-259 message_str_len automatic fixed bin(17,0) dcl 7-269 message_str_ptr automatic pointer dcl 7-267 move_list_array based structure array level 1 unaligned dcl 8-40 natts_init automatic fixed bin(17,0) dcl 11-157 nitems_init automatic fixed bin(17,0) dcl 9-22 nkey_attr_init automatic fixed bin(17,0) dcl 11-157 nvar_atts_init automatic fixed bin(17,0) dcl 11-157 path_entry based structure level 1 packed packed unaligned dcl 7-172 path_entry_ptr automatic pointer dcl 7-177 rel builtin function dcl 502 rm_num_rels_init automatic fixed bin(17,0) dcl 6-44 rm_rel_info based structure level 1 dcl 11-119 rmdb_delete_rel_info_ptr automatic pointer dcl 15-23 rmdb_ix_attrs_alloc automatic fixed bin(17,0) dcl 10-42 stack_item based structure level 1 unaligned dcl 7-206 stack_item_ptr automatic pointer dcl 7-212 ti_ntuples_init automatic fixed bin(17,0) dcl 14-18 tuple_info based structure level 1 dcl 14-10 ua_ptr automatic pointer dcl 7-165 unreferenced_attribute based structure level 1 dcl 7-159 version_status based structure level 1 packed packed unaligned dcl 7-232 version_status_ptr automatic pointer dcl 7-246 NAMES DECLARED BY EXPLICIT CONTEXT. RESTART 003336 constant label dcl 334 error 003542 constant entry internal dcl 377 ref 101 106 114 127 1-140 139 142 149 158 160 199 202 210 243 252 276 279 287 296 366 exit 001757 constant label dcl 218 set ref 386 index_attr_mark 002410 constant entry internal dcl 231 ref 190 mftxn_check_code 001771 constant label dcl 4-65 ref 1-127 1-133 mftxn_exit 002211 constant label dcl 4-115 ref 4-63 mstxn_any_other 002313 constant entry internal dcl 1-116 ref 134 mstxn_cleanup 002261 constant entry internal dcl 1-102 ref 132 mstxn_exit 001033 constant label dcl 1-140 ref 1-86 1-95 4-91 4-105 restore_significant_data 003715 constant entry internal dcl 432 ref 4-77 rmdb_create_and_pop_rel 000260 constant entry external dcl 9 should_rollback 003767 constant entry internal dcl 448 ref 4-94 store 002545 constant entry internal dcl 261 ref 206 tidy_up 003603 constant entry internal dcl 399 ref 99 131 216 363 385 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4610 4734 4013 4620 Length 5614 4013 124 644 574 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rmdb_create_and_pop_rel 506 external procedure is an external procedure. on unit on line 99 64 on unit on unit on line 129 76 on unit on unit on line 134 82 on unit mstxn_cleanup internal procedure shares stack frame of on unit on line 129. mstxn_any_other internal procedure shares stack frame of on unit on line 134. index_attr_mark internal procedure shares stack frame of external procedure rmdb_create_and_pop_rel. store 146 internal procedure enables or reverts conditions. on unit on line 334 64 on unit on unit on line 351 64 on unit on unit on line 363 64 on unit error 65 internal procedure is called during a stack extension. tidy_up 94 internal procedure is called by several nonquick procedures. restore_significant_data internal procedure shares stack frame of external procedure rmdb_create_and_pop_rel. should_rollback internal procedure shares stack frame of external procedure rmdb_create_and_pop_rel. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rmdb_create_and_pop_rel 000100 mstxn_code rmdb_create_and_pop_rel 000101 mstxn_retries rmdb_create_and_pop_rel 000102 mstxn_temp_code rmdb_create_and_pop_rel 000103 mstxn_transactions_needed rmdb_create_and_pop_rel 000104 user_started_transaction rmdb_create_and_pop_rel 000105 mstxn_txn_id rmdb_create_and_pop_rel 000106 user_transaction_id rmdb_create_and_pop_rel 000110 mstxn_condition_info rmdb_create_and_pop_rel 000142 mftxn_code rmdb_create_and_pop_rel 000143 mftxn_temp_code rmdb_create_and_pop_rel 000152 attr_name rmdb_create_and_pop_rel 000170 code rmdb_create_and_pop_rel 000171 dbi rmdb_create_and_pop_rel 000172 db_path rmdb_create_and_pop_rel 000244 err_msg rmdb_create_and_pop_rel 000344 fm_ptr rmdb_create_and_pop_rel 000346 found rmdb_create_and_pop_rel 000347 ftf rmdb_create_and_pop_rel 000350 i rmdb_create_and_pop_rel 000351 j rmdb_create_and_pop_rel 000352 k rmdb_create_and_pop_rel 000353 must_delete_relation rmdb_create_and_pop_rel 000354 num_sel_vals rmdb_create_and_pop_rel 000355 quit_received rmdb_create_and_pop_rel 000356 range_ptr rmdb_create_and_pop_rel 000360 rel_name rmdb_create_and_pop_rel 000372 rmdb_ctl_ptr rmdb_create_and_pop_rel 000374 sel_exp_len rmdb_create_and_pop_rel 000376 sel_exp_ptr rmdb_create_and_pop_rel 000400 sel_val_arg_list_ptr rmdb_create_and_pop_rel 000402 sel_val_desc_list_ptr rmdb_create_and_pop_rel 000404 work_area_ptr rmdb_create_and_pop_rel 000406 delete_rel_info rmdb_create_and_pop_rel 000476 dbcb_ptr rmdb_create_and_pop_rel 000500 rmra_ptr rmdb_create_and_pop_rel 000502 dbm_ptr rmdb_create_and_pop_rel 000504 select_list_ptr rmdb_create_and_pop_rel 000506 ss_ptr rmdb_create_and_pop_rel 000510 rmdb_create_rel_info_ptr rmdb_create_and_pop_rel 000512 rmdb_create_rel_info_alloc rmdb_create_and_pop_rel 000514 rmdb_ix_attrs_ptr rmdb_create_and_pop_rel 000516 rmdb_sel_val_info_ptr rmdb_create_and_pop_rel 000520 rmri_ptr rmdb_create_and_pop_rel 000522 rdbi_ptr rmdb_create_and_pop_rel 000524 rai_ptr rmdb_create_and_pop_rel 000526 ti_ptr rmdb_create_and_pop_rel 000530 simple_typed_vector_ptr rmdb_create_and_pop_rel 000532 stv_number_of_dimensions rmdb_create_and_pop_rel THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return_mac tra_ext_1 signal_op enable_op shorten_stack ext_entry_desc int_entry int_entry_desc set_chars_eis index_chars_eis op_alloc_ alloc_storage THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. continue_to_signal_ dsl_$close dsl_$open find_condition_info_ hcs_$initiate mdbm_util_$define_temp_dir_area mdbm_util_$get_resultant_model_pointer mdbm_util_$inconsistent_reset mdbm_util_$inconsistent_set mdbm_util_$mrds_dsl_translate mdbm_util_$mu_get_tuple mdbm_util_$store_direct rmdb_create_relation rmdb_delete_relation$cleanup transaction_manager_$abandon_txn transaction_manager_$abort_txn transaction_manager_$begin_txn transaction_manager_$commit_txn transaction_manager_$get_current_txn_id transaction_manager_$handle_conditions transaction_manager_$rollback_txn THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$bj_journal_full dm_error_$key_duplication dm_error_$lock_deadlock dm_error_$no_current_transaction error_table_$action_not_performed mrds_data_$max_attributes mrds_data_$max_select_items mrds_error_$dup_rel mrds_error_$inval_dtr_expr mrds_error_$invalid_db_index mrds_error_$no_database mrds_error_$no_db_path mrds_error_$no_tuple mrds_error_$previously_defined_index mrds_error_$tuple_not_found mrds_error_$undef_attr sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000251 520 000312 8 38 000314 13 65 000316 87 000317 88 000320 89 000323 90 000325 91 000330 92 000333 93 000336 94 000343 95 000344 96 000364 97 000365 99 000367 101 000411 103 000436 105 000441 106 000506 108 000535 110 000540 111 000542 112 000553 113 000555 114 000556 119 000576 120 000577 121 000600 125 000601 127 000662 129 000721 131 000736 132 000743 133 000744 134 000745 1 83 000763 1 84 000764 1 86 000765 1 88 000767 1 89 000770 1 90 001001 1 92 001005 1 93 001007 1 94 001011 1 95 001012 1 98 001013 1 99 001014 1 100 001031 1 140 001033 138 001110 139 001135 141 001161 142 001172 145 001217 148 001264 149 001267 151 001305 152 001310 153 001312 155 001314 158 001345 160 001412 163 001463 164 001471 165 001473 166 001504 167 001506 169 001507 170 001511 173 001513 174 001515 175 001526 176 001530 177 001536 178 001543 179 001545 180 001551 182 001554 183 001563 184 001567 185 001577 186 001605 187 001607 188 001611 190 001613 192 001614 198 001616 199 001650 201 001666 202 001702 204 001723 206 001724 208 001730 210 001731 216 001753 218 001757 4 60 001762 4 62 001767 4 63 001770 4 65 001771 4 68 001773 4 69 002004 4 71 002006 4 72 002017 4 75 002032 4 77 002033 4 78 002034 4 81 002043 4 82 002044 4 83 002057 4 85 002061 4 86 002072 4 88 002105 4 90 002106 4 91 002107 4 93 002110 4 94 002111 4 96 002116 4 97 002132 4 99 002134 4 100 002145 4 102 002160 4 104 002161 4 105 002162 4 107 002163 4 109 002164 4 110 002175 4 114 002210 4 115 002211 222 002213 223 002215 224 002257 225 002260 1 102 002261 1 107 002262 1 109 002265 1 110 002276 1 114 002312 1 116 002313 1 121 002314 1 123 002317 1 124 002336 1 126 002344 1 127 002347 1 129 002352 1 132 002364 1 133 002367 1 135 002372 1 136 002377 1 137 002400 1 138 002407 231 002410 233 002411 235 002421 237 002427 239 002430 241 002443 243 002452 246 002503 247 002510 250 002512 252 002514 255 002541 257 002543 261 002544 275 002552 276 002576 278 002624 279 002636 282 002665 285 002733 287 002740 289 002757 290 002763 291 002765 293 002767 296 003020 298 003067 299 003076 300 003100 301 003111 302 003113 303 003115 305 003116 306 003120 307 003122 310 003124 311 003127 315 003131 317 003154 318 003160 319 003172 321 003176 324 003271 326 003274 327 003277 329 003314 332 003317 334 003336 336 003357 338 003363 340 003400 342 003406 343 003407 344 003412 347 003431 348 003434 349 003435 350 003436 351 003441 354 003462 356 003463 358 003464 359 003466 360 003467 363 003472 365 003514 366 003523 370 003540 377 003541 383 003555 384 003562 385 003572 386 003577 399 003602 401 003610 403 003612 404 003627 406 003633 407 003635 408 003637 409 003642 410 003644 411 003650 412 003652 414 003654 417 003702 420 003714 432 003715 434 003716 435 003720 436 003723 437 003725 438 003731 439 003733 440 003735 442 003763 443 003764 444 003766 448 003767 450 003771 ----------------------------------------------------------- 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