COMPILATION LISTING OF SEGMENT print_heals_message Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 09/27/84 0746.6 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* Coded by A. Downing July 1976. 7* Modified by A. Downing 02/07/77 to report un-implemented arguments. 8* print_heals_message is a utility for inspecting and/or modifying messages in 9* the perminent heals log */ 10 phm: print_heals_message: proc; 1 1 /* heals_arg_info.incl.pl1 contains the declaration 1 2* of the argument structure passed between heals releated utilities. 1 3* Created January 1976 by A. R. Downing */ 1 4 dcl 1 heals_arg_info aligned, 1 5 2 iocbp ptr, 1 6 2 report_iocbp ptr, 1 7 2 err_nb fixed bin (35), 1 8 2 info_selection bit (72) unal, 1 9 2 report_name char (64) varying, 1 10 2 heals_log_path_name char (168), /* path name of the heals log */ 1 11 2 system_id char (32) varying, 1 12 2 installation_id char (32) varying, 1 13 2 from_seq fixed bin (35), /* beginning seq_num */ 1 14 2 to_seq fixed bin (35), /* ending seq_num */ 1 15 2 from_time fixed bin (71), /* beginning of desired time period */ 1 16 2 to_time fixed bin (71); /* end of desired time period */ 1 17 /* end heals_arg_info. */ 11 2 1 /* begin heals_state.incl.pl1 */ 2 2 /* Produced March 1976 by A. Downing. */ 2 3 2 4 dcl 1 heals_state aligned based (heals_state_p), 2 5 2 last_message_time fixed bin (71), 2 6 2 last_message_seq_num fixed bin (35), 2 7 2 busy bit (36) aligned; 2 8 dcl heals_state_p ptr; 2 9 dcl heals_log_info$ ext static fixed bin (35) aligned dim (64000); 2 10 /* end heals_state.incl.pl1 */ 12 3 1 /* begin heals_message.incl.pl1 */ 3 2 /* Produced March 1976 by A. Downing. */ 3 3 dcl 1 heals_message based (heals_message_p) aligned, 3 4 2 tally fixed bin (35), 3 5 2 rest_of_record aligned, 3 6 3 seq_num fixed bin (35), /* Sequence number of this message. */ 3 7 3 time fixed bin (71) unal, /* Time message logged at */ 3 8 3 code fixed bin (11) unal, /* Syserr code associated with this message. */ 3 9 3 text_len fixed bin (11) unal, /* Length of message text in ASCII characters. */ 3 10 3 data_size fixed bin (11) unal, /* Size of binary data */ 3 11 3 data_code fixed bin (11) unal, /* format type code */ 3 12 3 pad bit (60) unal, 3 13 3 text char (0 refer (heals_message.text_len)), /* Text of expanded message - kept in ASCII. */ 3 14 3 data (0 refer (heals_message.data_size)) bit (36); /* Binary data area */ 3 15 dcl heals_message_p ptr; 3 16 /* end heals_message.incl.pl1 */ 13 14 dcl buffer char (2048) aligned; 15 dcl match_sw bit (1) init ("0"b); 16 dcl update_sw bit (1) init ("0"b); 17 dcl match_string char (64) varying init (""); 18 dcl mt fixed bin (71) init (0); 19 dcl m_time char (16) init (""); 20 dcl sn fixed bin (35) init (0); 21 dcl (div_part, remainder, skip) fixed bin; 22 dcl args fixed bin; 23 dcl arg char (arg_len) based (arg_p); 24 dcl arg_len fixed bin; 25 dcl arg_p ptr init (null ()); 26 dcl i fixed bin; 27 dcl act_len fixed bin (21); 28 dcl command char (16) varying init (""); 29 dcl code fixed bin (35); 30 dcl iocbp ptr init (null ()); 31 dcl hcs_$initiate entry (char (*), char (*), char (*), 32 fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 33 dcl cu_$arg_count entry returns (fixed bin); 34 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 35 dcl date_time_ entry (fixed bin (71), char (*)); 36 dcl convert_date_to_binary_ entry (char (*), fixed bin (71), fixed bin (35)); 37 dcl read_list_$prompt entry options (variable); 38 dcl (ioa_, com_err_) entry options (variable); 39 dcl (iox_$close, iox_$detach_iocb) entry (ptr, fixed bin (35)); 40 dcl iox_$read_record entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 41 dcl iox_$delete_record entry (ptr, fixed bin (35)); 42 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 43 dcl iox_$attach_ioname entry (char (*), ptr, char (*), fixed bin (35)); 44 dcl log_path char (168) ext static aligned init (">system_control_1>heals_dir>heals_log"); /* default log */ 45 dcl error_table_$end_of_info ext static fixed bin (35); 46 dcl error_table_$badopt ext static fixed bin (35); 47 dcl error_table_$noarg ext static fixed bin (35); 48 dcl error_table_$file_busy ext static fixed bin (35); 49 dcl cleanup condition; 50 51 heals_log_path_name = log_path; 52 i = index (reverse (heals_log_path_name), ">"); 53 i = length (heals_log_path_name) - i; 54 call hcs_$initiate 55 (substr (heals_log_path_name, 1, i), 56 "heals_log_info", "", 0, 0, heals_state_p, code); 57 args = cu_$arg_count (); 58 if args < 2 then do; 59 call com_err_ (error_table_$noarg, "print_heals_message", "at least two arguments are required."); 60 go to finished; 61 end; 62 i = 1; 63 do while (i <= args); 64 call cu_$arg_ptr (i, arg_p, arg_len, code); 65 if code ^= 0 then do; 66 call com_err_ (code, "print_heals_message"); 67 go to finished; 68 end; 69 if arg = "-seq_num" then do; 70 i = i + 1; 71 call cu_$arg_ptr (i, arg_p, arg_len, code); 72 if code ^= 0 then do; 73 call com_err_ (code, "print_heals_message"); 74 go to finished; 75 end; 76 sn = convert (sn, arg); 77 end; 78 else if arg = "-match" then do; 79 i = i + 1; 80 call cu_$arg_ptr (i, arg_p, arg_len, code); 81 if code ^= 0 then do; 82 call com_err_ (code, "print_heals_message"); 83 go to finished; 84 end; 85 match_string = arg; 86 match_sw = "1"b; 87 end; 88 else if arg = "-time" then do; 89 i = i + 1; 90 call cu_$arg_ptr (i, arg_p, arg_len, code); 91 if code ^= 0 then do; 92 call com_err_ (code, "print_heals_message"); 93 go to finished; 94 end; 95 call convert_date_to_binary_ (arg, mt, code); 96 if code ^= 0 then do; 97 call com_err_ (code, "print_heals_message", "error converting message time ^a", arg); 98 go to finished; 99 end; 100 end; 101 else if arg = "-update" then 102 update_sw = "1"b; 103 else do; 104 call com_err_ (error_table_$badopt, "print_heals_message", 105 "^a", arg); 106 go to finished; 107 end; 108 i = i + 1; 109 end; /* end of arg loop */ 110 heals_message_p = addr (buffer); 111 on cleanup call terminate; 112 if ^update_sw then 113 call iox_$attach_ioname ("heals_io", iocbp, 114 "vfile_ " || before (heals_log_path_name, " "), code); 115 else call iox_$attach_ioname ("heals_io", iocbp, 116 "vfile_ " || before (heals_log_path_name, " ") || 117 " -extend", code); 118 if code ^= 0 then do; 119 iox_error: 120 call com_err_ (code, "print_heals_message"); 121 go to finished; 122 end; 123 if ^update_sw then 124 call iox_$open (iocbp, 4 /* seq in */, "0"b, code); 125 else call iox_$open (iocbp, 10 /* keyed_seq update */, "0"b, code); 126 if code ^= 0 then go to iox_error; 127 128 call iox_$read_record (iocbp, heals_message_p, length (buffer), act_len, code); 129 if code ^= 0 then do; 130 read_error: 131 call com_err_ (code, "print_heals_message", "error reading from heals_log."); 132 go to iox_error; 133 end; 134 call read_log; /* get started with 1st msg */ 135 read_loop: do while ("1"b); 136 if heals_message.time >= mt then do; 137 do while (heals_message.seq_num < sn); 138 call read_log; 139 end; 140 if match_sw then 141 do while (index (heals_message.text, match_string) = 0); 142 call read_log; 143 end; 144 call date_time_ ((heals_message.time), m_time); 145 call ioa_ ("seq_num ^d at ^a tally of ^d; ^/text: ^a.", 146 heals_message.seq_num, m_time, heals_message.tally, heals_message.text); 147 if update_sw then 148 command_loop: do while ("1"b); 149 call get_command; 150 if command = "delete" then do; 151 call iox_$delete_record (iocbp, code); 152 if code ^= 0 then do; 153 call com_err_ (code, "print_heals_message", 154 "could not delete the record."); 155 go to finished; 156 end; 157 end; 158 else if command = "next" then go to next_msg; 159 else if command = "data" | 160 command = "display_data" then do; 161 div_part = divide (heals_message.data_size, 8, 17, 0); 162 remainder = mod (heals_message.data_size, 8); 163 skip = bin (remainder > 0, 17, 0); 164 call ioa_ ( 165 "octal data:^v(^/^w ^w ^w ^w ^w ^w ^w ^w^)^v(^/^)^v(^w ^)", 166 div_part, skip, remainder, heals_message.data); 167 end; 168 else if command = "quit" | 169 command = "q" | 170 command = "stop" | 171 command = "s" then 172 go to finished; 173 end command_loop; 174 end; 175 next_msg: 176 call read_log; 177 end read_loop; 178 179 finished: call terminate; 180 return; 181 182 terminate: proc; /* for preparing to return to command level */ 183 if iocbp ^= null () then 184 call iox_$close (iocbp, code); 185 if iocbp ^= null () then 186 call iox_$detach_iocb (iocbp, code); 187 iocbp = null (); 188 return; 189 end terminate; 190 191 read_log: proc; /* for getting heals_log messages */ 192 call iox_$read_record (iocbp, heals_message_p, length (buffer), act_len, code); 193 if code ^= 0 then 194 if code ^= error_table_$end_of_info then go to read_error; 195 else go to finished; 196 else; 197 return; 198 end read_log; 199 get_command: proc; 200 201 queery: 202 call read_list_$prompt ("enter command ", command); 203 if command ^= "delete" & 204 command ^= "next" & 205 command ^= "data" & 206 command ^= "display_data" & 207 command ^= "quit" & 208 command ^= "q" & 209 command ^= "s" & 210 command ^= "stop" then do; 211 bad_command: 212 call ioa_ ("^a is not a valid command.", command); 213 go to queery; 214 end; 215 return; 216 end get_command; 217 end print_heals_message; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/27/84 0745.3 print_heals_message.pl1 >spec>on>heals>print_heals_message.pl1 11 1 11/02/76 1752.0 heals_arg_info.incl.pl1 >ldd>include>heals_arg_info.incl.pl1 12 2 11/10/82 1749.8 heals_state.incl.pl1 >ldd>include>heals_state.incl.pl1 13 3 10/25/77 1258.3 heals_message.incl.pl1 >ldd>include>heals_message.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. act_len 001301 automatic fixed bin(21,0) dcl 27 set ref 128* 192* arg based char unaligned dcl 23 set ref 69 76 78 85 88 95* 97* 101 104* arg_len 001275 automatic fixed bin(17,0) dcl 24 set ref 64* 69 71* 76 78 80* 85 88 90* 95 95 97 97 101 104 104 arg_p 001276 automatic pointer initial dcl 25 set ref 25* 64* 69 71* 76 78 80* 85 88 90* 95 97 101 104 args 001274 automatic fixed bin(17,0) dcl 22 set ref 57* 58 63 buffer 000236 automatic char(2048) dcl 14 set ref 110 128 128 192 192 cleanup 001312 stack reference condition dcl 49 ref 111 code 001307 automatic fixed bin(35,0) dcl 29 set ref 54* 64* 65 66* 71* 72 73* 80* 81 82* 90* 91 92* 95* 96 97* 112* 115* 118 119* 123* 125* 126 128* 129 130* 151* 152 153* 183* 185* 192* 193 193 com_err_ 000026 constant entry external dcl 38 ref 59 66 73 82 92 97 104 119 130 153 command 001302 automatic varying char(16) initial dcl 28 set ref 28* 150 158 159 159 168 168 168 168 201* 203 203 203 203 203 203 203 203 211* convert_date_to_binary_ 000020 constant entry external dcl 36 ref 95 cu_$arg_count 000012 constant entry external dcl 33 ref 57 cu_$arg_ptr 000014 constant entry external dcl 34 ref 64 71 80 90 data based bit(36) array level 3 dcl 3-3 set ref 164* data_size 4(24) based fixed bin(11,0) level 3 packed unaligned dcl 3-3 ref 161 162 164 date_time_ 000016 constant entry external dcl 35 ref 144 div_part 001271 automatic fixed bin(17,0) dcl 21 set ref 161* 164* error_table_$badopt 000050 external static fixed bin(35,0) dcl 46 set ref 104* error_table_$end_of_info 000046 external static fixed bin(35,0) dcl 45 ref 193 error_table_$noarg 000052 external static fixed bin(35,0) dcl 47 set ref 59* hcs_$initiate 000010 constant entry external dcl 31 ref 54 heals_arg_info 000100 automatic structure level 1 dcl 1-4 heals_log_path_name 30 000100 automatic char(168) level 2 dcl 1-4 set ref 51* 52 53 54 54 112 115 heals_message based structure level 1 dcl 3-3 heals_message_p 000234 automatic pointer dcl 3-15 set ref 110* 128* 136 137 140 144 145 145 145 161 162 164 192* heals_state_p 000232 automatic pointer dcl 2-8 set ref 54* i 001300 automatic fixed bin(17,0) dcl 26 set ref 52* 53* 53 54 54 62* 63 64* 70* 70 71* 79* 79 80* 89* 89 90* 108* 108 ioa_ 000024 constant entry external dcl 38 ref 145 164 211 iocbp 001310 automatic pointer initial dcl 30 set ref 30* 112* 115* 123* 125* 128* 151* 183 183* 185 185* 187* 192* iox_$attach_ioname 000042 constant entry external dcl 43 ref 112 115 iox_$close 000030 constant entry external dcl 39 ref 183 iox_$delete_record 000036 constant entry external dcl 41 ref 151 iox_$detach_iocb 000032 constant entry external dcl 39 ref 185 iox_$open 000040 constant entry external dcl 42 ref 123 125 iox_$read_record 000034 constant entry external dcl 40 ref 128 192 log_path 000044 external static char(168) initial dcl 44 ref 51 m_time 001264 automatic char(16) initial unaligned dcl 19 set ref 19* 144* 145* match_string 001240 automatic varying char(64) initial dcl 17 set ref 17* 85* 140 match_sw 001236 automatic bit(1) initial unaligned dcl 15 set ref 15* 86* 140 mt 001262 automatic fixed bin(71,0) initial dcl 18 set ref 18* 95* 136 read_list_$prompt 000022 constant entry external dcl 37 ref 201 remainder 001272 automatic fixed bin(17,0) dcl 21 set ref 162* 163 164* rest_of_record 1 based structure level 2 dcl 3-3 seq_num 1 based fixed bin(35,0) level 3 dcl 3-3 set ref 137 145* skip 001273 automatic fixed bin(17,0) dcl 21 set ref 163* 164* sn 001270 automatic fixed bin(35,0) initial dcl 20 set ref 20* 76* 76 137 tally based fixed bin(35,0) level 2 dcl 3-3 set ref 145* text 7 based char level 3 dcl 3-3 set ref 140 145* text_len 4(12) based fixed bin(11,0) level 3 packed unaligned dcl 3-3 ref 140 145 145 164 time 2 based fixed bin(71,0) level 3 packed unaligned dcl 3-3 ref 136 144 update_sw 001237 automatic bit(1) initial unaligned dcl 16 set ref 16* 101* 112 123 147 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. error_table_$file_busy external static fixed bin(35,0) dcl 48 heals_log_info$ external static fixed bin(35,0) array dcl 2-9 heals_state based structure level 1 dcl 2-4 NAMES DECLARED BY EXPLICIT CONTEXT. bad_command 002071 constant label dcl 211 command_loop 001463 constant label dcl 147 finished 001672 constant label dcl 179 ref 60 67 74 83 93 98 106 121 155 168 195 get_command 001775 constant entry internal dcl 199 ref 149 iox_error 001177 constant label dcl 119 ref 126 132 next_msg 001670 constant label dcl 175 ref 158 phm 000231 constant entry external dcl 10 print_heals_message 000221 constant entry external dcl 10 queery 001776 constant label dcl 201 ref 213 read_error 001312 constant label dcl 130 ref 193 read_log 001744 constant entry internal dcl 191 ref 134 138 142 175 read_loop 001343 constant label dcl 135 terminate 001700 constant entry internal dcl 182 ref 111 179 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 110 before builtin function ref 112 115 bin builtin function ref 163 convert builtin function ref 76 divide builtin function ref 161 index builtin function ref 52 140 length builtin function ref 53 128 128 192 192 mod builtin function ref 162 null builtin function ref 25 30 183 185 187 reverse builtin function ref 52 substr builtin function ref 54 54 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2426 2502 2116 2436 Length 2766 2116 54 247 310 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME print_heals_message 996 external procedure is an external procedure. on unit on line 111 64 on unit terminate 70 internal procedure is called by several nonquick procedures. read_log internal procedure shares stack frame of external procedure print_heals_message. get_command internal procedure shares stack frame of external procedure print_heals_message. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME print_heals_message 000100 heals_arg_info print_heals_message 000232 heals_state_p print_heals_message 000234 heals_message_p print_heals_message 000236 buffer print_heals_message 001236 match_sw print_heals_message 001237 update_sw print_heals_message 001240 match_string print_heals_message 001262 mt print_heals_message 001264 m_time print_heals_message 001270 sn print_heals_message 001271 div_part print_heals_message 001272 remainder print_heals_message 001273 skip print_heals_message 001274 args print_heals_message 001275 arg_len print_heals_message 001276 arg_p print_heals_message 001300 i print_heals_message 001301 act_len print_heals_message 001302 command print_heals_message 001307 code print_heals_message 001310 iocbp print_heals_message THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_g_a alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return mod_fx1 enable shorten_stack ext_entry int_entry set_cs_eis index_cs_eis any_to_any_tr THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ convert_date_to_binary_ cu_$arg_count cu_$arg_ptr date_time_ hcs_$initiate ioa_ iox_$attach_ioname iox_$close iox_$delete_record iox_$detach_iocb iox_$open iox_$read_record read_list_$prompt THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$end_of_info error_table_$noarg log_path LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 15 000201 16 000202 17 000203 18 000204 19 000206 20 000211 25 000212 28 000214 30 000215 10 000220 51 000237 52 000244 53 000255 54 000257 57 000336 58 000346 59 000351 60 000400 62 000401 63 000403 64 000407 65 000424 66 000426 67 000446 69 000447 70 000455 71 000456 72 000473 73 000475 74 000515 76 000516 77 000526 78 000527 79 000533 80 000534 81 000551 82 000553 83 000573 85 000574 86 000605 87 000607 88 000610 89 000614 90 000615 91 000632 92 000634 93 000654 95 000655 96 000701 97 000703 98 000741 100 000742 101 000743 104 000752 106 001007 108 001010 109 001011 110 001012 111 001014 112 001036 115 001112 118 001174 119 001177 121 001217 123 001220 125 001244 126 001265 128 001267 129 001310 130 001312 132 001341 134 001342 135 001343 136 001344 137 001352 138 001356 139 001357 140 001360 142 001374 143 001375 144 001376 145 001417 147 001461 149 001464 150 001465 151 001472 152 001503 153 001505 155 001534 157 001535 158 001536 159 001543 161 001555 162 001564 163 001570 164 001573 167 001642 168 001643 173 001667 175 001670 177 001671 179 001672 180 001676 182 001677 183 001705 185 001722 187 001740 188 001743 191 001744 192 001745 193 001766 195 001773 197 001774 199 001775 201 001776 203 002021 211 002071 213 002111 215 002112 ----------------------------------------------------------- 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