COMPILATION LISTING OF SEGMENT display_mrds_open_dbs Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1012.9 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 20 display_mrds_open_dbs: dmod: procedure (); 21 22 /* DESCRIPTION: 23* 24* this routine is to be called from command level, to display on 25* the terminal the database pathnames and opening indexes for those 26* databases that are open by this process. the opening may have 27* been either a model or submodel openings, but must be a new 28* architecture(post MR6 style) database. 29* 30**/ 31 32 /* PARAMETERS: 33* 34* (input) none 35* 36* (output) a formatted list of database opening indexes, and the 37* model or submodel path of the opening. 38* 39* command_error - - (output) condition, signaled upon occurence of 40* an error 41* 42**/ 43 44 /* HISTORY: 45* 46* 79-07-01 Jim Gray: Initially written. 47* 48* 80-12-08 Rickie E. Brinegar: The display of the opening mode was 49* added. Also changed the call to ioa_ to take a conditional clause 50* in the ioa_ edit string rather than having an if-then-else in 51* pl1. 52* 53* 81-01-30 Jim Gray : changed underlying routine being used to 54* dsl_$list_openings to take advantage of better interface. 55* 56* 81-04-25 Jim Gray : changed based_area declaration to have it's 57* size depend on current value of mrds_data_$max_dbs, so that 58* changing it's value automatically changes the number of openings 59* allowed 60* 61**/ 62 63 /* initialize an area for the parameter structure, and establish a clean up handler */ 64 65 area_ptr = null (); 66 clean_up_condition = OFF; 67 on cleanup begin; 68 clean_up_condition = ON; 69 call clean_up (); 70 end; 71 72 call get_temp_segment_ (caller_name, area_ptr, error_code); 73 if error_code ^= 0 then 74 call com_err_ (error_code, caller_name, "^/^a", 75 "Unable to create a temporary segment for the list of open databases."); 76 else do; 77 78 based_area = empty (); /* initialize area */ 79 80 81 /* get the database list structure filled in */ 82 83 call mrds_dsl_db_openings$list_openings (area_ptr, mrds_database_openings_structure_version, 84 mrds_database_openings_ptr, error_code); 85 86 if error_code ^= 0 then 87 call com_err_ (error_code, caller_name, "^/^a", 88 "Unable to get the list of open databases."); 89 else do; 90 91 if mrds_database_openings.number_open = 0 then 92 call ioa_ ("^/No databases are currently open.^/"); 93 else do; 94 95 call ioa_ ("^/Open database^[ is^;s are^]:", (mrds_database_openings.number_open = 1)); 96 97 do i = 1 by 1 to mrds_database_openings.number_open; 98 99 call ioa_ ("^d^-^a^/^-^a", mrds_database_openings.db (i).index, 100 mrds_database_openings.db (i).path, 101 mrds_database_openings.db (i).mode); 102 103 end; 104 105 call ioa_ ("^/"); 106 end; 107 108 end; 109 110 end; 111 112 /* get rid of the temp segment */ 113 114 call clean_up (); 115 116 return; 117 118 clean_up: procedure (); 119 120 /* remove the temporary segment when done, or when cleanup signaled */ 121 122 if area_ptr = null () then ; 123 else do; 124 125 call release_temp_segment_ (caller_name, area_ptr, error_code); 126 area_ptr = null (); 127 if error_code = 0 | clean_up_condition then ; 128 else call com_err_ (error_code, caller_name, "^/^a", 129 "Unable to release the temporary segment used for the database list."); 130 131 end; 132 133 end; 134 135 dcl cleanup condition; /* signaled upon quit/release */ 136 dcl OFF bit (1) init ("0"b); /* false value */ 137 dcl ON bit (1) init ("1"b); /* true value */ 138 dcl area_ptr ptr; /* points to parameter area */ 139 dcl based_area area (60 * mrds_data_$max_dbs) based (area_ptr); /* parameter area */ 140 dcl com_err_ entry options (variable); /* reports errors */ 141 dcl clean_up_condition bit (1); /* on => cleanup signaled */ 142 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); /* gets temporary segments */ 143 dcl release_temp_segment_ entry (char (*), ptr, fixed bin (35)); /* deletes temporary segments */ 144 dcl error_code fixed bin (35); /* error status encoding */ 145 dcl caller_name char (21) init ("display_mrds_open_dbs"); /* name of calling routine */ 146 dcl mrds_dsl_db_openings$list_openings entry (ptr, fixed bin, ptr, fixed bin (35)); /* gets list of open dbs */ 147 dcl i fixed bin; /* loop control */ 148 dcl ioa_ entry options (variable); 149 dcl mrds_data_$max_dbs fixed bin (35) ext;/* max number of openings allowed */ 150 dcl empty builtin; 151 dcl null builtin; 152 1 1 /* BEGIN INCLUDE FILE mrds_database_openings.incl.pl1 - - Jim Gray July 1979 */ 1 2 1 3 /* DESCRIPTION: 1 4* 1 5* used by dsl_$list_openings to return an array of database opening information, 1 6* the mrds_databases opened for the calling process have their opening index 1 7* and opening model or submodel pathname returned in the array 1 8* 1 9**/ 1 10 1 11 /* HISTORY: 1 12* 80-12-08 Rickie E. Brinegar: added the opening mode to the structure. Taken 1 13* from mrds_database_list.incl.pl1 1 14* 1 15* 81-01-27 Jim Gray : changed name to mrds_database_openings in process of adding 1 16* structure version information, plus pad bits after extending info 1 17* to include whether opening was via a model or submodel. 1 18**/ 1 19 1 20 declare 1 mrds_database_openings aligned based (mrds_database_openings_ptr), /* array of paths/indexes */ 1 21 2 version fixed bin, /* the version number of this structure */ 1 22 2 number_open fixed bin, /* total open by this process */ 1 23 2 mbz1 bit (36) unal, 1 24 2 db (mrds_database_openings_num_open_init 1 25 refer (mrds_database_openings.number_open)), /* array of open db info */ 1 26 3 index fixed bin (35), /* database opening index */ 1 27 3 path char (168), /* model or submodel opening pathname */ 1 28 3 mode char (20), /* opening mode of the database */ 1 29 3 model bit (1) unal, /* on => opened via the model */ 1 30 3 submodel bit (1) unal, /* on => opened via a submodel */ 1 31 3 mbz2 bit (34) unal ; 1 32 1 33 declare mrds_database_openings_ptr ptr ; /* points to array of indexes/pathnames */ 1 34 1 35 declare mrds_database_openings_num_open_init fixed bin ; /* total number open by this process */ 1 36 1 37 declare mrds_database_openings_structure_version fixed bin int static options (constant) init (1) ; /* current version */ 1 38 1 39 /* END INCLUDE FILE mrds_database_openings.incl.pl1 */ 1 40 153 154 155 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.3 display_mrds_open_dbs.pl1 >special_ldd>online>mrds.pbf-04/18/85>display_mrds_open_dbs.pl1 153 1 10/14/83 1608.7 mrds_database_openings.incl.pl1 >ldd>include>mrds_database_openings.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. OFF 000106 automatic bit(1) initial unaligned dcl 136 set ref 66 136* ON 000107 automatic bit(1) initial unaligned dcl 137 set ref 68 137* area_ptr 000110 automatic pointer dcl 138 set ref 65* 72* 78 83* 122 125* 126* based_area based area dcl 139 set ref 78* caller_name 000114 automatic char(21) initial unaligned dcl 145 set ref 72* 73* 86* 125* 128* 145* clean_up_condition 000112 automatic bit(1) unaligned dcl 141 set ref 66* 68* 127 cleanup 000100 stack reference condition dcl 135 ref 67 com_err_ 000010 constant entry external dcl 140 ref 73 86 128 db 3 based structure array level 2 dcl 1-20 empty builtin function dcl 150 ref 78 error_code 000113 automatic fixed bin(35,0) dcl 144 set ref 72* 73 73* 83* 86 86* 125* 127 128* get_temp_segment_ 000012 constant entry external dcl 142 ref 72 i 000122 automatic fixed bin(17,0) dcl 147 set ref 97* 99 99 99* index 3 based fixed bin(35,0) array level 3 dcl 1-20 set ref 99* ioa_ 000020 constant entry external dcl 148 ref 91 95 99 105 mode 56 based char(20) array level 3 dcl 1-20 set ref 99* mrds_data_$max_dbs 000022 external static fixed bin(35,0) dcl 149 ref 78 mrds_database_openings based structure level 1 dcl 1-20 mrds_database_openings_ptr 000124 automatic pointer dcl 1-33 set ref 83* 91 95 97 99 99 99 mrds_database_openings_structure_version 000017 constant fixed bin(17,0) initial dcl 1-37 set ref 83* mrds_dsl_db_openings$list_openings 000016 constant entry external dcl 146 ref 83 null builtin function dcl 151 ref 65 122 126 number_open 1 based fixed bin(17,0) level 2 dcl 1-20 ref 91 95 97 path 4 based char(168) array level 3 dcl 1-20 set ref 99* release_temp_segment_ 000014 constant entry external dcl 143 ref 125 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. mrds_database_openings_num_open_init automatic fixed bin(17,0) dcl 1-35 NAMES DECLARED BY EXPLICIT CONTEXT. clean_up 000512 constant entry internal dcl 118 ref 69 114 display_mrds_open_dbs 000155 constant entry external dcl 20 dmod 000145 constant entry external dcl 20 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 742 766 610 752 Length 1200 610 24 175 131 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dmod 140 external procedure is an external procedure. on unit on line 67 64 on unit clean_up 116 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dmod 000106 OFF dmod 000107 ON dmod 000110 area_ptr dmod 000112 clean_up_condition dmod 000113 error_code dmod 000114 caller_name dmod 000122 i dmod 000124 mrds_database_openings_ptr dmod THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ get_temp_segment_ ioa_ mrds_dsl_db_openings$list_openings release_temp_segment_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_data_$max_dbs LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 136 000134 137 000135 145 000137 20 000144 65 000163 66 000165 67 000167 68 000203 69 000206 70 000213 72 000214 73 000235 78 000272 83 000277 86 000314 91 000351 95 000371 97 000414 99 000425 103 000467 105 000471 114 000504 116 000510 118 000511 122 000517 125 000525 126 000545 127 000550 128 000555 133 000607 ----------------------------------------------------------- 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