COMPILATION LISTING OF SEGMENT rmdb_execute_undo Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/23/86 1012.2 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 rmdb_execute_undo: 8 execute_undo: 9 proc (sci_ptr, request_name, db_path, db_model_ptr, incon_name, undo_request); 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(86-01-27,Spitzer), approve(86-01-27,MCR7311), 14* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 15* added call to rmdb_salvage_db. 16* 2) change(86-10-21,Blair), approve(86-10-21,PBF7311), audit(86-10-23,Dupuis), 17* install(86-10-23,MR12.0-1199): 18* Add the entry name execute_undo so that display_mrds_dm can call this 19* program through mrds_rst_ to clean things up when the user is trying to 20* display the model. 21* END HISTORY COMMENTS */ 22 23 24 /* 25* . BEGIN_DESCRIPTION 26* This routine will query the user to find out if he wants the 27* undo_request to be executed. If the answer is yes the undo 28* request is executed and if the execution was ok the module 29* returns to its caller. If the execution fails the database is 30* freed, if it cannot be freed the subsystem is aborted. If the 31* user indicates that the undo request should not be executed then 32* the database is just freed, if it cannot be freed the subsystem 33* is aborted. If the execution of the undo request fails or the 34* user does not request its execution but the database was freed 35* then the ssu request line is aborted. Note that if the subsystem 36* or request line is aborted this module will not return to its 37* caller. A message indicating that the database has been freed 38* will be printed on the users terminal. 39* 40* This module should only be called if the currently readied 41* database is inconsistent. 42* . END_DESCRIPTION 43* 44* Known Bugs: 45* . 1) ssu_$execute_string does not return if the execution fails 46* 47* Other Problems: 48* 49* . HISTORY 50* 82-05-26 Davids: Written 51* 52* 82-06-23 Davids: removed call to get_shortest_path and declared 53* . some explicitly declared builtins. 54* 55* 82-07-01 Roger Lackey : Modified the calls to mu_db_inconsistent to use 56* mdbm_util_$inconsistent_* for binding. 57**/ 58 59 /* PARAMETERS */ 60 61 dcl sci_ptr ptr; /* (input) just passing through */ 62 dcl request_name char (32); /* (input) request being executed */ 63 dcl db_path char (168); /* (input) absolute path of the readied database */ 64 dcl db_model_ptr ptr; /* (input) pointer to the db_model seg of the readied database */ 65 dcl incon_name char (32); /* (input) request name that caused the db to be inconsistent */ 66 dcl undo_request char (100); /* (input) request that will make the db consistent */ 67 68 /* AUTOMATIC */ 69 70 dcl code fixed bin (35); /* standard error code */ 71 dcl explanation char (300); /* explanatory text to the query */ 72 dcl question char (300); /* initial query to user */ 73 dcl answer char (3) varying; /* user's answer to the query (yes | no) */ 74 75 /* EXTERNAL STATIC */ 76 77 dcl error_table_$action_not_performed fixed bin (35) ext static; 78 dcl iox_$user_input ptr ext static; 79 dcl iox_$user_output ptr ext static; 80 81 /* ENTRIES */ 82 83 dcl command_query_ entry () options (variable); 84 dcl mdbm_util_$inconsistent_reset entry (ptr); 85 dcl rmdb_salvage_db entry (char (*)); 86 dcl ssu_$abort_line entry () options (variable); 87 dcl ssu_$abort_subsystem entry () options (variable); 88 dcl ssu_$execute_string entry (ptr, char (*), fixed bin (35)); 89 dcl ssu_et_$null_request_line fixed bin(35) ext static; 90 91 /* BUILTINS */ 92 93 dcl addr builtin; 94 dcl length builtin; 95 dcl null builtin; 96 dcl rtrim builtin; 97 98 /* INCLUDES */ 99 1 1 /* BEGIN INCLUDE FILE query_info.incl.pl1 TAC June 1, 1973 */ 1 2 /* Renamed to query_info.incl.pl1 and cp_escape_control added, 08/10/78 WOS */ 1 3 /* version number changed to 4, 08/10/78 WOS */ 1 4 /* Version 5 adds explanation_(ptr len) 05/08/81 S. Herbst */ 1 5 /* Version 6 adds literal_sw, prompt_after_explanation switch 12/15/82 S. Herbst */ 1 6 1 7 dcl 1 query_info aligned, /* argument structure for command_query_ call */ 1 8 2 version fixed bin, /* version of this structure - must be set, see below */ 1 9 2 switches aligned, /* various bit switch values */ 1 10 3 yes_or_no_sw bit (1) unaligned init ("0"b), /* not a yes-or-no question, by default */ 1 11 3 suppress_name_sw bit (1) unaligned init ("0"b), /* do not suppress command name */ 1 12 3 cp_escape_control bit (2) unaligned init ("00"b), /* obey static default value */ 1 13 /* "01" -> invalid, "10" -> don't allow, "11" -> allow */ 1 14 3 suppress_spacing bit (1) unaligned init ("0"b), /* whether to print extra spacing */ 1 15 3 literal_sw bit (1) unaligned init ("0"b), /* ON => do not strip leading/trailing white space */ 1 16 3 prompt_after_explanation bit (1) unaligned init ("0"b), /* ON => repeat question after explanation */ 1 17 3 padding bit (29) unaligned init (""b), /* pads it out to t word */ 1 18 2 status_code fixed bin (35) init (0), /* query not prompted by any error, by default */ 1 19 2 query_code fixed bin (35) init (0), /* currently has no meaning */ 1 20 1 21 /* Limit of data defined for version 2 */ 1 22 1 23 2 question_iocbp ptr init (null ()), /* IO switch to write question */ 1 24 2 answer_iocbp ptr init (null ()), /* IO switch to read answer */ 1 25 2 repeat_time fixed bin (71) init (0), /* repeat question every N seconds if no answer */ 1 26 /* minimum of 30 seconds required for repeat */ 1 27 /* otherwise, no repeat will occur */ 1 28 /* Limit of data defined for version 4 */ 1 29 1 30 2 explanation_ptr ptr init (null ()), /* explanation of question to be printed if */ 1 31 2 explanation_len fixed bin (21) init (0); /* user answers "?" (disabled if ptr=null or len=0) */ 1 32 1 33 dcl query_info_version_3 fixed bin int static options (constant) init (3); 1 34 dcl query_info_version_4 fixed bin int static options (constant) init (4); 1 35 dcl query_info_version_5 fixed bin int static options (constant) init (5); 1 36 dcl query_info_version_6 fixed bin int static options (constant) init (6); /* the current version number */ 1 37 1 38 /* END INCLUDE FILE query_info.incl.pl1 */ 100 101 102 if undo_request = "" 103 then explanation = "^/The database is inconsistent because the operation:" || 104 "^/^-^a^s^/was interrupted. The database must be made consistent" || 105 "^/in order to perform additional restructuring requests. " || 106 "^/^/Do you wish to continue ?"; 107 else explanation = "^/The database is inconsistent because the operation:" || 108 "^/^-^a^s^/was interrupted. In order to undo the effects of this" || 109 "^/the request ""^a"" must be executed." || 110 "^/Until the database is made consistent it may not be restructured." || 111 "^/^/Do you wish to run the request ?"; 112 query_info.version = query_info_version_5; 113 query_info.switches.yes_or_no_sw = "1"b; 114 query_info.switches.suppress_name_sw = "0"b; 115 query_info.switches.cp_escape_control = "00"b; 116 query_info.switches.suppress_spacing = "0"b; 117 query_info.switches.padding = "0"b; 118 query_info.status_code = 0; 119 query_info.query_code = 0; 120 query_info.question_iocbp = iox_$user_output; 121 query_info.answer_iocbp = iox_$user_input; 122 query_info.repeat_time = 0; 123 query_info.explanation_ptr = addr (explanation); 124 query_info.explanation_len = length (rtrim (explanation)); 125 if undo_request = "" 126 then question = "^/The database ^s^a is inconsistent. " || 127 "^/In order to ready or restructure the database it must first be made consistent." || 128 "^/^/Do you wish to continue ?"; 129 else question = "^/The database ^s^a is inconsistent. " || 130 "^/In order to ready or restructure the database the following " || 131 "^/request which will make the database consistent must be run:" || 132 "^/^-^a^/Do you wish to run it ?"; 133 call command_query_ (addr (query_info), answer, request_name, rtrim(question), 134 incon_name, db_path, undo_request); 135 136 if answer = "yes" 137 then do; 138 call rmdb_salvage_db (db_path); 139 140 call ssu_$execute_string (sci_ptr, rtrim (undo_request), code); 141 if (code ^= 0 & code ^= ssu_et_$null_request_line) 142 then do; 143 call ssu_$execute_string (sci_ptr, "free_db", code); 144 if code ^= 0 145 then call ssu_$abort_subsystem (sci_ptr, code, 146 "Execution of the undo request failed and the db could not be freed."); 147 call ssu_$abort_line (sci_ptr, code, 148 "Execution of the undo request failed, the database has been freed"); 149 end; 150 else call mdbm_util_$inconsistent_reset (db_model_ptr); 151 end; 152 else do; 153 call ssu_$execute_string (sci_ptr, "free_db", code); 154 if code ^= 0 155 then call ssu_$abort_subsystem (sci_ptr, code, "Could not free the database"); 156 call ssu_$abort_line (sci_ptr, error_table_$action_not_performed, 157 "^/The database is inconsistent and therefore may not be restructured, it has been freed."); 158 end; 159 160 end rmdb_execute_undo; 161 162 163 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/23/86 1008.0 rmdb_execute_undo.pl1 >spec>install>1199>rmdb_execute_undo.pl1 100 1 03/11/83 1204.3 query_info.incl.pl1 >ldd>include>query_info.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. addr builtin function dcl 93 ref 123 133 133 answer 000330 automatic varying char(3) dcl 73 set ref 133* 136 answer_iocbp 6 000332 automatic pointer initial level 2 dcl 1-7 set ref 121* 1-7* code 000100 automatic fixed bin(35,0) dcl 70 set ref 140* 141 141 143* 144 144* 147* 153* 154 154* command_query_ 000016 constant entry external dcl 83 ref 133 cp_escape_control 1(02) 000332 automatic bit(2) initial level 3 packed unaligned dcl 1-7 set ref 115* 1-7* db_model_ptr parameter pointer dcl 64 set ref 7 7 150* db_path parameter char(168) unaligned dcl 63 set ref 7 7 133* 138* error_table_$action_not_performed 000010 external static fixed bin(35,0) dcl 77 set ref 156* explanation 000101 automatic char(300) unaligned dcl 71 set ref 102* 107* 123 124 explanation_len 14 000332 automatic fixed bin(21,0) initial level 2 dcl 1-7 set ref 124* 1-7* explanation_ptr 12 000332 automatic pointer initial level 2 dcl 1-7 set ref 123* 1-7* incon_name parameter char(32) unaligned dcl 65 set ref 7 7 133* iox_$user_input 000012 external static pointer dcl 78 ref 121 iox_$user_output 000014 external static pointer dcl 79 ref 120 length builtin function dcl 94 ref 124 literal_sw 1(05) 000332 automatic bit(1) initial level 3 packed unaligned dcl 1-7 set ref 1-7* mdbm_util_$inconsistent_reset 000020 constant entry external dcl 84 ref 150 null builtin function dcl 95 ref 1-7 1-7 1-7 padding 1(07) 000332 automatic bit(29) initial level 3 packed unaligned dcl 1-7 set ref 117* 1-7* prompt_after_explanation 1(06) 000332 automatic bit(1) initial level 3 packed unaligned dcl 1-7 set ref 1-7* query_code 3 000332 automatic fixed bin(35,0) initial level 2 dcl 1-7 set ref 119* 1-7* query_info 000332 automatic structure level 1 dcl 1-7 set ref 133 133 query_info_version_5 constant fixed bin(17,0) initial dcl 1-35 ref 112 question 000214 automatic char(300) unaligned dcl 72 set ref 125* 129* 133 133 question_iocbp 4 000332 automatic pointer initial level 2 dcl 1-7 set ref 120* 1-7* repeat_time 10 000332 automatic fixed bin(71,0) initial level 2 dcl 1-7 set ref 122* 1-7* request_name parameter char(32) unaligned dcl 62 set ref 7 7 133* rmdb_salvage_db 000022 constant entry external dcl 85 ref 138 rtrim builtin function dcl 96 ref 124 133 133 140 140 sci_ptr parameter pointer dcl 61 set ref 7 7 140* 143* 144* 147* 153* 154* 156* ssu_$abort_line 000024 constant entry external dcl 86 ref 147 156 ssu_$abort_subsystem 000026 constant entry external dcl 87 ref 144 154 ssu_$execute_string 000030 constant entry external dcl 88 ref 140 143 153 ssu_et_$null_request_line 000032 external static fixed bin(35,0) dcl 89 ref 141 status_code 2 000332 automatic fixed bin(35,0) initial level 2 dcl 1-7 set ref 118* 1-7* suppress_name_sw 1(01) 000332 automatic bit(1) initial level 3 packed unaligned dcl 1-7 set ref 114* 1-7* suppress_spacing 1(04) 000332 automatic bit(1) initial level 3 packed unaligned dcl 1-7 set ref 116* 1-7* switches 1 000332 automatic structure level 2 dcl 1-7 undo_request parameter char(100) unaligned dcl 66 set ref 7 7 102 125 133* 140 140 version 000332 automatic fixed bin(17,0) level 2 dcl 1-7 set ref 112* yes_or_no_sw 1 000332 automatic bit(1) initial level 3 packed unaligned dcl 1-7 set ref 113* 1-7* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. query_info_version_3 internal static fixed bin(17,0) initial dcl 1-33 query_info_version_4 internal static fixed bin(17,0) initial dcl 1-34 query_info_version_6 internal static fixed bin(17,0) initial dcl 1-36 NAMES DECLARED BY EXPLICIT CONTEXT. execute_undo 000474 constant entry external dcl 7 rmdb_execute_undo 000505 constant entry external dcl 7 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1362 1416 1200 1372 Length 1622 1200 34 167 161 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME execute_undo 282 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME execute_undo 000100 code execute_undo 000101 explanation execute_undo 000214 question execute_undo 000330 answer execute_undo 000332 query_info execute_undo THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. command_query_ mdbm_util_$inconsistent_reset rmdb_salvage_db ssu_$abort_line ssu_$abort_subsystem ssu_$execute_string THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed iox_$user_input iox_$user_output ssu_et_$null_request_line LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1 7 000434 7 000466 102 000513 107 000525 112 000530 113 000532 114 000534 115 000536 116 000540 117 000542 118 000544 119 000545 120 000546 121 000552 122 000555 123 000557 124 000561 125 000573 129 000603 133 000606 136 000667 138 000675 140 000707 141 000752 143 000760 144 001003 147 001032 149 001057 150 001060 151 001070 153 001071 154 001115 156 001144 160 001171 ----------------------------------------------------------- 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