COMPILATION LISTING OF SEGMENT unpopulate_mrds_db Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/16/86 1345.8 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 19 /****^ HISTORY COMMENTS: 20* 1) change(85-11-08,Dupuis), approve(85-12-16,MCR7314), 21* audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): 22* This entry is being made to cover the change made on 85-04-15 by Thanh 23* Nguyen. (see mrds #136) 24* END HISTORY COMMENTS */ 25 26 27 unpopulate_mrds_db: 28 umdb: 29 procedure (); 30 31 /* DESCRIPTION: 32* 33* This module is primarily for use in testing mrds databases, of 34* any version, for the purpose of deleting all data in a given 35* database, so that subsequent tests will not be affected by the 36* results of previous tests. the major advantage of this utility, 37* is not having to know the architecture of the database involved, 38* as well as the time savings, in not having to delete the 39* database, and do another cmdb, to get an unpopulated database. 40* the command display_mrds_db_population can be used to verify the 41* results. There is no required order to the arguments. The control 42* arguments are over-ridable, with the last given being the 43* accepted condition. 44* 45* 46* 47* PARAMETERS: 48* 49* database_path - - (input) character, the relative pathname of the 50* database, whose data is to be deleted. The user will be queried 51* before actual data deletion takes place. If there is no data in 52* the database, no error will occur. The user must a DBA for the 53* given database. If it is a version 3 database, no other version 3 54* database must be open. 55* 56* -force, -fc - - (input) optional control argument, causes the 57* query as to whether data is to be delete, to be suppressed. 58* 59* -no_force, -nfc - - (input) optional control argument, causes the 60* user to be quered as to whether he really intends to delete all 61* data from the given database. This is the default. 62* 63* 64* 65* 66* HISTORY: 67* 68* 80-05-15 Jim Gray : Originally coded. 69* 70* 81-04-11 Jim Gray : got module in shape for being part of a MRDS release. 71* Added -force and -no_force control arguments, and restricted use of this 72* command to a DBA. 73* 74* 81-09-16 Rickie E. Brinegar: The assignment of abs_path to db path was 75* changed to be done via a rtrim of abs_path to avoid the substring range 76* condition on compiling. 77* 78* 83-02-01 Davids: Modified the internal procedure delete_data to not have 79* the deeply nested if-then-else structure. This was done by going to an 80* exit_delete_data or finish_transaction label. The transaction include files 81* were also added to the delete_data procedure. By puting the transaction 82* in delete_data the rollback operation did not require the restoration of 83* any significant data. 84* 85* 83-02-03 Davids: added declarations for the fixed and rel builtins 86* which are used in the mdbm_db_model include file. 87* 88* 83-02-14 Davids: modified to use the new db_type_flags in the db_model 89* structure instead of the old numeric db_type. 90* 91* 83-05-23 Davids: Renamed the info_ptr variable to command_query_info_ptr. 92* This was needed because the mrds_start_transaction include file now 93* contains the condition_info include file. The condition_info include file 94* declares a structure with a level 2 element of info_ptr. The 95* mrds_start_transaction incl file is included in the delete_data internal 96* procedure which is the same procedure that command_query_ is called in with 97* the info_ptr variable. The info_ptr that points to the query structure is 98* declared in the main procedure so what happens is that the info_ptr in 99* the condition_info structure is incorrectly used. 100* 101* 83-06-24 Davids: Modified so that an error is noot reported at the end 102* of the finish transaction code if the mftxn_code has the same value 103* as that of error_code since that error was already reported. 104**/ 105 106 if recursive_call then do; /* we can't allow recursion because of dsl_$open */ 107 error_code = mrds_error_$no_recursion; 108 call 109 com_err_ (error_code, caller_name, "^/^a", 110 "A release or a start must be done before continuing."); 111 end; 112 else do; 113 114 /* initialize */ 115 116 error_code = 0; 117 area_ptr = null (); 118 force_control = "0"b; /* default to query user before deleting */ 119 all_relations = "1"b; /* default to showing all relations in the view */ 120 path_seen = "0"b; 121 data_model_ptr = null (); 122 db_open = "0"b; 123 command_query_info_ptr = addr (query_info); 124 query_info.version = query_info_version_5; 125 query_info.yes_or_no_sw = "1"b; 126 on sub_error_ ; /* ignore */ 127 call cu_$af_arg_count (nargs, error_code); /* make sure we weren't called as an active function */ 128 if error_code ^= error_table_$not_act_fnc then 129 call 130 com_err_ (error_code, caller_name, "^/^a", 131 "Command called as an active function, or unable to obtain argument count." 132 ); 133 else do; 134 135 error_code = 0; 136 on cleanup call clean_up (); 137 recursive_call = "1"b; /* prevent recursion */ 138 139 /* check for a good call */ 140 141 if nargs < 1 then do; 142 error_code = error_table_$wrong_no_of_args; 143 call 144 com_err_ (error_code, caller_name, "^/^a", 145 "Usage: umdb path {-force|-no_force}"); 146 end; 147 else do; 148 149 /* get some work space */ 150 151 call get_temp_segment_ (caller_name, area_ptr, error_code); 152 if error_code ^= 0 then 153 call 154 com_err_ (error_code, caller_name, "^/^a", 155 "Unable to get a temp segment."); 156 else do; 157 158 area_ptr -> work_area = empty (); 159 160 /* gather all the arguments */ 161 162 call gather_arguments (); 163 164 /* check that we got a pathname argument */ 165 166 if error_code = 0 then do; 167 168 if ^path_seen then do; 169 error_code = error_table_$noarg; 170 call 171 com_err_ (error_code, caller_name, "^/^a", 172 "No pathname argument was given."); 173 end; 174 175 /* now we can go delete the data */ 176 177 else call delete_data (); 178 179 end; 180 end; 181 182 end; 183 184 185 /* clean up after finishing */ 186 187 call clean_up (); 188 189 end; 190 191 end; 192 193 return; 194 195 gather_arguments: 196 procedure (); 197 198 /* routine to gather all arguments */ 199 200 arg_count = 1; 201 args_finished = "0"b; 202 do while (^args_finished); 203 204 /* get this argument, and decide if it is a control argument or not */ 205 206 call cu_$arg_ptr (arg_count, arg_ptr, arg_len, error_code); 207 if error_code ^= 0 then do; 208 args_finished = "1"b; 209 call 210 com_err_ (error_code, caller_name, "^/^a ^d", 211 "Unable to get argument number", arg_count); 212 end; 213 else do; 214 215 /* check for a null argument */ 216 217 if arg_len < 1 then do; 218 args_finished = "1"b; 219 error_code = error_table_$bad_arg; 220 call 221 com_err_ (error_code, caller_name, "^/^a ^d", 222 "A null character string was detected for argument number", 223 arg_count); 224 end; 225 else do; 226 227 /* control arguments begin with a hyphen */ 228 229 if substr (arg, 1, 1) = "-" then 230 call process_control_arg (); 231 else call process_path_arg (); 232 233 end; 234 235 /* advance to the next argument */ 236 237 if arg_count < nargs then 238 arg_count = arg_count + 1; 239 else args_finished = "1"b; 240 241 end; 242 243 end; 244 245 end; 246 247 process_control_arg: 248 procedure (); 249 250 /* routine to determine if user has given one of the legal 251* control arguments of no_force. or force. 252* The logic is such as to allow duplicate control arguments 253* to override each other, with the last given taking effect. */ 254 255 /* NO_FORCE */ 256 257 if arg = "-no_force" | arg = "-nfc" then do; 258 force_control = "0"b; /* query user first */ 259 end; 260 261 /* FORCE */ 262 263 else if arg = "-force" | arg = "-fc" then do; 264 force_control = "1"b; /* dont query */ 265 end; 266 267 /* UNKNOWN */ 268 269 else do; 270 args_finished = "1"b; 271 error_code = error_table_$badopt; 272 call 273 com_err_ (error_code, caller_name, "^/^a^a^a", 274 "The control argument """, arg, 275 """ is not supported by this command."); 276 end; 277 278 end; 279 280 process_path_arg: 281 procedure (); 282 283 /* routine to verify the database model path or submodel path 284* argument, that supplies the view for access information. 285* Only one path argument is allowed */ 286 287 if path_seen then do; 288 289 /* duplicate path name arguments given */ 290 291 args_finished = "1"b; 292 error_code = mrds_error_$duplicate_opt; 293 call 294 com_err_ (error_code, caller_name, "^/^a ^a", 295 "The pathname argument was given more than once:", arg); 296 end; 297 else do; 298 299 /* first pathname seen */ 300 301 path_seen = "1"b; 302 303 /* check for a valid path to a model or submodel */ 304 305 call 306 mrds_dsl_get_version$get_path_info (arg, area_ptr, 307 mrds_path_info_structure_version, mrds_path_info_ptr, error_code); 308 if mrds_path_info_ptr = null () then 309 abs_path = arg; 310 else abs_path = mrds_path_info.absolute_path; 311 if error_code ^= 0 then do; 312 args_finished = "1"b; 313 call 314 com_err_ (error_code, caller_name, "^/^a^a^a", 315 "Unable to find database information using the path """, 316 abs_path, """."); 317 end; 318 319 else do; 320 321 /* check that this is a data base, not a submodel */ 322 323 if mrds_path_info.type.submodel then do; 324 args_finished = "1"b; 325 error_code = error_table_$bad_arg; 326 call 327 com_err_ (error_code, caller_name, "^/^a^a^a", 328 "This command will only accept database paths. The path """, 329 abs_path, """ refers to a submodel."); 330 end; 331 else do; 332 333 /* good database path given */ 334 335 db_path = rtrim (abs_path); 336 337 /* make sure the user is a DBA */ 338 339 if mrds_path_info.mrds_version = 4 then do; 340 341 call 342 mrds_dm_authorization$get_user_class (rtrim (db_path), 343 area_ptr, mrds_authorization_structure_version, 344 mrds_authorization_ptr, error_code); 345 if error_code ^= 0 then do; 346 args_finished = "1"b; 347 call 348 com_err_ (error_code, caller_name, "^/^a^a^a", 349 "Unable to determine if the user is a DBA for the database """ 350 , db_path, """."); 351 end; 352 else if ^mrds_authorization.administrator then do; 353 args_finished = "1"b; 354 error_code = error_table_$insufficient_access; 355 call 356 com_err_ (error_code, caller_name, "^/^a^a^a", 357 "The user must be a DBA to use this command on the database """ 358 , db_path, """."); 359 end; 360 361 362 end; 363 364 end; 365 end; 366 367 end; 368 369 end; 370 371 delete_data: 372 procedure (); 373 374 /* routine to delete all data from the database */ 375 376 /* check to see if he really wants to delete all data */ 377 378 if force_control then 379 answer = "yes"; 380 else call command_query_ (command_query_info_ptr, answer, caller_name, "^a^a^a", 381 "Do you really wish to delete all data currently stored in the database """ 382 , db_path, """?"); 383 if answer ^= "yes" 384 then goto exit_delete_data; 385 386 /* open the model, and get all relation names */ 387 388 call mrds_dm_open (db_path, mode, data_model_ptr, error_code); 389 if error_code ^= 0 390 then do; 391 call com_err_ (error_code, caller_name, 392 "^/Unable to open the data model for database ^a.", db_path); 393 goto exit_delete_data; 394 end; 395 396 call mrds_dm_get_relations (data_model_ptr, addr (work_area), mr_ptr, 397 error_code); 398 if error_code ^= 0 399 then do; 400 call com_err_ (error_code, caller_name, 401 "^/Unable to get the relation names from the model for database ^a.", db_path); 402 goto exit_delete_data; 403 end; 404 405 mstxn_txn_id = "0"b; 406 mstxn_transactions_needed = data_model_ptr -> db_model.db_type_flags.transactions_needed; 407 408 on cleanup begin; 409 call mstxn_cleanup; 410 call clean_up; 411 end; 412 413 on any_other call mstxn_any_other; 414 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 --------------------------- */ 415 416 417 if mstxn_code ^= 0 418 then do; 419 call com_err_ (mstxn_code, caller_name, "^/Unable to start a transaction."); 420 goto exit_delete_data; 421 end; 422 423 /* open the database itself, in an exclusive mode, to be able to delete data */ 424 425 if ^db_open 426 then do; 427 call mrds_dsl_open (db_path, dbi, EXCLUSIVE_UPDATE, error_code); 428 if error_code ^= 0 429 then do; 430 call com_err_ (error_code, caller_name, 431 "^/Unable to get an exclusive opening of the database ^a.", db_path); 432 goto finish_transaction; 433 end; 434 else db_open = "1"b; 435 end; 436 437 /* delete all data for each relation in the database */ 438 439 call ioa_ ("^/^a ^d ^a ^a", "Opening version", 440 mrds_path_info.mrds_version, "database:", db_path); 441 442 do rel_num = 1 by 1 to model_relations.nrels 443 while (error_code = 0); 444 445 rel_name = model_relations (rel_num).relation_name; 446 call mrds_dsl_delete (dbi, 447 "-range (x " || rel_name || ") -select x", error_code); 448 if error_code = mrds_error_$tuple_not_found then 449 error_code = 0; /* 0 tuples OK */ 450 451 end; 452 453 if error_code ^= 0 454 then call com_err_ (error_code, caller_name, 455 "^/Unable to delete all tuples from the relation ^a for the database ^a.", 456 rel_name, db_path); 457 else call ioa_ ("^/Data deletion complete, closing database."); 458 459 finish_transaction: 460 mftxn_code = error_code; 461 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 --------------------------- */ 462 463 464 if mftxn_code ^= 0 & mftxn_code ^= error_code /* don't report the same error twice */ 465 then call com_err_ (mftxn_code, caller_name, "^/Unable to finish transaction"); 466 467 exit_delete_data: 468 return; 469 470 should_rollback: proc () returns (bit (1)); 471 472 return ("0"b); 473 474 end should_rollback; 475 476 restore_significant_data: proc; 477 478 return; 479 480 end restore_significant_data; 481 482 483 end delete_data; 484 485 clean_up: 486 procedure (); 487 488 /* close the model, and database, if open */ 489 490 if data_model_ptr = null () then 491 ; 492 else do; 493 call mrds_dm_close (data_model_ptr, discard); 494 data_model_ptr = null (); 495 end; 496 497 if ^db_open then 498 ; 499 else do; 500 call mrds_dsl_close (dbi, discard); 501 db_open = "0"b; 502 end; 503 504 if area_ptr ^= null () then do; 505 call release_temp_segment_ (caller_name, area_ptr, discard); 506 area_ptr = null (); 507 end; 508 509 recursive_call = "0"b; 510 511 end; 512 513 declare abs_path char (200); /* absolute pathname of model or submodel */ 514 declare all_relations bit (1); /* on => do all rels in view */ 515 declare answer char (4) varying; /* answer from command query */ 516 declare area_ptr ptr; /* points to work space */ 517 declare arg char (arg_len) based (arg_ptr); /* input argument */ 518 declare arg_count fixed bin; /* current arg under inspection */ 519 declare arg_len fixed bin (21); /* lengh of input arg */ 520 declare arg_ptr ptr; /* points to input argument */ 521 declare args_finished bit (1); /* on => all args seen, or error */ 522 declare caller_name char (32) init ("unpopulate_mrds_db") int static 523 options (constant);/* name of calling routine */ 524 declare cleanup condition; /* signaled upon quit/release */ 525 declare any_other condition; 526 declare com_err_ entry options (variable); /* reports errors */ 527 declare command_query_ entry options (variable); /* quieries caller */ 528 declare cu_$af_arg_count entry (fixed bin, fixed bin (35)); /* gets arg count/call type */ 529 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 530 /* gets Nth arg */ 531 declare data_model_ptr ptr; /* pointer to data model */ 532 declare db_open bit (1); /* on => database is open */ 533 declare db_path char (168); /* database absolute path */ 534 declare dbi fixed bin (35); /* database opening index */ 535 declare discard fixed bin (35); /* ignored error code */ 536 declare error_code fixed bin (35); /* error status encoding */ 537 declare error_table_$bad_arg fixed bin (35) ext;/* null input arg */ 538 declare error_table_$badopt fixed bin (35) ext;/* unknown control arg */ 539 declare error_table_$insufficient_access fixed bin (35) ext; 540 /* user not DBA */ 541 declare error_table_$noarg fixed bin (35) ext;/* missing argument */ 542 declare error_table_$not_act_fnc fixed bin (35) ext; /* should get this normally */ 543 declare error_table_$wrong_no_of_args fixed bin (35) ext; /* not minimum of 1 arg */ 544 declare force_control bit (1); /* on => dont query user */ 545 declare get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 546 /* gets temp segs */ 547 declare command_query_info_ptr ptr; /* points to query info */ 548 declare ioa_ entry options (variable); /* does output display */ 549 declare mode fixed bin init (2);/* for model info retrieval */ 550 declare mrds_dm_authorization$get_user_class 551 entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); 552 /* detects DBA */ 553 declare mrds_dm_close entry (ptr, fixed bin (35)); /* closes data model */ 554 declare mrds_dm_get_relations entry (ptr, ptr, ptr, fixed bin (35)); 555 /* gets rel names */ 556 declare mrds_dm_open entry (char (168), fixed bin, ptr, fixed bin (35)); 557 /* opens model */ 558 declare mrds_dsl_close entry options (variable); /* closes databases */ 559 declare mrds_dsl_delete entry options (variable); /* delete mrds db tuples */ 560 declare mrds_dsl_get_version$get_path_info 561 entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); 562 declare mrds_dsl_open entry options (variable); /* opens a database through model or submodel */ 563 declare mrds_error_$duplicate_opt fixed bin (35) ext; /* path arg given > 1 time */ 564 declare mrds_error_$no_recursion fixed bin (35) ext; /* recursion not allowed */ 565 declare mrds_error_$tuple_not_found fixed bin (35) ext; /* not tuples in rel */ 566 declare nargs fixed bin; /* number of arguments presented */ 567 declare path_seen bit (1); /* on => path name argument given */ 568 declare recursive_call bit (1) int static init ("0"b); /* on => attempt to use recursion */ 569 declare rel_name char (32); /* current relation */ 570 declare rel_num fixed bin; /* relation loop index */ 571 declare release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 572 /* gets rid of temp segs */ 573 declare sub_error_ condition; /* from dsl_ entries for added info */ 574 declare sys_info$max_seg_size fixed bin (35) ext;/* largest segment */ 575 declare work_area area (sys_info$max_seg_size) based (area_ptr); 576 /* space for temp storage */ 577 declare (addr, empty, null, substr, rtrim, fixed, rel) builtin; 578 5 1 /* BEGIN INCLUDE FILE mdbm_db_model.incl.pl1 -- jaw, 10/2/78 */ 5 2 5 3 5 4 /****^ HISTORY COMMENTS: 5 5* 1) change(79-02-01,Gray), approve(), audit(), install(): 5 6* modified to save space occupied by model 5 7* 2) change(80-11-03,Gray), approve(), audit(), install(): 5 8* to add mdbm_secured bit in db_model 5 9* 3) change(82-04-09,Davids), approve(), audit(), install(): 5 10* collapsed the following into an unused_offset array: 5 11* chng_before_path_ptr chng_err_path_ptr chng_after_path_ptr 5 12* copy_before_path_ptr copy_err_path_ptr copy_after_path_ptr 5 13* dsply_before_path_pt dsply_err_path_pt dsply_after_path_ptr 5 14* accs_before_path_ptr accs_err_path_ptr accs_after_path_ptr 5 15* unused_1 5 16* Also changed the name of unused_2 to restructuring_history_offset 5 17* and changed the comment on the changer structure to indicate 5 18* that it will contain on database creation information. 5 19* 4) change(82-04-14,Davids), approve(), audit(), install(): 5 20* used one of the unused_offsets to point to a message which indicates 5 21* why the db is inconsistent. The offset will be null when the db is created 5 22* and set the first time the message is used. this is so it will be 5 23* consistent with existing data bases. Also added the message structure. 5 24* 5) change(82-04-28,Davids), approve(), audit(), install(): 5 25* added the undo_request element to the message structure 5 26* 6) change(82-05-04,Davids), approve(), audit(), install(): 5 27* changed unused_offset (12) to last_restructruring_history_offset and 5 28* changed restructuring_history_offset to first_restructuring_history_offset 5 29* 7) change(82-08-19,Davids), approve(), audit(), install(): 5 30* changed the meaning of db_type from 1 => relational and 2 => CODASYL to 5 31* 1 => vfile database and 2 => page_file database. Up to this point all 5 32* database types were equal to 1. 5 33* 8) change(83-02-14,Davids), approve(), audit(), install(): 5 34* changed db_type from a fixed bin unal to a substructure of 18 bit (1) unal 5 35* flags. This will allow information about transactions and dm_file 5 36* concurrency to be independent of the db_type, i.e. vfile or dm_file. The 5 37* change is compatable with all datamodels created by the released version 5 38* of mrds. 5 39* 9) change(83-02-15,Davids), approve(), audit(), install(): 5 40* added the rollback_on flag to the db_type_flags since it appears that you 5 41* can have a dmfile database that requires transactions but does not have any 5 42* journalizing. Also switched the order of the transactions_needed and 5 43* concurrency_on flags - this makes the change compatable with existing 5 44* dmfile databases except when displaying the model since concurrency_on and 5 45* rollback_on will be off in the model even though the dmfile relations had 5 46* them on during creation. 5 47* 10) change(83-02-22,Kubicar), approve(), audit(), install(): 5 48* Removed ctl_file_path_ptr. 5 49* 11) change(85-11-08,Spitzer), approve(85-12-03,MCR7311), 5 50* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 5 51* used 1 unused offset for unreferenced attribute linked lists in db_model, 5 52* 1 unused bit flag in domain_info to indicate an unreferenced domain, 1 bit 5 53* in the flag word for rmdb copying. 5 54* END HISTORY COMMENTS */ 5 55 5 56 5 57 /* this include file contains the structures that go into the make up 5 58* of the "db_model" segment in the model for the database. 5 59* in addition there file_model.m segments, 1 for each database file(see mdbm_file_model.incl.pl1) 5 60* 5 61* the db_model structure goes at the base of the segment, and contains items unique to 5 62* the whole databse. in addition, it has an area of size to fill the 5 63* rest of a segment, that holds the lists of files and domains in the database. 5 64* these lists are singly forward linked lists. all "pointers" in the database model 5 65* are maintained as offsets(bit (18)) from the base of the particular model segment 5 66* since actual pointers are process dependent on segment number. 5 67* the remaining structures are first a path_entry one to save pathnames in, 5 68* and the stack_item and constent structures, used to save a boolean 5 69* expression in polish form, with the stack represented by a linked list. 5 70* the final structure is one for identifying the status of version information */ 5 71 5 72 dcl 1 db_model aligned based (dbm_ptr),/* base of db_model segment, allocated once per database */ 5 73 2 version unal fixed bin, /* data base version, currently 4 */ 5 74 2 db_type_flags unal, 5 75 3 copy_good bit (1) unal, /* "1"b => copy of the db_model is the valid copy */ 5 76 3 unused (13) bit (1) unal, 5 77 3 rollback_on bit (1) unal, /* "1"b => before journaling is to be done */ 5 78 3 concurrency_on bit (1) unal, /* "1"b => dm_file concurrency is being used */ 5 79 3 transactions_needed bit (1) unal, /* "1"b => transactions are needed to reference data */ 5 80 3 vfile_type bit (1) unal, /* "1"b => vfile type relations, "0"b => dm_file type relations */ 5 81 2 uniq_sw_name char (32), /* per database unique attach switch name for files */ 5 82 2 consistant bit (1) unal, /* ON => correctly created/restructured database, ok to open */ 5 83 2 mdbm_secured bit (1) unal, /* on => database has been secured */ 5 84 2 reserved bit (34) unal, /* reserved for flags */ 5 85 2 blk_file_id_len unal fixed bin, /* no. bits required for blocked file id. */ 5 86 2 unblk_file_id_len unal fixed bin, /* number of file id bits, unblocked file */ 5 87 2 num_blk_files unal fixed bin, /* number of blocked files defined in db */ 5 88 2 num_unblk_files unal fixed bin, /* number of unblocked files defined in db */ 5 89 2 num_rels unal fixed bin, /* number of relations defined in db. */ 5 90 2 num_domains unal fixed bin, /* number of domains defined */ 5 91 2 num_dyn_links unal fixed bin, /* no. dynamic links defined */ 5 92 2 max_max_tuples unal fixed bin (35), /* maximum max_tuples across all files */ 5 93 2 pad_1 unal fixed bin (35), /* for future use */ 5 94 2 pad_2 unal fixed bin (35), /* for future use */ 5 95 2 version_ptr bit (18), /* offset to version structure */ 5 96 2 file_ptr unal bit (18), /* offset to first in threaded list of file_infos */ 5 97 2 domain_ptr unal bit (18), /* offset to first in list of domain_infos */ 5 98 2 unreferenced_attribute_ptr unal bit (18), /* offset to first in list of unreferenced attr_infos */ 5 99 2 unused_offsets (11) unal bit (18), /* extra offsets if needed */ 5 100 2 last_restructuring_history_offset unal bit (18), /* offset to last restructuring history entry */ 5 101 2 inconsistent_message_offset unal bit (18), /* offset to message indicating why db is inconsistent */ 5 102 2 first_restructuring_history_offset unal bit (18), /* offset to first restructuring history entry */ 5 103 2 changer_ptr unal bit (18), /* offset to information about db creation */ 5 104 2 dbm_area area (sys_info$max_seg_size - fixed (rel (addr (db_model.dbm_area))) - 1); 5 105 5 106 dcl dbm_ptr ptr; 5 107 5 108 /* the files in the database each have a file_info containing 5 109* their name, the file_model for each file is found by initiating the 5 110* segment "file_name.m" (i.e. the file's name with suffix ".m") 5 111* the file_info list is a singly linked list in definition order */ 5 112 5 113 dcl 1 file_info aligned based (fi_ptr), /* list of file names and numbers */ 5 114 2 file_name char (30), /* name of file */ 5 115 2 file_id bit (36), /* id number of file */ 5 116 2 fwd_ptr unal bit (18), /* thread to next in list */ 5 117 2 unused unal bit (18); /* for future expansion */ 5 118 5 119 dcl fi_ptr ptr; 5 120 5 121 /* each domain used in the database will have a domain info saved in the db_model 5 122* segment. it describes the domain of the given name, and it's options. 5 123* the domain_info's form a singly linked list in definition order */ 5 124 5 125 dcl 1 domain_info aligned based (di_ptr), /* one for each domain defined */ 5 126 2 name char (32), /* name of domain */ 5 127 2 db_desc_is_ptr bit (1) unal, /* on if descriptor is pointer to real desc. */ 5 128 2 user_desc_is_ptr bit (1) unal, /* on if user desc is ptr */ 5 129 2 no_conversion bit (1) unal, /* if no conversion allowed */ 5 130 2 procedures_present bit (1) unal, /* on => ids type procedures present */ 5 131 2 unreferenced bit (1) unal, /* on => this domain is not used in any attribute */ 5 132 2 reserved bit (31) unal, 5 133 2 db_desc bit (36), /* desc. for item in db, or ptr to it */ 5 134 2 user_desc bit (36), /* desc. for user-visible attr, or ptr */ 5 135 2 ave_len fixed bin (35), /* average length of varying string */ 5 136 2 nck_items unal fixed bin, /* no. items in check stack */ 5 137 2 fwd_thread unal bit (18), /* offset to next in list */ 5 138 2 check_path_ptr unal bit (18), /* integ. check proc. */ 5 139 2 ck_stack_ptr unal bit (18), /* to check stack */ 5 140 2 encd_path_ptr unal bit (18), /* encode procedure */ 5 141 2 decd_path_ptr unal bit (18), /* decode procedure */ 5 142 2 str_before_path_ptr unal bit (18), /* proc paths and entries */ 5 143 2 str_err_path_ptr unal bit (18), 5 144 2 str_after_path_ptr unal bit (18), 5 145 2 get_before_path_ptr unal bit (18), 5 146 2 get_err_path_ptr unal bit (18), 5 147 2 get_after_path_ptr unal bit (18), 5 148 2 mod_before_path_ptr unal bit (18), 5 149 2 mod_err_path_ptr unal bit (18), 5 150 2 mod_after_path_ptr unal bit (18), 5 151 2 unused_1 unal bit (18), /* for future expansion */ 5 152 2 unused_2 unal bit (18), 5 153 2 changer_ptr unal bit (18); /* pointer to change_id and chane_time structure */ 5 154 5 155 dcl di_ptr ptr; 5 156 5 157 /* information necessary for attributes that are not used in any relation */ 5 158 5 159 dcl 1 unreferenced_attribute aligned based (ua_ptr), 5 160 2 name char (32), /* name of attribute */ 5 161 2 domain_ptr bit (18) unal, /* to domain_info */ 5 162 2 fwd_thread bit (18) unal, /* to next in list */ 5 163 2 unused (2) bit (18) unal; 5 164 5 165 dcl ua_ptr ptr; 5 166 5 167 5 168 /* space saving pathname$entryname structure, to be allocated 5 169* only when a path$entry has to be saved, else only a bit(18) 5 170* offset takes up space in the main model structure */ 5 171 5 172 declare 1 path_entry based (path_entry_ptr), 5 173 2 path char (168), /* pathname portion of desired path$entry */ 5 174 2 entry char (32), /* entryname portion of desired path$entry */ 5 175 2 reserved unal bit (36); /* for future use */ 5 176 5 177 declare path_entry_ptr ptr; 5 178 5 179 5 180 5 181 5 182 5 183 /* declarations for model of postfix stack holding the check option boolean expression 5 184* the following encoding values indicate the corresponding type of stack element 5 185* 5 186* 1 = 5 187* 2 ^= 5 188* 3 > 5 189* 4 < 5 190* 5 >= 5 191* 6 <= 5 192* 5 193* 10 and 5 194* 20 or 5 195* 30 not 5 196* 5 197* 40 - (minus) 5 198* 5 199* 50 domain variable(same name as domain) 5 200* 5 201* 60 constant(number, bit string, or character string) 5 202* 5 203**/ 5 204 5 205 5 206 declare 1 stack_item based (stack_item_ptr), /* element of stack model list */ 5 207 2 next bit (18), /* link to next in list */ 5 208 2 type fixed binary, /* code for this element type */ 5 209 2 value_ptr bit (18); /* pointer to variable holding value, 5 210* if this is a constant element type */ 5 211 5 212 declare stack_item_ptr ptr; /* pointer to a stack element */ 5 213 5 214 5 215 5 216 declare 1 constant based (constant_ptr), /* variable size space for constant's value storage */ 5 217 2 length fixed bin (35), /* length allocated to hold value */ 5 218 2 value bit (alloc_length refer (constant.length)) aligned; /* value for this constant */ 5 219 5 220 declare constant_ptr ptr; /* pointer to constant's value space */ 5 221 5 222 declare alloc_length fixed binary (35) internal static; /* amount of space to allocate for constant's value */ 5 223 5 224 /* version structure, giving status of source for CMDB/RMDB, 5 225* status of model, and status of resultant */ 5 226 5 227 /* version number is in form MM.N.Y 5 228* where MM is the major version number, N is the minor version alteration, 5 229* and Y is the lastest modification to that alteration, 5 230* where M and N represent numbers 0-9, and Y is a letter */ 5 231 5 232 declare 1 version_status unal based (version_status_ptr), 5 233 2 cmdb_rmdb, 5 234 3 major fixed bin, 5 235 3 minor fixed bin, 5 236 3 modification char (4), 5 237 2 model, 5 238 3 major fixed bin, 5 239 3 minor fixed bin, 5 240 3 modification char (4), 5 241 2 resultant, 5 242 3 major fixed bin, 5 243 3 minor fixed bin, 5 244 3 modification char (4); 5 245 5 246 declare version_status_ptr ptr; 5 247 5 248 5 249 /* maintains information only about the db creation */ 5 250 5 251 declare 1 changer unal based (changer_ptr), 5 252 2 id char (32), 5 253 2 time fixed bin (71), 5 254 2 next bit (18); /* to next in the singly linked list */ 5 255 5 256 declare changer_ptr ptr; 5 257 5 258 5 259 dcl 01 message_str unal based (message_str_ptr), /* general purpose structure to hold messages */ 5 260 02 len fixed bin, /* length of the message */ 5 261 02 text char (message_str_len refer (message_str.len)), /* actual message */ 5 262 02 name char (32), /* name of thing that set the message */ 5 263 02 undo_request char (100), /* rmdb request that will undo the operation 5 264* that caused the database to become inconsistent */ 5 265 02 mbz bit (36); /* for possible extensions, like an offset to another message */ 5 266 5 267 dcl message_str_ptr ptr; /* pointer to the message_str structure */ 5 268 5 269 dcl message_str_len fixed bin; /* initail length of the text string in message_str */ 5 270 5 271 /* END INCLUDE FILE mdbm_db_model.incl.pl1 */ 5 272 5 273 579 580 6 1 /* BEGIN INCLUDE FILE mrds_model_relations.incl.pl1 6 2* 6 3* Created October, 1975 for release in MR 4.0 */ 6 4 6 5 dcl 1 model_relations based (mr_ptr), /* structure to return names of all relations in a model */ 6 6 2 nrels fixed bin (10), /* number of relations */ 6 7 2 relation_name (num_relations_alloc refer (model_relations.nrels)) char (32); /* relation names */ 6 8 6 9 dcl num_relations_alloc fixed bin (10); /* number of relations in model for allocation purposes */ 6 10 6 11 dcl mr_ptr ptr; 6 12 6 13 /* END INCLUDE FILE mrds_model_relations.incl.pl1 */ 6 14 581 582 7 1 /* BEGIN INCLUDE FILE query_info.incl.pl1 TAC June 1, 1973 */ 7 2 /* Renamed to query_info.incl.pl1 and cp_escape_control added, 08/10/78 WOS */ 7 3 /* version number changed to 4, 08/10/78 WOS */ 7 4 /* Version 5 adds explanation_(ptr len) 05/08/81 S. Herbst */ 7 5 /* Version 6 adds literal_sw, prompt_after_explanation switch 12/15/82 S. Herbst */ 7 6 7 7 dcl 1 query_info aligned, /* argument structure for command_query_ call */ 7 8 2 version fixed bin, /* version of this structure - must be set, see below */ 7 9 2 switches aligned, /* various bit switch values */ 7 10 3 yes_or_no_sw bit (1) unaligned init ("0"b), /* not a yes-or-no question, by default */ 7 11 3 suppress_name_sw bit (1) unaligned init ("0"b), /* do not suppress command name */ 7 12 3 cp_escape_control bit (2) unaligned init ("00"b), /* obey static default value */ 7 13 /* "01" -> invalid, "10" -> don't allow, "11" -> allow */ 7 14 3 suppress_spacing bit (1) unaligned init ("0"b), /* whether to print extra spacing */ 7 15 3 literal_sw bit (1) unaligned init ("0"b), /* ON => do not strip leading/trailing white space */ 7 16 3 prompt_after_explanation bit (1) unaligned init ("0"b), /* ON => repeat question after explanation */ 7 17 3 padding bit (29) unaligned init (""b), /* pads it out to t word */ 7 18 2 status_code fixed bin (35) init (0), /* query not prompted by any error, by default */ 7 19 2 query_code fixed bin (35) init (0), /* currently has no meaning */ 7 20 7 21 /* Limit of data defined for version 2 */ 7 22 7 23 2 question_iocbp ptr init (null ()), /* IO switch to write question */ 7 24 2 answer_iocbp ptr init (null ()), /* IO switch to read answer */ 7 25 2 repeat_time fixed bin (71) init (0), /* repeat question every N seconds if no answer */ 7 26 /* minimum of 30 seconds required for repeat */ 7 27 /* otherwise, no repeat will occur */ 7 28 /* Limit of data defined for version 4 */ 7 29 7 30 2 explanation_ptr ptr init (null ()), /* explanation of question to be printed if */ 7 31 2 explanation_len fixed bin (21) init (0); /* user answers "?" (disabled if ptr=null or len=0) */ 7 32 7 33 dcl query_info_version_3 fixed bin int static options (constant) init (3); 7 34 dcl query_info_version_4 fixed bin int static options (constant) init (4); 7 35 dcl query_info_version_5 fixed bin int static options (constant) init (5); 7 36 dcl query_info_version_6 fixed bin int static options (constant) init (6); /* the current version number */ 7 37 7 38 /* END INCLUDE FILE query_info.incl.pl1 */ 583 584 8 1 /* START OF: mrds_opening_modes_.incl.pl1 * * * * * * * * * * * * * * * * */ 8 2 8 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 8 4 /* */ 8 5 /* Name: mrds_opening_modes_.incl.pl1 */ 8 6 /* */ 8 7 /* Defines named constants which can be used in calls to dsl_$open when opening a MRDS */ 8 8 /* data base. */ 8 9 /* */ 8 10 /* Status */ 8 11 /* 0) Created by: Gary C. Dixon; January 22, 1979 */ 8 12 /* */ 8 13 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 8 14 8 15 dcl (RETRIEVAL init(1), 8 16 UPDATE init(2), 8 17 EXCLUSIVE_RETRIEVAL init(3), 8 18 EXCLUSIVE_UPDATE init(4)) fixed bin(35) int static options(constant); 8 19 8 20 /* END OF: mrds_opening_modes_.incl.pl1 * * * * * * * * * * * * * * * * */ 8 21 585 586 9 1 /* BEGIN INCLUDE FILE mrds_path_info.incl.pl1 - - Jim Gray 81-01-22 */ 9 2 9 3 /* HISTORY: 9 4* 9 5* 81-01-22 Jim Gray : originaly created for the dsl_$get_path_info interface, 9 6* a slight extension to the undocumented mrds_dsl_get_version$header. 9 7* 9 8**/ 9 9 9 10 /* DESCRIPTION: 9 11* 9 12* This structure returns information about a relative pathname, given 9 13* to a pathname accepting mrds interface. The information returned 9 14* is the absolute pathname, plus in the case that 9 15* the relative path points to a mrds database or submodel 9 16* whether it is a model or a submodel, the mrds version of 9 17* the model or submodel, it's creator, and the time of creation. 9 18* 9 19**/ 9 20 9 21 9 22 declare 1 mrds_path_info aligned based (mrds_path_info_ptr), 9 23 2 version fixed bin, /* version number for this structure */ 9 24 2 absolute_path char (168), /* the absolute path from the input relative path */ 9 25 2 type, 9 26 3 not_mrds bit (1) unal, /* on => path not to model or submodel */ 9 27 3 model bit (1) unal, /* on => path to database model, thus possible .db suffix */ 9 28 3 submodel bit (1) unal, /* on => path to submodel, thus possible .dsm suffix */ 9 29 3 mbz1 bit (33) unal, 9 30 2 mrds_version fixed bin, /* the mrds version number of the model or submodel */ 9 31 2 creator_id char (32), /* the person.project.tag of the creator */ 9 32 2 creation_time fixed bin (71), /* convert date to binary form of time model/submodel created */ 9 33 2 mbz2 bit (36) unal ; 9 34 9 35 9 36 declare mrds_path_info_ptr ptr ; 9 37 9 38 declare mrds_path_info_structure_version fixed bin init (1) int static options (constant) ; 9 39 9 40 /* END INCLUDE FILE mrds_path_info.incl.pl1 */ 587 588 10 1 /* BEGIN INCLUDE FILE mrds_authorization.incl.pl1 - - 81-01-20 Jim Gray */ 10 2 10 3 /* HISTORY: 10 4* 10 5* 81-01-20 Jim Gray : original created for the mmi_$get_authorization interface 10 6* 10 7**/ 10 8 10 9 /* DESCRIPTION: 10 10* 10 11* this structure returns the callers user_class 10 12* either database administrator or normal user. 10 13* Note that these separate classes were used to allow 10 14* future expansion to the user classes, rather than 10 15* make them logical "not"'s of one another. 10 16* NOTE: a DBA is always also a normal user, thus if the caller 10 17* is a DBA, his normal_user bit will be on also. 10 18* 10 19**/ 10 20 10 21 10 22 declare 1 mrds_authorization aligned based (mrds_authorization_ptr), 10 23 2 version fixed bin, /* version number of this structure */ 10 24 2 administrator bit (1) unal, /* caller is a DBA */ 10 25 2 normal_user bit (1) unal, /* caller has no special priviledges */ 10 26 2 mbz bit (34) unal ; 10 27 10 28 10 29 declare mrds_authorization_ptr ptr ; /* pointer for referring to the structure */ 10 30 10 31 declare mrds_authorization_structure_version fixed bin init (1) int static options (constant) ; 10 32 10 33 /* END INCLUDE FILE mrds_authorization.incl.pl1 */ 589 590 591 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/16/86 1145.0 unpopulate_mrds_db.pl1 >special_ldd>install>MR12.0-1187>unpopulate_mrds_db.pl1 415 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 462 4 02/05/86 1416.4 mrds_finish_transaction.incl.pl1 >ldd>include>mrds_finish_transaction.incl.pl1 579 5 10/16/86 1139.3 mdbm_db_model.incl.pl1 >special_ldd>install>MR12.0-1187>mdbm_db_model.incl.pl1 581 6 10/14/83 1608.4 mrds_model_relations.incl.pl1 >ldd>include>mrds_model_relations.incl.pl1 583 7 03/11/83 1204.3 query_info.incl.pl1 >ldd>include>query_info.incl.pl1 585 8 10/14/83 1608.6 mrds_opening_modes_.incl.pl1 >ldd>include>mrds_opening_modes_.incl.pl1 587 9 10/14/83 1608.8 mrds_path_info.incl.pl1 >ldd>include>mrds_path_info.incl.pl1 589 10 10/14/83 1608.8 mrds_authorization.incl.pl1 >ldd>include>mrds_authorization.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 000063 constant fixed bin(35,0) initial dcl 8-15 set ref 427* TM_NORMAL_MODE 000064 constant fixed bin(17,0) initial dcl 2-15 set ref 1-99* abs_path 000100 automatic char(200) unaligned dcl 513 set ref 308* 310* 313* 326* 335 absolute_path 1 based char(168) level 2 dcl 9-22 ref 310 addr builtin function dcl 577 ref 123 396 396 1-123 1-123 administrator 1 based bit(1) level 2 packed unaligned dcl 10-22 ref 352 all_relations 000162 automatic bit(1) unaligned dcl 514 set ref 119* answer 000164 automatic varying char(4) dcl 515 set ref 378* 380* 383 answer_iocbp 6 000314 automatic pointer initial level 2 dcl 7-7 set ref 7-7* any_other 000000 stack reference condition dcl 525 ref 413 area_ptr 000166 automatic pointer dcl 516 set ref 117* 151* 158 305* 341* 396 396 504 505* 506* arg based char unaligned dcl 517 set ref 229 257 257 263 263 272* 293* 305* 308 arg_count 000170 automatic fixed bin(17,0) dcl 518 set ref 200* 206* 209* 220* 237 237* 237 arg_len 000171 automatic fixed bin(21,0) dcl 519 set ref 206* 217 229 257 257 263 263 272 272 293 293 305 305 308 arg_ptr 000172 automatic pointer dcl 520 set ref 206* 229 257 257 263 263 272 293 305 308 args_finished 000174 automatic bit(1) unaligned dcl 521 set ref 201* 202 208* 218* 239* 270* 291* 312* 324* 346* 353* caller_name 000000 constant char(32) initial unaligned dcl 522 set ref 108* 128* 143* 151* 152* 170* 209* 220* 272* 293* 313* 326* 347* 355* 380* 391* 400* 419* 430* 453* 4-115* 505* cleanup 000176 stack reference condition dcl 524 ref 136 408 com_err_ 000012 constant entry external dcl 526 ref 108 128 143 152 170 209 220 272 293 313 326 347 355 391 400 419 430 453 4-115 command_query_ 000014 constant entry external dcl 527 ref 380 command_query_info_ptr 000266 automatic pointer dcl 547 set ref 123* 380* 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_ 000074 constant entry external dcl 1-61 ref 1-137 cp_escape_control 1(02) 000314 automatic bit(2) initial level 3 packed unaligned dcl 7-7 set ref 7-7* cu_$af_arg_count 000016 constant entry external dcl 528 ref 127 cu_$arg_ptr 000020 constant entry external dcl 529 ref 206 data_model_ptr 000204 automatic pointer dcl 531 set ref 121* 388* 396* 406 490 493* 494* db_model based structure level 1 dcl 5-72 db_open 000206 automatic bit(1) unaligned dcl 532 set ref 122* 425 434* 497 501* db_path 000207 automatic char(168) unaligned dcl 533 set ref 335* 341 341 347* 355* 380* 388* 391* 400* 427* 430* 439* 453* db_type_flags 0(18) based structure level 2 packed unaligned dcl 5-72 dbi 000261 automatic fixed bin(35,0) dcl 534 set ref 427* 446* 500* discard 000262 automatic fixed bin(35,0) dcl 535 set ref 493* 500* 505* dm_error_$bj_journal_full 000114 external static fixed bin(35,0) dcl 4-52 ref 1-132 dm_error_$lock_deadlock 000116 external static fixed bin(35,0) dcl 4-53 ref 4-78 1-126 dm_error_$no_current_transaction 000076 external static fixed bin(35,0) dcl 1-62 ref 1-90 empty builtin function dcl 577 ref 158 error_code 000263 automatic fixed bin(35,0) dcl 536 set ref 107* 108* 116* 127* 128 128* 135* 142* 143* 151* 152 152* 166 169* 170* 206* 207 209* 219* 220* 271* 272* 292* 293* 305* 311 313* 325* 326* 341* 345 347* 354* 355* 388* 389 391* 396* 398 400* 427* 428 430* 442 446* 448 448* 453 453* 459 4-115 error_table_$bad_arg 000022 external static fixed bin(35,0) dcl 537 ref 219 325 error_table_$badopt 000024 external static fixed bin(35,0) dcl 538 ref 271 error_table_$insufficient_access 000026 external static fixed bin(35,0) dcl 539 ref 354 error_table_$noarg 000030 external static fixed bin(35,0) dcl 541 ref 169 error_table_$not_act_fnc 000032 external static fixed bin(35,0) dcl 542 ref 128 error_table_$wrong_no_of_args 000034 external static fixed bin(35,0) dcl 543 ref 142 explanation_len 14 000314 automatic fixed bin(21,0) initial level 2 dcl 7-7 set ref 7-7* explanation_ptr 12 000314 automatic pointer initial level 2 dcl 7-7 set ref 7-7* find_condition_info_ 000100 constant entry external dcl 1-64 ref 1-123 force_control 000264 automatic bit(1) unaligned dcl 544 set ref 118* 258* 264* 378 get_temp_segment_ 000036 constant entry external dcl 545 ref 151 ioa_ 000040 constant entry external dcl 548 ref 439 457 literal_sw 1(05) 000314 automatic bit(1) initial level 3 packed unaligned dcl 7-7 set ref 7-7* mftxn_code 000142 automatic fixed bin(35,0) dcl 4-54 set ref 459* 4-62* 4-65 4-68* 4-69 4-78 4-115 4-115 4-115* 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* mode 000270 automatic fixed bin(17,0) initial dcl 549 set ref 388* 549* model_relations based structure level 1 unaligned dcl 6-5 mr_ptr 000312 automatic pointer dcl 6-11 set ref 396* 442 445 mrds_authorization based structure level 1 dcl 10-22 mrds_authorization_ptr 000334 automatic pointer dcl 10-29 set ref 341* 352 mrds_authorization_structure_version 000064 constant fixed bin(17,0) initial dcl 10-31 set ref 341* mrds_dm_authorization$get_user_class 000042 constant entry external dcl 550 ref 341 mrds_dm_close 000044 constant entry external dcl 553 ref 493 mrds_dm_get_relations 000046 constant entry external dcl 554 ref 396 mrds_dm_open 000050 constant entry external dcl 556 ref 388 mrds_dsl_close 000052 constant entry external dcl 558 ref 500 mrds_dsl_delete 000054 constant entry external dcl 559 ref 446 mrds_dsl_get_version$get_path_info 000056 constant entry external dcl 560 ref 305 mrds_dsl_open 000060 constant entry external dcl 562 ref 427 mrds_error_$duplicate_opt 000062 external static fixed bin(35,0) dcl 563 ref 292 mrds_error_$no_recursion 000064 external static fixed bin(35,0) dcl 564 ref 107 mrds_error_$tuple_not_found 000066 external static fixed bin(35,0) dcl 565 ref 448 mrds_path_info based structure level 1 dcl 9-22 mrds_path_info_ptr 000332 automatic pointer dcl 9-36 set ref 305* 308 310 323 339 439 mrds_path_info_structure_version 000064 constant fixed bin(17,0) initial dcl 9-38 set ref 305* mrds_version 54 based fixed bin(17,0) level 2 dcl 9-22 set ref 339 439* mstxn_code 000100 automatic fixed bin(35,0) dcl 1-65 set ref 1-83* 1-89* 1-90 1-99* 1-140 419* 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 406* 1-86 mstxn_txn_id 000105 automatic bit(36) dcl 1-70 set ref 405* 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 nargs 000271 automatic fixed bin(17,0) dcl 566 set ref 127* 141 237 nrels based fixed bin(10,0) level 2 dcl 6-5 ref 442 null builtin function dcl 577 ref 117 121 7-7 7-7 7-7 308 1-123 1-123 490 494 504 506 padding 1(07) 000314 automatic bit(29) initial level 3 packed unaligned dcl 7-7 set ref 7-7* path_seen 000272 automatic bit(1) unaligned dcl 567 set ref 120* 168 287 301* prompt_after_explanation 1(06) 000314 automatic bit(1) initial level 3 packed unaligned dcl 7-7 set ref 7-7* query_code 3 000314 automatic fixed bin(35,0) initial level 2 dcl 7-7 set ref 7-7* query_info 000314 automatic structure level 1 dcl 7-7 set ref 123 query_info_version_5 constant fixed bin(17,0) initial dcl 7-35 ref 124 question_iocbp 4 000314 automatic pointer initial level 2 dcl 7-7 set ref 7-7* recursive_call 000010 internal static bit(1) initial unaligned dcl 568 set ref 106 137* 509* rel_name 000273 automatic char(32) unaligned dcl 569 set ref 445* 446 453* rel_num 000303 automatic fixed bin(17,0) dcl 570 set ref 442* 445* relation_name 1 based char(32) array level 2 packed unaligned dcl 6-5 ref 445 release_temp_segment_ 000070 constant entry external dcl 571 ref 505 repeat_time 10 000314 automatic fixed bin(71,0) initial level 2 dcl 7-7 set ref 7-7* rtrim builtin function dcl 577 ref 335 341 341 status_code 2 000314 automatic fixed bin(35,0) initial level 2 dcl 7-7 set ref 7-7* sub_error_ 000304 stack reference condition dcl 573 ref 126 submodel 53(02) based bit(1) level 3 packed unaligned dcl 9-22 ref 323 substr builtin function dcl 577 ref 229 suppress_name_sw 1(01) 000314 automatic bit(1) initial level 3 packed unaligned dcl 7-7 set ref 7-7* suppress_spacing 1(04) 000314 automatic bit(1) initial level 3 packed unaligned dcl 7-7 set ref 7-7* switches 1 000314 automatic structure level 2 dcl 7-7 sys_info$max_seg_size 000072 external static fixed bin(35,0) dcl 574 ref 158 transaction_manager_$abandon_txn 000102 constant entry external dcl 1-72 ref 4-72 4-86 4-100 4-110 1-110 transaction_manager_$abort_txn 000104 constant entry external dcl 1-73 ref 4-71 4-85 4-99 4-109 1-109 transaction_manager_$begin_txn 000106 constant entry external dcl 1-74 ref 1-99 transaction_manager_$commit_txn 000120 constant entry external dcl 4-56 ref 4-68 transaction_manager_$get_current_txn_id 000110 constant entry external dcl 1-75 ref 1-89 transaction_manager_$handle_conditions 000112 constant entry external dcl 1-76 ref 1-135 transaction_manager_$rollback_txn 000122 constant entry external dcl 4-57 ref 4-82 4-96 transactions_needed 0(34) based bit(1) level 3 packed unaligned dcl 5-72 ref 406 type 53 based structure level 2 dcl 9-22 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* version 000314 automatic fixed bin(17,0) level 2 dcl 7-7 set ref 124* work_area based area dcl 575 set ref 158* 396 396 yes_or_no_sw 1 000314 automatic bit(1) initial level 3 packed unaligned dcl 7-7 set ref 125* 7-7* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. EXCLUSIVE_RETRIEVAL internal static fixed bin(35,0) initial dcl 8-15 HIGHEST_MODE internal static fixed bin(17,0) initial dcl 2-12 LOWEST_MODE internal static fixed bin(17,0) initial dcl 2-12 RETRIEVAL internal static fixed bin(35,0) initial dcl 8-15 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 UPDATE internal static fixed bin(35,0) initial dcl 8-15 alloc_length internal static fixed bin(35,0) dcl 5-222 changer based structure level 1 packed unaligned dcl 5-251 changer_ptr automatic pointer dcl 5-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 5-216 constant_ptr automatic pointer dcl 5-220 dbm_ptr automatic pointer dcl 5-106 di_ptr automatic pointer dcl 5-155 domain_info based structure level 1 dcl 5-125 error_table_$null_info_ptr external static fixed bin(35,0) dcl 1-63 fi_ptr automatic pointer dcl 5-119 file_info based structure level 1 dcl 5-113 fixed builtin function dcl 577 message_str based structure level 1 packed unaligned dcl 5-259 message_str_len automatic fixed bin(17,0) dcl 5-269 message_str_ptr automatic pointer dcl 5-267 num_relations_alloc automatic fixed bin(10,0) dcl 6-9 path_entry based structure level 1 packed unaligned dcl 5-172 path_entry_ptr automatic pointer dcl 5-177 query_info_version_3 internal static fixed bin(17,0) initial dcl 7-33 query_info_version_4 internal static fixed bin(17,0) initial dcl 7-34 query_info_version_6 internal static fixed bin(17,0) initial dcl 7-36 rel builtin function dcl 577 stack_item based structure level 1 unaligned dcl 5-206 stack_item_ptr automatic pointer dcl 5-212 ua_ptr automatic pointer dcl 5-165 unreferenced_attribute based structure level 1 dcl 5-159 version_status based structure level 1 packed unaligned dcl 5-232 version_status_ptr automatic pointer dcl 5-246 NAMES DECLARED BY EXPLICIT CONTEXT. clean_up 003531 constant entry internal dcl 485 ref 136 187 410 delete_data 002224 constant entry internal dcl 371 ref 177 exit_delete_data 003367 constant label dcl 467 ref 383 393 402 420 finish_transaction 003104 constant label dcl 459 set ref 432 gather_arguments 001247 constant entry internal dcl 195 ref 162 mftxn_check_code 003116 constant label dcl 4-65 ref 1-127 1-133 mftxn_exit 003336 constant label dcl 4-115 ref 4-63 mstxn_any_other 003422 constant entry internal dcl 1-116 ref 413 mstxn_cleanup 003370 constant entry internal dcl 1-102 ref 409 mstxn_exit 002557 constant label dcl 1-140 ref 1-86 1-95 4-91 4-105 process_control_arg 001425 constant entry internal dcl 247 ref 229 process_path_arg 001532 constant entry internal dcl 280 ref 231 restore_significant_data 003526 constant entry internal dcl 476 ref 4-77 should_rollback 003517 constant entry internal dcl 470 ref 4-94 umdb 000645 constant entry external dcl 27 unpopulate_mrds_db 000655 constant entry external dcl 27 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4410 4534 3647 4420 Length 5246 3647 124 476 541 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME umdb 460 external procedure is an external procedure. on unit on line 126 64 on unit on unit on line 136 64 on unit gather_arguments internal procedure shares stack frame of external procedure umdb. process_control_arg internal procedure shares stack frame of external procedure umdb. process_path_arg internal procedure shares stack frame of external procedure umdb. delete_data 204 internal procedure enables or reverts conditions. on unit on line 408 76 on unit on unit on line 413 82 on unit mstxn_cleanup internal procedure shares stack frame of on unit on line 408. mstxn_any_other internal procedure shares stack frame of on unit on line 413. should_rollback internal procedure shares stack frame of internal procedure delete_data. restore_significant_data internal procedure shares stack frame of internal procedure delete_data. clean_up 94 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 recursive_call umdb STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME delete_data 000100 mstxn_code delete_data 000101 mstxn_retries delete_data 000102 mstxn_temp_code delete_data 000103 mstxn_transactions_needed delete_data 000104 user_started_transaction delete_data 000105 mstxn_txn_id delete_data 000106 user_transaction_id delete_data 000110 mstxn_condition_info delete_data 000142 mftxn_code delete_data 000143 mftxn_temp_code delete_data umdb 000100 abs_path umdb 000162 all_relations umdb 000164 answer umdb 000166 area_ptr umdb 000170 arg_count umdb 000171 arg_len umdb 000172 arg_ptr umdb 000174 args_finished umdb 000204 data_model_ptr umdb 000206 db_open umdb 000207 db_path umdb 000261 dbi umdb 000262 discard umdb 000263 error_code umdb 000264 force_control umdb 000266 command_query_info_ptr umdb 000270 mode umdb 000271 nargs umdb 000272 path_seen umdb 000273 rel_name umdb 000303 rel_num umdb 000312 mr_ptr umdb 000314 query_info umdb 000332 mrds_path_info_ptr umdb 000334 mrds_authorization_ptr umdb THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ command_query_ continue_to_signal_ cu_$af_arg_count cu_$arg_ptr find_condition_info_ get_temp_segment_ ioa_ mrds_dm_authorization$get_user_class mrds_dm_close mrds_dm_get_relations mrds_dm_open mrds_dsl_close mrds_dsl_delete mrds_dsl_get_version$get_path_info mrds_dsl_open release_temp_segment_ 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_$lock_deadlock dm_error_$no_current_transaction error_table_$bad_arg error_table_$badopt error_table_$insufficient_access error_table_$noarg error_table_$not_act_fnc error_table_$wrong_no_of_args mrds_error_$duplicate_opt mrds_error_$no_recursion mrds_error_$tuple_not_found sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 549 000610 7 7 000612 27 000644 106 000663 107 000666 108 000670 111 000721 116 000722 117 000723 118 000725 119 000726 120 000730 121 000731 122 000733 123 000734 124 000736 125 000740 126 000742 127 000757 128 000770 135 001026 136 001027 137 001051 141 001054 142 001057 143 001061 146 001112 151 001113 152 001133 158 001170 162 001174 166 001175 168 001177 169 001201 170 001204 173 001235 177 001236 187 001242 193 001246 195 001247 200 001250 201 001252 202 001253 206 001256 207 001273 208 001275 209 001277 212 001335 217 001336 218 001341 219 001343 220 001346 224 001403 229 001404 231 001413 237 001414 239 001421 243 001423 245 001424 247 001425 257 001426 258 001440 259 001441 263 001442 264 001452 265 001454 270 001455 271 001457 272 001462 278 001531 280 001532 287 001533 291 001535 292 001537 293 001542 296 001602 301 001603 305 001605 308 001640 310 001652 311 001656 312 001660 313 001662 317 001726 323 001727 324 001733 325 001735 326 001740 330 002004 335 002005 339 002021 341 002024 345 002074 346 002077 347 002101 351 002145 352 002146 353 002152 354 002154 355 002157 369 002222 371 002223 378 002231 380 002241 383 002310 388 002316 389 002333 391 002336 393 002366 396 002367 398 002406 400 002411 402 002441 405 002442 406 002443 408 002447 409 002463 410 002464 411 002471 413 002472 1 83 002510 1 86 002511 1 88 002513 1 89 002514 1 90 002525 1 92 002531 1 93 002533 1 94 002535 1 95 002536 1 98 002537 1 99 002540 1 100 002555 1 140 002557 419 002561 420 002605 425 002606 427 002611 428 002634 430 002637 432 002667 434 002670 439 002672 442 002740 445 002754 446 002763 448 003021 451 003030 453 003032 457 003070 459 003104 4 60 003107 4 62 003114 4 63 003115 4 65 003116 4 68 003120 4 69 003131 4 71 003133 4 72 003144 4 75 003157 4 77 003160 4 78 003161 4 81 003170 4 82 003171 4 83 003204 4 85 003206 4 86 003217 4 88 003232 4 90 003233 4 91 003234 4 93 003235 4 94 003236 4 96 003243 4 97 003257 4 99 003261 4 100 003272 4 102 003305 4 104 003306 4 105 003307 4 107 003310 4 109 003311 4 110 003322 4 114 003335 4 115 003336 467 003367 1 102 003370 1 107 003371 1 109 003374 1 110 003405 1 114 003421 1 116 003422 1 121 003423 1 123 003426 1 124 003445 1 126 003453 1 127 003456 1 129 003461 1 132 003473 1 133 003476 1 135 003501 1 136 003506 1 137 003507 1 138 003516 470 003517 472 003521 476 003526 478 003527 485 003530 490 003536 493 003544 494 003554 497 003557 500 003562 501 003576 504 003600 505 003604 506 003625 509 003630 511 003632 ----------------------------------------------------------- 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