COMPILATION LISTING OF SEGMENT linus_input_query Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 0956.4 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* format: off */ 7 8 /* This is the main level procedure called by ssu_ to implement the 9* linus input_query request. Description and usage follows. 10* 11* Description: 12* 13* This request collects a user provided query and makes it available for 14* linus data manipulation requests. 15* 16* Usage: input_query {-control_args} 17* 18* USAGE (1): "input_query" or "input_query -terminal_input" 19* 20* The query is prompted for from user_input. It is terminated when the 21* user types "." on a line by itself, or types "\f" or "\q". "\f" means 22* enter qedx. 23* 24* The control args -brief and -long control the prompt string "Query:". 25* 26* USAGE (2): "input_query -input_file pathname.lquery" 27* or "input_query pathname.lquery" 28* 29* The query is read from the file named by pathname. 30* 31* The control arguments -force and -no_force can be provided with either 32* usage. -no_force is the default, and means the user should be queried 33* about replacing the existing linus query if there is one. 34* 35* Both parameters are passed to this request by ssu_. 36* 37* Known Bugs: 38* 39* Other Problems: 40* 41* History: 42* 43* Written - Al Dupuis - August 1983 44* 45**/ 46 47 linus_input_query: proc ( 48 49 sci_ptr_parm, /* input: ptr to the subsystem control info structure */ 50 lcb_ptr_parm /* input: ptr to the linus control block info structure */ 51 ); 52 53 dcl sci_ptr_parm ptr parm; 54 dcl lcb_ptr_parm ptr parm; 55 56 /* 57* Mainline Processing Overview: 58* 59* (1) Set defaults and process the arguments. 60* (2) Attach and open file if -input_file is used. 61* (3) Prompt before replacing existing query if -force isn't used. 62* (4) Initialize the query file. 63* (5) Get the query from the file or user. 64* (6) Enter qedx if user ended query with "\f". 65**/ 66 67 call initialize; 68 69 if ^terminal_input 70 then do; 71 cleanup_signalled = OFF; 72 on cleanup begin; 73 cleanup_signalled = ON; 74 call close_and_detach_input_file; 75 end; 76 call attach_and_open_input_file; 77 end; 78 79 if ^force 80 then do; 81 call prompt_user_for_replacing_query; 82 if ^user_wants_the_query_replaced 83 then return; 84 end; 85 86 call linus_query_mgr$initialize_query_file (lcb_ptr); 87 88 if terminal_input 89 then call get_query_from_user; 90 else call get_query_from_file; 91 92 if enter_the_editor 93 then call linus_qedx_the_query (lcb_ptr, OLD_QUERY); 94 95 return; 96 97 attach_and_open_input_file: proc; 98 99 attached = OFF; 100 opened = OFF; 101 call expand_pathname_$add_suffix (input_file_pathname, "lquery", 102 input_file_directory_name, input_file_entry_name, code); 103 if code ^= 0 104 then call ssu_$abort_line (sci_ptr, code, 105 "^/While trying to expand ^a.", rtrim (input_file_pathname)); 106 switch_name = unique_chars_ ("0"b) || "linus.input_query"; 107 108 call iox_$attach_name (switch_name, input_file_iocb_ptr, 109 "vfile_ " || rtrim (input_file_directory_name) || ">" 110 || rtrim (input_file_entry_name), null (), code); 111 if code ^= 0 112 then call ssu_$abort_line (sci_ptr, code, 113 "^/While trying to attach ^a in ^a.", 114 input_file_entry_name, input_file_directory_name); 115 else attached = ON; 116 117 call iox_$open (input_file_iocb_ptr, Stream_input, "0"b, code); 118 if code ^= 0 119 then call ssu_$abort_line (sci_ptr, code, 120 "^/While trying to open ^a in ^a.", 121 input_file_entry_name, input_file_directory_name); 122 else opened = ON; 123 124 return; 125 126 end attach_and_open_input_file; 127 128 close_and_detach_input_file: proc; 129 130 if opened 131 then do; 132 call iox_$close (input_file_iocb_ptr, code); 133 if code ^= 0 134 then if cleanup_signalled 135 then call ssu_$print_message (sci_ptr, code, 136 "^/While trying to close ^a.", input_file_pathname); 137 else call ssu_$abort_line (sci_ptr, code, 138 "^/While trying to close ^a.", input_file_pathname); 139 else opened = OFF; 140 end; 141 else; 142 143 if attached 144 then do; 145 call iox_$detach_iocb (input_file_iocb_ptr, code); 146 if code ^= 0 147 then if cleanup_signalled 148 then call ssu_$print_message (sci_ptr, code, 149 "^/While trying to detach ^p.", input_file_iocb_ptr); 150 else call ssu_$abort_line (sci_ptr, code, 151 "^/While trying to detach ^p.", input_file_iocb_ptr); 152 else do; 153 attached = OFF; 154 call iox_$destroy_iocb (input_file_iocb_ptr, code); 155 if code ^= 0 156 then if cleanup_signalled 157 then call ssu_$print_message (sci_ptr, code, 158 "^/While trying to destroy ^p.", input_file_iocb_ptr); 159 else call ssu_$abort_line (sci_ptr, code, 160 "^/While trying to destroy ^p.", input_file_iocb_ptr); 161 else; 162 end; 163 end; 164 165 return; 166 167 end close_and_detach_input_file; 168 169 get_query_from_file: proc; 170 171 still_writing_the_file = ON; 172 173 do loop = 1 to LARGEST_LILA_LINE_NUMBER while (still_writing_the_file); 174 call iox_$get_line (input_file_iocb_ptr, input_buffer_ptr, 175 INPUT_BUFFER_LENGTH, number_of_characters_read, code); 176 if code ^= 0 177 then if code ^= error_table_$end_of_info 178 then call ssu_$abort_line (sci_ptr, code, 179 "^/While reading a line from ^a in ^a.", 180 input_file_entry_name, input_file_directory_name); 181 else still_writing_the_file = OFF; 182 else call write_query_line_to_file (number_of_characters_read, loop); 183 end; 184 185 call close_and_detach_input_file; 186 187 return; 188 189 end get_query_from_file; 190 191 get_query_from_user: proc; 192 193 if ^brief 194 then call ioa_ ("Query:"); 195 still_collecting_lines = ON; 196 197 do loop = 1 to LARGEST_LILA_LINE_NUMBER while (still_collecting_lines); 198 there_is_a_line_to_write = ON; 199 call iox_$get_line (iox_$user_input, input_buffer_ptr, 200 INPUT_BUFFER_LENGTH, number_of_characters_read, code); 201 if code ^= 0 202 then call ssu_$abort_line (sci_ptr, code, 203 "^/While reading a query line from the terminal."); 204 if number_of_characters_read = 2 205 then if input_buffer_as_an_array (1) = "." 206 then do; 207 still_collecting_lines = OFF; 208 there_is_a_line_to_write = OFF; 209 end; 210 else; 211 else; 212 if still_collecting_lines 213 then if index (substr (input_buffer, 1, number_of_characters_read - 1), "\f") > 0 214 | index (substr (input_buffer, 1, number_of_characters_read - 1), "\q") > 0 215 then do; 216 still_collecting_lines = OFF; 217 if number_of_characters_read = 3 218 then do; 219 if input_buffer_as_an_array (number_of_characters_read - 1) = "f" 220 then enter_the_editor = ON; 221 else enter_the_editor = OFF; 222 there_is_a_line_to_write = OFF; 223 end; 224 else do; 225 input_buffer_as_an_array (number_of_characters_read - 2) = NEWLINE; 226 if input_buffer_as_an_array (number_of_characters_read - 1) = "f" 227 then enter_the_editor = ON; 228 else enter_the_editor = OFF; 229 number_of_characters_read = number_of_characters_read - 2; 230 end; 231 end; 232 else; 233 else; 234 if there_is_a_line_to_write 235 then call write_query_line_to_file (number_of_characters_read, loop); 236 end; 237 238 return; 239 240 end get_query_from_user; 241 242 initialize: proc; 243 244 sci_ptr = sci_ptr_parm; 245 lcb_ptr = lcb_ptr_parm; 246 247 if lcb.db_index = 0 248 then call ssu_$abort_line (sci_ptr, linus_error_$no_db); 249 250 force = OFF; 251 terminal_input = ON; 252 user_wants_the_query_replaced = OFF; 253 enter_the_editor = OFF; 254 brief = OFF; 255 256 input_buffer_ptr = addr (input_buffer); 257 258 call ssu_$arg_count (sci_ptr, number_of_args_supplied); 259 if number_of_args_supplied = 0 260 then return; 261 262 /* The first arg can be the pathname, let's see if it is. */ 263 264 call ssu_$arg_ptr (sci_ptr, 1, arg_ptr, arg_length); 265 if arg_length > 0 266 then if substr (arg, 1, 1) ^= "-" 267 then do; 268 terminal_input = OFF; 269 input_file_pathname = arg; 270 current_arg_number = 2; 271 if current_arg_number > number_of_args_supplied 272 then return; 273 else; 274 end; 275 else current_arg_number = 1; 276 else current_arg_number = 1; 277 278 still_processing_args = ON; 279 280 do while (still_processing_args); 281 call ssu_$arg_ptr (sci_ptr, current_arg_number, arg_ptr, arg_length); 282 current_arg_number = current_arg_number + 1; 283 if arg = "-force" | arg = "-fc" 284 then force = ON; 285 else if arg = "-no_force" | arg = "-nfc" 286 then force = OFF; 287 else if arg = "-terminal_input" | arg = "-ti" 288 then terminal_input = ON; 289 else if arg = "-input_file" | arg = "-if" 290 then do; 291 if current_arg_number > number_of_args_supplied 292 then call ssu_$abort_line (sci_ptr, error_table_$inconsistent, 293 "^/When -input_file is used it must be followed by a pathname."); 294 else call ssu_$arg_ptr (sci_ptr, current_arg_number, arg_ptr, arg_length); 295 input_file_pathname = arg; 296 terminal_input = OFF; 297 current_arg_number = current_arg_number + 1; 298 end; 299 else if arg = "-brief" | arg = "-bf" 300 then brief = ON; 301 else if arg = "-long" | arg = "-lg" 302 then brief = OFF; 303 else call ssu_$abort_line (sci_ptr, error_table_$badopt, 304 "^/Unrecognized control argument ^a.", arg); 305 if current_arg_number > number_of_args_supplied 306 then still_processing_args = OFF; 307 end; 308 309 return; 310 311 end initialize; 312 313 prompt_user_for_replacing_query: proc; 314 315 if lcb.liocb_ptr = null () 316 then user_wants_the_query_replaced = ON; 317 else if lcb.lila_count ^> 0 318 then user_wants_the_query_replaced = ON; 319 else call linus_query$yes_no (lcb_ptr, 320 user_wants_the_query_replaced, DO_YOU_WANT_TO_REPLACE_THE_EXISTING_QUERY); 321 322 return; 323 324 end prompt_user_for_replacing_query; 325 326 write_query_line_to_file: proc ( 327 328 wqltf_number_of_chars_to_write_parm, /* input: # of chars to write */ 329 wqltf_record_key_parm /* input: key for record */ 330 ); 331 332 dcl wqltf_number_of_chars_to_write_parm fixed bin (21) parm; 333 dcl wqltf_record_key_parm fixed bin parm; 334 dcl wqltf_record char (wqltf_number_of_chars_to_write_parm) based (input_buffer_ptr); 335 336 call linus_query_mgr$write_line (lcb_ptr, wqltf_record_key_parm, 337 wqltf_record, code); 338 if code ^= 0 339 then call ssu_$abort_line (sci_ptr, code, 340 "^/While trying to write the record ^/^a", wqltf_record); 341 else; 342 343 return; 344 345 end write_query_line_to_file; 346 347 dcl DO_YOU_WANT_TO_REPLACE_THE_EXISTING_QUERY char (51) varying static internal options (constant) init ( 348 "A query already exists, do you wish to replace it? "); 349 350 dcl INPUT_BUFFER_LENGTH fixed bin (21) static internal options (constant) init (4096); 351 352 dcl LARGEST_LILA_LINE_NUMBER fixed bin (17) static internal options (constant) init (9999); 353 354 dcl NEWLINE char (1) static internal options (constant) init (" 355 "); 356 357 dcl OFF bit (1) aligned static internal options (constant) init ("0"b); 358 dcl OLD_QUERY bit (1) aligned static internal options (constant) init ("0"b); 359 dcl ON bit (1) aligned static internal options (constant) init ("1"b); 360 361 dcl addr builtin; 362 dcl arg char (arg_length) based (arg_ptr); 363 dcl arg_length fixed bin (21); 364 dcl arg_ptr ptr; 365 dcl attached bit (1) aligned; 366 367 dcl brief bit (1) aligned; 368 369 dcl cleanup condition; 370 dcl cleanup_signalled bit (1) aligned; 371 dcl code fixed bin (35); 372 dcl current_arg_number fixed bin; 373 374 dcl enter_the_editor bit (1) aligned; 375 dcl error_table_$badopt fixed bin(35) ext static; 376 dcl error_table_$end_of_info fixed bin(35) ext static; 377 dcl error_table_$inconsistent fixed bin(35) ext static; 378 dcl expand_pathname_$add_suffix entry (char(*), char(*), char(*), char(*), fixed bin(35)); 379 380 dcl fixed builtin; 381 dcl force bit (1) aligned; 382 383 dcl index builtin; 384 dcl input_buffer char (INPUT_BUFFER_LENGTH); 385 dcl input_buffer_as_an_array (INPUT_BUFFER_LENGTH) char (1) based (addr (input_buffer)); 386 dcl input_buffer_ptr ptr; 387 dcl input_file_directory_name char (168); 388 dcl input_file_entry_name char (32); 389 dcl input_file_iocb_ptr ptr; 390 dcl input_file_pathname char (168); 391 dcl ioa_ entry() options(variable); 392 393 dcl linus_error_$no_db fixed bin(35) ext static; 394 dcl linus_query_mgr$initialize_query_file entry (ptr); 395 dcl linus_query_mgr$write_line entry (ptr, fixed bin, char(*), fixed bin(35)); 396 dcl linus_qedx_the_query entry (ptr, bit(1) aligned); 397 dcl linus_query$yes_no entry (ptr, bit(1) aligned, char(*) var); 398 dcl loop fixed bin; 399 400 dcl null builtin; 401 dcl number_of_args_supplied fixed bin; 402 dcl number_of_characters_read fixed bin (21); 403 404 dcl opened bit (1) aligned; 405 406 dcl rel builtin; 407 dcl rtrim builtin; 408 409 dcl sci_ptr ptr; 410 dcl ssu_$abort_line entry() options(variable); 411 dcl ssu_$arg_count entry (ptr, fixed bin); 412 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin(21)); 413 dcl ssu_$print_message entry() options(variable); 414 dcl still_collecting_lines bit (1) aligned; 415 dcl still_processing_args bit (1) aligned; 416 dcl still_writing_the_file bit (1) aligned; 417 dcl substr builtin; 418 dcl sys_info$max_seg_size fixed bin(35) ext static; 419 dcl switch_name char (32); 420 421 dcl terminal_input bit (1) aligned; 422 dcl there_is_a_line_to_write bit (1) aligned; 423 424 dcl unique_chars_ entry (bit(*)) returns(char(15)); 425 dcl user_wants_the_query_replaced bit (1) aligned; 426 1 1 /* Begin include file ..... iox_modes.incl.pl1 */ 1 2 1 3 /* Written by C. D. Tavares, 03/17/75 */ 1 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 1 5 1 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 1 7 ("stream_input", "stream_output", "stream_input_output", 1 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 1 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 1 10 "direct_input", "direct_output", "direct_update"); 1 11 1 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 1 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 1 14 1 15 dcl (Stream_input initial (1), 1 16 Stream_output initial (2), 1 17 Stream_input_output initial (3), 1 18 Sequential_input initial (4), 1 19 Sequential_output initial (5), 1 20 Sequential_input_output initial (6), 1 21 Sequential_update initial (7), 1 22 Keyed_sequential_input initial (8), 1 23 Keyed_sequential_output initial (9), 1 24 Keyed_sequential_update initial (10), 1 25 Direct_input initial (11), 1 26 Direct_output initial (12), 1 27 Direct_update initial (13)) fixed bin int static options (constant); 1 28 1 29 /* End include file ..... iox_modes.incl.pl1 */ 427 428 2 1 /* --------------- BEGIN include file iox_dcls.incl.pl1 --------------- */ 2 2 2 3 /* Written 05/04/78 by C. D. Tavares */ 2 4 /* Fixed declaration of iox_$find_iocb_n 05/07/80 by R. Holmstedt */ 2 5 /* Modified 5/83 by S. Krupp to add declarations for: iox_$open_file, 2 6* iox_$close_file, iox_$detach and iox_$attach_loud entries. */ 2 7 2 8 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)), 2 9 iox_$attach_ptr entry (pointer, char (*), pointer, fixed bin (35)), 2 10 iox_$close entry (pointer, fixed bin (35)), 2 11 iox_$control entry (pointer, char (*), pointer, fixed bin (35)), 2 12 iox_$delete_record entry (pointer, fixed bin (35)), 2 13 iox_$destroy_iocb entry (pointer, fixed bin (35)), 2 14 iox_$detach_iocb entry (pointer, fixed bin (35)), 2 15 iox_$err_not_attached entry options (variable), 2 16 iox_$err_not_closed entry options (variable), 2 17 iox_$err_no_operation entry options (variable), 2 18 iox_$err_not_open entry options (variable), 2 19 iox_$find_iocb entry (char (*), pointer, fixed bin (35)), 2 20 iox_$find_iocb_n entry (fixed bin, ptr, fixed bin(35)), 2 21 iox_$get_chars entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 22 iox_$get_line entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 23 iox_$look_iocb entry (char (*), pointer, fixed bin (35)), 2 24 iox_$modes entry (pointer, char (*), char (*), fixed bin (35)), 2 25 iox_$move_attach entry (pointer, pointer, fixed bin (35)), 2 26 iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 2 27 iox_$position entry (pointer, fixed bin, fixed bin (21), fixed bin (35)), 2 28 iox_$propagate entry (pointer), 2 29 iox_$put_chars entry (pointer, pointer, fixed bin (21), fixed bin (35)), 2 30 iox_$read_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 2 31 iox_$read_length entry (pointer, fixed bin (21), fixed bin (35)), 2 32 iox_$read_record entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 33 iox_$rewrite_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 2 34 iox_$seek_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 2 35 iox_$write_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 2 36 iox_$open_file entry(ptr, fixed bin, char(*), bit(1) aligned, fixed bin(35)), 2 37 iox_$close_file entry(ptr, char(*), fixed bin(35)), 2 38 iox_$detach entry(ptr, char(*), fixed bin(35)), 2 39 iox_$attach_loud entry(ptr, char(*), ptr, fixed bin(35)); 2 40 2 41 dcl (iox_$user_output, 2 42 iox_$user_input, 2 43 iox_$user_io, 2 44 iox_$error_output) external static pointer; 2 45 2 46 /* ---------------- END include file iox_dcls.incl.pl1 ---------------- */ 429 430 3 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 3 2 3 3 3 4 3 5 /****^ HISTORY COMMENTS: 3 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 3 7* install(86-07-29,MR12.0-1106): 3 8* Added general_work_area_ptr and renamed sfr_ptr to 3 9* force_retrieve_scope_ptr. 3 10* END HISTORY COMMENTS */ 3 11 3 12 3 13 /* HISTORY: 3 14* 3 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 3 16* 3 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 3 18* a part of the attribute level control work. 3 19* 3 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 3 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 3 22* scope information. 3 23* 3 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 3 25* retaining various vcpu times to be collected when in timing mode. The 3 26* times to be collected are: LINUS parsing time, LINUS processing time, and 3 27* MRDS processing time. 3 28* 3 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 3 30* part of the line numbering implementation. This allows for possible later 3 31* LINUS control of the build defaults. 3 32* 3 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 3 34* information is now retained by ssu_. Removed parse_timer as no longer 3 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 3 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 3 37* 3 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 3 39* subsystem_invocation_level, and selection_expression_identifier. 3 40* 3 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 3 42* table_control_info_ptr. 3 43* 3 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 3 45* 3 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 3 47* 3 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 3 49* 3 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 3 51**/ 3 52 3 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 3 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 3 55 2 rb_len fixed bin (21), /* length of request buffer */ 3 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 3 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 3 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 3 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 3 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 3 61 2 test_flag bit (1) unal, /* on if in test mode */ 3 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 3 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 3 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 3 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 3 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 3 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 3 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 3 69 2 reserved bit (27) unal, 3 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 3 71 2 rb_ptr ptr, /* ptr to request buffer */ 3 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 3 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 3 74 2 ttn_ptr ptr, /* pointer to table info structure */ 3 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 3 76 2 lv_ptr ptr, /* pointer linus variables */ 3 77 2 si_ptr ptr, /* pointer to select_info structure */ 3 78 2 setfi_ptr ptr, /* pointer to set function information */ 3 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 3 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 3 81 2 lit_ptr ptr, /* pointer to literal pool */ 3 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 3 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 3 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 3 85* (MR7.0) */ 3 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 3 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 3 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 3 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 3 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 3 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 3 92* for current lila expression */ 3 93 2 unused_timer float bin (63), /* future expansion */ 3 94 2 request_time float bin (63), /* How much request time was spent 3 95* in LINUS. (-1 = user has just enabled 3 96* timing, do not report) */ 3 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 3 98 2 build_increment fixed bin, /* default increment for build mode */ 3 99 2 build_start fixed bin, /* default start count for build mode */ 3 100 2 linus_version char (4), /* current version of LINUS */ 3 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 3 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 3 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 3 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 3 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 3 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 3 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 3 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 3 109 2 word_pad (6) bit (36) unal, 3 110 /* procedures that will be optionally */ 3 111 /* replaced by the user. Saved so they */ 3 112 /* can be reinstated if desired. */ 3 113 2 ssu_abort_line entry options (variable), 3 114 2 ssu_post_request_line variable entry (ptr), 3 115 2 ssu_pre_request_line variable entry (ptr), 3 116 3 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 3 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 3 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 3 120 3 121 dcl lcb_ptr ptr; 3 122 3 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 431 432 433 end linus_input_query; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.6 linus_input_query.pl1 >special_ldd>install>MR12.0-1106>linus_input_query.pl1 427 1 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 429 2 05/23/83 0916.6 iox_dcls.incl.pl1 >ldd>include>iox_dcls.incl.pl1 431 3 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.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. DO_YOU_WANT_TO_REPLACE_THE_EXISTING_QUERY 000001 constant varying char(51) initial dcl 347 set ref 319* INPUT_BUFFER_LENGTH 000000 constant fixed bin(21,0) initial dcl 350 set ref 174* 199* 384 LARGEST_LILA_LINE_NUMBER constant fixed bin(17,0) initial dcl 352 ref 173 197 NEWLINE constant char(1) initial unaligned dcl 354 ref 225 OFF constant bit(1) initial dcl 357 ref 71 99 100 139 153 181 207 208 216 221 222 228 250 252 253 254 268 285 296 301 305 OLD_QUERY 000045 constant bit(1) initial dcl 358 set ref 92* ON constant bit(1) initial dcl 359 ref 73 115 122 171 195 198 219 226 251 278 283 287 299 315 317 Stream_input 000053 constant fixed bin(17,0) initial dcl 1-15 set ref 117* addr builtin function dcl 361 ref 204 219 225 226 256 arg based char unaligned dcl 362 set ref 265 269 283 283 285 285 287 287 289 289 295 299 299 301 301 303* arg_length 000100 automatic fixed bin(21,0) dcl 363 set ref 264* 265 265 269 281* 283 283 285 285 287 287 289 289 294* 295 299 299 301 301 303 303 arg_ptr 000102 automatic pointer dcl 364 set ref 264* 265 269 281* 283 283 285 285 287 287 289 289 294* 295 299 299 301 301 303 attached 000104 automatic bit(1) dcl 365 set ref 99* 115* 143 153* brief 000105 automatic bit(1) dcl 367 set ref 193 254* 299* 301* cleanup 000106 stack reference condition dcl 369 ref 72 cleanup_signalled 000114 automatic bit(1) dcl 370 set ref 71* 73* 133 146 155 code 000115 automatic fixed bin(35,0) dcl 371 set ref 101* 103 103* 108* 111 111* 117* 118 118* 132* 133 133* 137* 145* 146 146* 150* 154* 155 155* 159* 174* 176 176 176* 199* 201 201* 336* 338 338* current_arg_number 000116 automatic fixed bin(17,0) dcl 372 set ref 270* 271 275* 276* 281* 282* 282 291 294* 297* 297 305 db_index based fixed bin(35,0) level 2 dcl 3-53 ref 247 enter_the_editor 000117 automatic bit(1) dcl 374 set ref 92 219* 221* 226* 228* 253* error_table_$badopt 000010 external static fixed bin(35,0) dcl 375 set ref 303* error_table_$end_of_info 000012 external static fixed bin(35,0) dcl 376 ref 176 error_table_$inconsistent 000014 external static fixed bin(35,0) dcl 377 set ref 291* expand_pathname_$add_suffix 000016 constant entry external dcl 378 ref 101 force 000120 automatic bit(1) dcl 381 set ref 79 250* 283* 285* index builtin function dcl 383 ref 212 212 input_buffer 000121 automatic char unaligned dcl 384 set ref 204 212 212 219 225 226 256 input_buffer_as_an_array based char(1) array unaligned dcl 385 set ref 204 219 225* 226 input_buffer_ptr 000122 automatic pointer dcl 386 set ref 174* 199* 256* 336 338 input_file_directory_name 000124 automatic char(168) unaligned dcl 387 set ref 101* 108 111* 118* 176* input_file_entry_name 000176 automatic char(32) unaligned dcl 388 set ref 101* 108 111* 118* 176* input_file_iocb_ptr 000206 automatic pointer dcl 389 set ref 108* 117* 132* 145* 146* 150* 154* 155* 159* 174* input_file_pathname 000210 automatic char(168) unaligned dcl 390 set ref 101* 103 103 133* 137* 269* 295* ioa_ 000020 constant entry external dcl 391 ref 193 iox_$attach_name 000046 constant entry external dcl 2-8 ref 108 iox_$close 000050 constant entry external dcl 2-8 ref 132 iox_$destroy_iocb 000052 constant entry external dcl 2-8 ref 154 iox_$detach_iocb 000054 constant entry external dcl 2-8 ref 145 iox_$get_line 000056 constant entry external dcl 2-8 ref 174 199 iox_$open 000060 constant entry external dcl 2-8 ref 117 iox_$user_input 000062 external static pointer dcl 2-41 set ref 199* lcb based structure level 1 dcl 3-53 lcb_ptr 000306 automatic pointer dcl 3-121 set ref 86* 92* 245* 247 315 317 319* 336* lcb_ptr_parm parameter pointer dcl 54 ref 47 245 lila_count 2 based fixed bin(35,0) level 2 dcl 3-53 ref 317 linus_error_$no_db 000022 external static fixed bin(35,0) dcl 393 set ref 247* linus_qedx_the_query 000030 constant entry external dcl 396 ref 92 linus_query$yes_no 000032 constant entry external dcl 397 ref 319 linus_query_mgr$initialize_query_file 000024 constant entry external dcl 394 ref 86 linus_query_mgr$write_line 000026 constant entry external dcl 395 ref 336 liocb_ptr 16 based pointer level 2 dcl 3-53 ref 315 loop 000262 automatic fixed bin(17,0) dcl 398 set ref 173* 182* 197* 234* null builtin function dcl 400 ref 108 108 315 number_of_args_supplied 000263 automatic fixed bin(17,0) dcl 401 set ref 258* 259 271 291 305 number_of_characters_read 000264 automatic fixed bin(21,0) dcl 402 set ref 174* 182* 199* 204 212 212 217 219 225 226 229* 229 234* opened 000265 automatic bit(1) dcl 404 set ref 100* 122* 130 139* rtrim builtin function dcl 407 ref 103 103 108 108 sci_ptr 000266 automatic pointer dcl 409 set ref 103* 111* 118* 133* 137* 146* 150* 155* 159* 176* 201* 244* 247* 258* 264* 281* 291* 294* 303* 338* sci_ptr_parm parameter pointer dcl 53 ref 47 244 ssu_$abort_line 000034 constant entry external dcl 410 ref 103 111 118 137 150 159 176 201 247 291 303 338 ssu_$arg_count 000036 constant entry external dcl 411 ref 258 ssu_$arg_ptr 000040 constant entry external dcl 412 ref 264 281 294 ssu_$print_message 000042 constant entry external dcl 413 ref 133 146 155 still_collecting_lines 000270 automatic bit(1) dcl 414 set ref 195* 197 207* 212 216* still_processing_args 000271 automatic bit(1) dcl 415 set ref 278* 280 305* still_writing_the_file 000272 automatic bit(1) dcl 416 set ref 171* 173 181* substr builtin function dcl 417 ref 212 212 265 switch_name 000273 automatic char(32) unaligned dcl 419 set ref 106* 108* terminal_input 000303 automatic bit(1) dcl 421 set ref 69 88 251* 268* 287* 296* there_is_a_line_to_write 000304 automatic bit(1) dcl 422 set ref 198* 208* 222* 234 unique_chars_ 000044 constant entry external dcl 424 ref 106 user_wants_the_query_replaced 000305 automatic bit(1) dcl 425 set ref 82 252* 315* 317* 319* wqltf_number_of_chars_to_write_parm parameter fixed bin(21,0) dcl 332 ref 326 336 336 338 338 wqltf_record based char unaligned dcl 334 set ref 336* 338* wqltf_record_key_parm parameter fixed bin(17,0) dcl 333 set ref 326 336* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 1-15 Direct_output internal static fixed bin(17,0) initial dcl 1-15 Direct_update internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 1-15 Sequential_input internal static fixed bin(17,0) initial dcl 1-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 1-15 Sequential_output internal static fixed bin(17,0) initial dcl 1-15 Sequential_update internal static fixed bin(17,0) initial dcl 1-15 Stream_input_output internal static fixed bin(17,0) initial dcl 1-15 Stream_output internal static fixed bin(17,0) initial dcl 1-15 fixed builtin function dcl 380 iox_$attach_loud 000000 constant entry external dcl 2-8 iox_$attach_ptr 000000 constant entry external dcl 2-8 iox_$close_file 000000 constant entry external dcl 2-8 iox_$control 000000 constant entry external dcl 2-8 iox_$delete_record 000000 constant entry external dcl 2-8 iox_$detach 000000 constant entry external dcl 2-8 iox_$err_no_operation 000000 constant entry external dcl 2-8 iox_$err_not_attached 000000 constant entry external dcl 2-8 iox_$err_not_closed 000000 constant entry external dcl 2-8 iox_$err_not_open 000000 constant entry external dcl 2-8 iox_$error_output external static pointer dcl 2-41 iox_$find_iocb 000000 constant entry external dcl 2-8 iox_$find_iocb_n 000000 constant entry external dcl 2-8 iox_$get_chars 000000 constant entry external dcl 2-8 iox_$look_iocb 000000 constant entry external dcl 2-8 iox_$modes 000000 constant entry external dcl 2-8 iox_$move_attach 000000 constant entry external dcl 2-8 iox_$open_file 000000 constant entry external dcl 2-8 iox_$position 000000 constant entry external dcl 2-8 iox_$propagate 000000 constant entry external dcl 2-8 iox_$put_chars 000000 constant entry external dcl 2-8 iox_$read_key 000000 constant entry external dcl 2-8 iox_$read_length 000000 constant entry external dcl 2-8 iox_$read_record 000000 constant entry external dcl 2-8 iox_$rewrite_record 000000 constant entry external dcl 2-8 iox_$seek_key 000000 constant entry external dcl 2-8 iox_$user_io external static pointer dcl 2-41 iox_$user_output external static pointer dcl 2-41 iox_$write_record 000000 constant entry external dcl 2-8 iox_modes internal static char(24) initial array dcl 1-6 rel builtin function dcl 406 short_iox_modes internal static char(4) initial array dcl 1-12 sys_info$max_seg_size external static fixed bin(35,0) dcl 418 NAMES DECLARED BY EXPLICIT CONTEXT. attach_and_open_input_file 000374 constant entry internal dcl 97 ref 76 close_and_detach_input_file 000770 constant entry internal dcl 128 ref 74 185 get_query_from_file 001300 constant entry internal dcl 169 ref 90 get_query_from_user 001410 constant entry internal dcl 191 ref 88 initialize 001614 constant entry internal dcl 242 ref 67 linus_input_query 000270 constant entry external dcl 47 prompt_user_for_replacing_query 002173 constant entry internal dcl 313 ref 81 write_query_line_to_file 002233 constant entry internal dcl 326 ref 182 234 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2644 2730 2337 2654 Length 3226 2337 64 262 305 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_input_query 484 external procedure is an external procedure. on unit on line 72 64 on unit attach_and_open_input_file internal procedure shares stack frame of external procedure linus_input_query. close_and_detach_input_file 114 internal procedure is called by several nonquick procedures. get_query_from_file internal procedure shares stack frame of external procedure linus_input_query. get_query_from_user internal procedure shares stack frame of external procedure linus_input_query. initialize internal procedure shares stack frame of external procedure linus_input_query. prompt_user_for_replacing_query internal procedure shares stack frame of external procedure linus_input_query. write_query_line_to_file internal procedure shares stack frame of external procedure linus_input_query. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_input_query 000100 arg_length linus_input_query 000102 arg_ptr linus_input_query 000104 attached linus_input_query 000105 brief linus_input_query 000114 cleanup_signalled linus_input_query 000115 code linus_input_query 000116 current_arg_number linus_input_query 000117 enter_the_editor linus_input_query 000120 force linus_input_query 000121 input_buffer linus_input_query 000122 input_buffer_ptr linus_input_query 000124 input_file_directory_name linus_input_query 000176 input_file_entry_name linus_input_query 000206 input_file_iocb_ptr linus_input_query 000210 input_file_pathname linus_input_query 000262 loop linus_input_query 000263 number_of_args_supplied linus_input_query 000264 number_of_characters_read linus_input_query 000265 opened linus_input_query 000266 sci_ptr linus_input_query 000270 still_collecting_lines linus_input_query 000271 still_processing_args linus_input_query 000272 still_writing_the_file linus_input_query 000273 switch_name linus_input_query 000303 terminal_input linus_input_query 000304 there_is_a_line_to_write linus_input_query 000305 user_wants_the_query_replaced linus_input_query 000306 lcb_ptr linus_input_query THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return alloc_auto_adj enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. expand_pathname_$add_suffix ioa_ iox_$attach_name iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$get_line iox_$open linus_qedx_the_query linus_query$yes_no linus_query_mgr$initialize_query_file linus_query_mgr$write_line ssu_$abort_line ssu_$arg_count ssu_$arg_ptr ssu_$print_message unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$end_of_info error_table_$inconsistent iox_$user_input linus_error_$no_db LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 47 000264 384 000275 67 000304 69 000305 71 000307 72 000310 73 000324 74 000327 75 000334 76 000335 79 000336 81 000340 82 000341 86 000344 88 000353 90 000357 92 000360 95 000373 97 000374 99 000375 100 000376 101 000377 103 000431 106 000503 108 000531 111 000644 115 000704 117 000706 118 000725 122 000764 124 000766 128 000767 130 000775 132 001000 133 001010 137 001046 139 001077 143 001100 145 001103 146 001114 150 001151 153 001201 154 001202 155 001213 159 001250 165 001277 169 001300 171 001301 173 001303 174 001315 176 001334 181 001375 182 001377 183 001401 185 001403 187 001407 191 001410 193 001411 195 001426 197 001430 198 001441 199 001443 201 001462 204 001510 207 001517 208 001520 212 001521 216 001552 217 001553 219 001556 221 001565 222 001566 223 001567 225 001570 226 001573 228 001602 229 001603 234 001605 236 001611 238 001613 242 001614 244 001615 245 001621 247 001624 250 001643 251 001644 252 001646 253 001647 254 001650 256 001651 258 001653 259 001664 264 001667 265 001706 268 001715 269 001716 270 001721 271 001723 274 001726 275 001727 276 001732 278 001734 280 001736 281 001740 282 001755 283 001756 285 001773 287 002005 289 002020 291 002030 294 002060 295 002075 296 002102 297 002103 298 002104 299 002105 301 002120 303 002132 305 002165 307 002171 309 002172 313 002173 315 002174 317 002204 319 002211 322 002232 326 002233 336 002235 338 002266 343 002324 ----------------------------------------------------------- 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