COMPILATION LISTING OF SEGMENT vfile_attach Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx, AZ, Sys-M Compiled on: 09/10/87 1506.6 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(87-07-01,GWMay), approve(87-07-01,MCR7730), audit(87-08-10,JRGray), 17* install(87-09-10,MR12.1-1104): 18* Added the -truncate, -tc argument so that the -extend arg can be 19* overriden. 20* END HISTORY COMMENTS */ 21 22 23 /* format: style2,ind3 */ 24 vfile_attach: 25 proc (iocb_ptr_arg, option_array, command_switch, code); 26 27 /* Modified: 28*04/05/82 by Lindsey Spratt: Changed to correctly report the blocking value, 29* the wait-time for the share option, and the identifier for the 30* unstructured header. If more than one of these was present in the 31* attach options, the values for all of them would be reported as 32* being the same as the value for the last one given. Also, changed 33* "-exclu" to "-exclusive" in the attach description, as -exclu is 34* not a valid attach option. 35**/ 36 /* Declarations and general comments are at the end 37* of the program. */ 38 39 iocb_ptr = iocb_ptr_arg; 40 call verify_and_interpret_args; 41 if trans_opt & (code = 0) /* -transaction attachment */ 42 then 43 do; 44 call iox_$look_iocb ((tcf_name), tcf_ptr, code); 45 if code = 0 46 then if tcf_ptr -> iocb.actual_iocb_ptr -> iocb.attach_descrip_ptr ^= null 47 then if index (tcf_ptr -> iocb.actual_iocb_ptr -> iocb.attach_descrip_ptr -> attach_descrip_string, 48 "-stationary") ^= 0 49 then 50 do; /* complain */ 51 code = error_table_$incompatible_attach; 52 call sub_err_ (code, "vfile_", "c", null, 53 "The tcf switch must not be attached with the -stationary option."); 54 end; 55 end; 56 if code = 0 57 then call create_attach_block; 58 if code = 0 59 then 60 do; /* set pointers, entries in iocb */ 61 attach_data_ptr = attach_block_ptr; 62 attach_descrip_ptr = addr (attach_descrip); 63 open = open_file; 64 control = control_file; /* file_status supported with switch closed */ 65 detach_iocb = detach_file; 66 call iox_$propagate (iocb_ptr); 67 end; 68 else if command_switch 69 then call com_err_ (code, "vfile_", "^a", name); 70 return; 71 72 verify_and_interpret_args: 73 proc; 74 if attach_descrip_ptr ^= null 75 then code = error_table_$not_detached; 76 else if length (option_array (1)) > 168 77 then code = error_table_$pathlong; 78 else 79 do; 80 code = 0; 81 n_opts = hbound (option_array, 1); 82 if n_opts > 10 83 then code = error_table_$bad_arg; 84 else 85 do i = 2 to n_opts while (code = 0); 86 if option_array (i) = "-extend" 87 then extend_attach_option = "1"b; 88 else if option_array (i) = "-truncate" | option_array (i) = "-tc" 89 then extend_attach_option = "0"b; 90 91 else if option_array (i) = "-share" 92 then 93 do; /* pick up wait_time */ 94 shared_option = "1"b; 95 call get_n_opt (wait_time_option); /* pick up number */ 96 if wait_time_option < -1 97 then code = error_table_$bad_arg; 98 end; 99 else if option_array (i) = "-blocked" /* blocked file */ 100 then 101 do; /* pick up max_rec_len if given */ 102 blocked_option = "1"b; 103 call get_n_opt (max_recl); /* get optional number */ 104 if max_recl < 0 105 then code = error_table_$negative_nelem; 106 end; 107 else if option_array (i) = "-append" 108 then append_option = "1"b; 109 else if option_array (i) = "-no_trunc" 110 then no_trunc_option = "1"b; 111 else if option_array (i) = "-header" 112 then 113 do; /* set header info */ 114 header_option = "1"b; 115 call get_n_opt (identifier); /* pick up optional ident number */ 116 end; 117 else if option_array (i) = "-old" 118 then old_option = "1"b; /* prevents creation */ 119 else if option_array (i) = "-ssf" 120 then ssf_option = "1"b; 121 else if option_array (i) = "-dup_ok" 122 then dup_ok_opt = "1"b; 123 else if (option_array (i) = "-stationary") | (option_array (i) = "-stat") 124 then stat_opt = "1"b; 125 else if option_array (i) = "-no_end" 126 then noend_option = "1"b; /* allows positioning beyond eof */ 127 else if option_array (i) = "-exclusive" 128 then exclu_option = "1"b; 129 else if (option_array (i) = "-transaction") | (option_array (i) = "-trans") 130 then if i >= n_opts /* no more args */ 131 then code = error_table_$noarg; 132 else 133 do; /* get tcf switch name */ 134 i = i + 1; /* skip over next arg */ 135 tcf_name = option_array (i); 136 trans_opt = "1"b; 137 end; 138 else if (option_array (i) = "-checkpoint") 139 then checkpoint_opt = "1"b; 140 else code = error_table_$bad_arg; 141 end; 142 end; 143 if code = 0 144 then 145 do; 146 rel_pathname = option_array (1); 147 rel_pathname_length = length (option_array (1)); 148 if ((extend_attach_option & (append_option | no_trunc_option)) | (append_option & no_trunc_option) 149 | (header_option & (checkpoint_opt | blocked_option | exclu_option | shared_option)) 150 | (blocked_option & (checkpoint_opt | no_trunc_option)) 151 | ((dup_ok_opt | stat_opt | trans_opt) 152 & (checkpoint_opt | ssf_option | blocked_option | no_trunc_option | append_option | noend_option)) 153 | (shared_option & (no_trunc_option | exclu_option))) 154 then code = error_table_$bad_arg; 155 end; 156 return; 157 end; /* end verify args */ 158 159 get_n_opt: 160 proc (n); /* used to pick up optional numerical argument */ 161 if i < n_opts 162 then 163 do; /* another option exists--look at it */ 164 num = cv_dec_check_ ((option_array (i + 1)), er_code); 165 if er_code = 0 /* valid integer */ 166 then 167 do; /* grab next option */ 168 i = i + 1; /* advance option_array index */ 169 saved_i = i; /* save element number */ 170 n = num; /* set the argument */ 171 end; 172 end; 173 dcl (n, num) fixed (35); 174 end get_n_opt; 175 176 create_attach_block: 177 proc; 178 dname, ename = " "; 179 call expand_path_ (addr (rel_pathname), rel_pathname_length, addr (dname), addr (ename), code); 180 if code = 0 181 then 182 do; 183 call alloc_cb_file (size (attach_block), attach_block_ptr); 184 dup_ok_sw = dup_ok_opt; 185 noend_sw = noend_option; 186 exclu_sw = exclu_option; 187 stat_sw = stat_opt; 188 trans_sw = trans_opt; 189 checkpoint_sw = checkpoint_opt; 190 ssf = ssf_option; 191 old = old_option; 192 blocked = blocked_option; 193 max_rec_len = max_recl; 194 header_present = header_option; 195 header_id = identifier; 196 no_trunc = no_trunc_option; 197 appending = append_option; 198 extend_attach = extend_attach_option | appending | no_trunc | old; 199 shared = shared_option; 200 wait_time = 1000000 * wait_time_option; 201 interp = 0; /* this option may be supported in future */ 202 dname_len = length (dname) + 1 - verify (reverse (dname), " "); 203 ename_len = length (ename) + 1 - verify (reverse (ename), " "); 204 string = "vfile_ " || substr (dname, 1, dname_len) || ">"; 205 string = string || substr (ename, 1, ename_len); 206 if no_trunc 207 then string = string || " -no_trunc"; 208 if appending 209 then string = string || " -append"; 210 if extend_attach_option 211 then string = string || " -extend"; 212 if noend_sw 213 then string = string || " -no_end"; 214 if interp = 1 215 then string = string || " -raw"; 216 if old 217 then string = string || " -old"; 218 if ssf /* limited to single-segment files */ 219 then string = string || " -ssf"; 220 if dup_ok_sw 221 then string = string || " -dup_ok"; 222 if stat_sw 223 then string = string || " -stationary"; 224 if trans_sw 225 then 226 do; 227 string = string || " -transaction " || tcf_name; 228 attach_block.tcf_iocbp = tcf_ptr; 229 end; 230 if checkpoint_sw 231 then string = string || " -checkpoint"; 232 if header_present 233 then 234 do; 235 string = string || " -header"; 236 string = string || " " || ltrim (char (identifier)); 237 end; 238 if blocked 239 then 240 do; 241 string = string || " -blocked"; 242 string = string || " " || ltrim (char (max_rec_len)); 243 end; 244 if exclu_sw 245 then string = string || " -exclusive"; 246 if shared 247 then 248 do; 249 string = string || " -share "; 250 string = string || ltrim (char (wait_time_option)); 251 end; 252 attach_descrip_len = length (string); 253 attach_descrip_string = string; 254 end; 255 256 dcl ename char (32) aligned; 257 dcl expand_path_ external entry (ptr, /* ptr to relative pathname */ 258 fixed bin, /* length of relative pathname */ 259 ptr, /* ptr to char(l68) aligned to hold expanded 260* directory name */ 261 ptr, /* ptr to char(32) aligned to hold expanded 262* entry name */ 263 fixed bin (35)); /* status code */ 264 dcl dname char (168) aligned; 265 dcl string char (256) varying; 266 end; /* end create_attach_block */ 267 268 open_file: 269 entry (iocb_ptr_arg, mode_arg, extend_arg, code); 270 begin; 271 iocb_ptr = iocb_ptr_arg -> actual_iocb_ptr; 272 attach_block_ptr = attach_data_ptr; 273 was_msf = "0"b; 274 i_set_lock = "0"b; /* will unlock file only if I locked it */ 275 fcb_ptr, first_seg_ptr = null; /* will cleanup if non-null */ 276 mode = mode_arg; 277 call verify_open_args_set_descrip; 278 if code = 0 279 then call get_file_base; 280 if code = 0 281 then call check_set_file_type; 282 if code = 0 283 then call check_set_file_already_open; 284 if (code = 0) & (^is_msf) & (file_type = 2 /* indexed */) 285 then call open_msf; /* always use msf_manager with indexed files */ 286 if code = 0 287 then 288 do; 289 if file_type = 0 290 then open_x = open_uns_file; 291 else if file_type = 1 292 then open_x = open_seq_file; 293 else if file_type = 2 294 then open_x = open_indx_file; 295 else if file_type = 3 296 then open_x = open_blk_file; 297 call open_x (iocb_ptr, fcb_ptr, first_seg_ptr, is_new_file, mode, close_x, first_seg_bitcount, 298 max_component_size, code); 299 end; 300 if code = 0 301 then 302 do; 303 close = close_file; 304 open_descrip_ptr = addr (open_descrip); 305 call iox_$propagate (iocb_ptr); 306 end; 307 else 308 do; 309 if first_seg_ptr ^= null 310 then if i_set_lock 311 then call set_lock_$unlock (open_lock, foo); 312 call cleanup; 313 end; 314 return; /* end of opening main routine */ 315 316 verify_open_args_set_descrip: 317 proc; 318 if (mode <= 0) | (mode > 13) 319 then code = error_table_$bad_arg; 320 else if (interp = 1) & (mode ^= 1) 321 then code = error_table_$incompatible_attach; 322 else if (((blocked | checkpoint_sw) & ((mode < 4) | (mode > 7))) | ((ssf | noend_sw) & (mode > 7)) 323 | (exclu_sw & is_input_only_mode (mode)) 324 | ((trans_sw | shared | exclu_sw | dup_ok_sw | stat_sw) 325 & ((mode < 4) | (^(extend_arg | extend_attach) & ((mode = 5) | (mode = 6))))) 326 | ((no_trunc | header_present) & (mode > 3))) 327 then code = error_table_$incompatible_attach; 328 else 329 do; 330 code = 0; 331 open_descrip_len = length (mode_descrip (mode)); 332 open_descrip_string = mode_descrip (mode); 333 end; 334 335 dcl string char (32) varying; 336 end; /* end verify_open_args_set_descrip */ 337 338 get_file_base: 339 proc; 340 branch_info.bit_count = "0"b; 341 is_msf = "0"b; 342 attach_block.last_comp = 0; 343 call hcs_$status_long (substr (attach_descrip_string, 8, dname_len), 344 substr (attach_descrip_string, 9 + dname_len, ename_len), 1, addr (branch_info), null, foo); 345 if foo ^= 0 346 then if foo = error_table_$no_s_permission 347 then foo = 0; /* we don't need any missing info */ 348 if (type = "10"b) & (bit_count = "0"b) & (foo = 0) 349 then 350 do; /* entry is a directory--flag the error */ 351 code = error_table_$dirseg; 352 return; /* unsuccessfulopening */ 353 end; 354 else if (type = "10"b) & (foo = 0) /* must be an msf */ 355 then if ssf /* -ssf option was specified--no msf's allowed */ 356 then 357 do; /* flag the error */ 358 code = error_table_$incompatible_attach; 359 return; 360 end; 361 else 362 do; 363 was_msf = "1"b; 364 attach_block.last_comp = fixed (bit_count) - 1; 365 call open_msf; 366 call msf_manager_$get_ptr (fcb_ptr, 0, "0"b, first_seg_ptr, first_seg_bitcount, foo); 367 end; 368 is_new_file = 369 (is_output_mode (mode) & ^extend_attach & ^extend_arg) 370 | ((branch_info.bit_count = "0"b) & ^is_input_only_mode (mode) & ^old); 371 if ^is_msf 372 then 373 do; /* get pointer to base of single segment file */ 374 first_seg_bitcount = fixed (branch_info.bit_count, 24, 0); 375 if is_new_file 376 then call hcs_$make_seg (substr (attach_descrip_string, 8, dname_len), 377 substr (attach_descrip_string, 9 + dname_len, ename_len), "", 01010b /* rw access */, first_seg_ptr, 378 foo); 379 else call hcs_$initiate (substr (attach_descrip_string, 8, dname_len), 380 substr (attach_descrip_string, 9 + dname_len, ename_len), "", 0, 1, first_seg_ptr, foo); 381 end; 382 if first_seg_ptr = null 383 then code = foo; 384 if code = 0 385 then 386 do; /* check access */ 387 access_mode = 0; 388 call hcs_$fs_get_mode (first_seg_ptr, access_mode, foo); 389 if (access_required (mode) & ^bit (access_mode)) ^= "0"b 390 then code = error_table_$moderr; 391 end; 392 if code = 0 393 then 394 do; 395 call hcs_$get_max_length_seg (first_seg_ptr, max_component_size, foo); 396 if is_new_file 397 then 398 do; 399 if ^is_msf /* single segment */ 400 then call hcs_$truncate_seg (first_seg_ptr, 0, foo); 401 else call msf_manager_$adjust (fcb_ptr, 0, 0, "010"b, foo); 402 /* truncate file, which leaves first 403* page set to zero */ 404 call hcs_$set_bc_seg (first_seg_ptr, 0, foo); 405 first_seg_bitcount = 0; 406 end; 407 end; 408 409 dcl access_mode fixed bin (5); 410 dcl hcs_$fs_get_mode external entry (ptr, fixed bin (5), fixed bin (35)); 411 /* second arg 412* interpreted as bit(5), second bit = read access, 413* fourth bit is write access, other bits irrelevant here */ 414 dcl hcs_$get_max_length_seg 415 entry (ptr, /* ptr to seg */ 416 fixed bin (19), /* max length in words */ 417 fixed bin (35)); /* code */ 418 dcl hcs_$set_bc_seg entry (ptr, /* ptr to segment */ 419 fixed bin (24), /* bitcount */ 420 fixed bin (35)); /* status code */ 421 end get_file_base; 422 423 check_set_file_type: 424 proc; 425 if mode < 4 426 then 427 do; 428 file_type = 0; 429 if is_new_file & header_present 430 then file_code = file_code_table (0); 431 end; 432 else if is_new_file 433 then 434 do; 435 if mode < 8 436 then if blocked 437 then file_type = 3; 438 else file_type = 1; /* normal sequential file */ 439 else file_type = 2; 440 call check_type; 441 if code = 0 442 then file_code = file_code_table (file_type); 443 end; 444 else 445 do; 446 if file_code = file_code_table (1) 447 then file_type = 1; 448 else if file_code = file_code_table (2) 449 then file_type = 2; 450 else if file_code = file_code_table (3) 451 then file_type = 3; 452 else code = error_table_$bad_file; 453 if code = 0 454 then call check_type; 455 end; 456 return; /* end of check_set_file_type main routine */ 457 458 check_type: 459 proc; 460 if ^substr (compatible_types (mode), file_type, 1) | ((file_type = 2) & ssf) 461 | (((file_type = 1) | (file_type = 2)) & noend_sw) | (checkpoint_sw & ^(file_type = 1)) 462 | ((dup_ok_sw | stat_sw | trans_sw) & (file_type ^= 2)) | ((shared | exclu_sw) & (file_type < 2)) 463 then code = error_table_$incompatible_attach; 464 end check_type; 465 466 dcl compatible_types (4:13) bit (3) static 467 init ("111"b, "101"b, "101"b, "111"b, "010"b, "010"b, "010"b, "010"b, "010"b, "010"b) 468 ; 469 dcl file_code_table (0:3) static internal fixed bin init (31191, 83711, 7129, 22513); 470 end; /* end check_set_file_type */ 471 472 open_msf: 473 proc; /* opens ssf as msf for indexed file */ 474 is_msf = "1"b; 475 call msf_manager_$open (substr (attach_descrip_string, 8, dname_len), 476 substr (attach_descrip_string, 9 + dname_len, ename_len), fcb_ptr, foo); 477 /* creates msf control block */ 478 if (fcb_ptr = null) & (foo ^= 0) 479 then code = foo; /* unexpected error */ 480 end open_msf; 481 482 check_set_file_already_open: 483 proc; 484 if file_type ^= 0 485 then 486 do; 487 if is_input_only_mode (mode) 488 then 489 do; 490 if ^shared & (open_lock ^= "0"b) 491 then code = error_table_$file_busy; 492 end; 493 else 494 do; 495 call set_lock_$lock (open_lock, divide (wait_time + 500000, 1000000, 35, 0), foo); 496 if foo ^= 0 497 then if foo = error_table_$invalid_lock_reset 498 /* locked by dead proc */ 499 then 500 do; 501 inv_lock_reset = "1"b; 502 i_set_lock = "1"b; 503 end; 504 else code = error_table_$file_busy; 505 else 506 do; 507 inv_lock_reset = "0"b; 508 i_set_lock = "1"b; 509 end; 510 end; 511 end; 512 513 end; /* end check_set_file_already_open */ 514 515 dcl i_set_lock bit (1) aligned; 516 dcl first_seg_bitcount fixed bin (24); 517 dcl is_new_file bit (1) aligned; 518 dcl open_x variable entry (ptr,/* iocb_ptr, input */ 519 ptr, /* fcb_ptr, input */ 520 ptr, /* first_seg_ptr, input */ 521 bit (1) aligned, /* is_new_file, input */ 522 fixed bin, /* mode */ 523 entry, /* close_x, output */ 524 fixed bin (24), /* first seg bitcount */ 525 fixed bin (19), /* max_component_size */ 526 fixed bin (35)); /* code, if not 0, open_x leaves iocb as is */ 527 dcl open_uns_file entry external; 528 dcl open_seq_file entry external; 529 dcl open_blk_file entry external; 530 dcl open_indx_file entry external; 531 end; /* end of open_file routine */ 532 533 cleanup: 534 proc; 535 if fcb_ptr ^= null 536 then call msf_manager_$close (fcb_ptr); 537 if (^was_msf) & (first_seg_ptr ^= null) 538 then call hcs_$terminate_noname (first_seg_ptr, foo); 539 end cleanup; 540 541 control_file: 542 entry (iocb_ptr_arg, order, info_ptr, code); 543 iocb_ptr = iocb_ptr_arg -> iocb.actual_iocb_ptr; 544 545 546 if order = "file_status" 547 then call vfile_status_$seg (iocb_ptr, (null), info_ptr, code); 548 549 else if order = "io_call" 550 then call vfile_io_control (iocb_ptr, (null), info_ptr, code); 551 552 else code = error_table_$no_operation; 553 return; /* end of control operation supported with switch closed */ 554 555 close_file: 556 entry (iocb_ptr_arg, code); 557 code = 0; 558 iocb_ptr = iocb_ptr_arg -> actual_iocb_ptr; 559 attach_block_ptr = attach_data_ptr; 560 call close_x (iocb_ptr); 561 if (file_type = 1 /* seq */) & (^is_input_only_mode (mode)) 562 then call set_lock_$unlock (open_lock, foo); 563 iocb.control = control_file; 564 open_descrip_ptr = null; 565 open = open_file; 566 detach_iocb = detach_file; 567 call iox_$propagate (iocb_ptr); 568 call cleanup; 569 return; /* end of close routine */ 570 571 detach_file: 572 entry (iocb_ptr_arg, code); 573 begin; 574 iocb_ptr = iocb_ptr_arg; 575 attach_block_ptr = attach_data_ptr; 576 code = 0; 577 attach_descrip_ptr = null; 578 call iox_$propagate (iocb_ptr); 579 call free_cb_file (size (attach_block), attach_block_ptr); 580 end; 581 return; /* end detach routine */ 582 583 /* DECLARATIONS FOR COMPLETE PROGRAM */ 584 dcl sub_err_ entry options (variable); 585 586 dcl info_ptr ptr; 587 dcl order char (*); 588 dcl vfile_status_$seg entry (ptr, ptr, ptr, fixed (35)); 589 dcl vfile_io_control entry (ptr, ptr, ptr, fixed (35)); 590 dcl 1 branch_info aligned, /* info returned by hcs_$status_long */ 591 2 type bit (2) unal, 592 2 pad0 bit (34) unal, 593 2 words1 (6) fixed, /* of no interest */ 594 2 pad1 bit (12) unal, 595 2 bit_count bit (24) unal, /* distinguishes msf and dir */ 596 2 words2 (2); 597 dcl hcs_$status_long entry (char (*), char (*), fixed (1), ptr, ptr, fixed (35)); 598 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed (1), fixed (2), ptr, fixed (35)); 599 dcl hcs_$terminate_noname entry (ptr, fixed (35)); 600 dcl hcs_$truncate_seg entry (ptr, fixed (18), fixed (35)); 601 dcl hcs_$make_seg entry (char (*), char (*), char (*), fixed (5), ptr, fixed (35)); 602 dcl msf_manager_$close external entry (ptr); /* This entry frees the msf file control block 603* and terminates all initiated components */ 604 dcl msf_manager_$adjust external entry (ptr, /* fcb_ptr input */ 605 fixed bin, /* component number, input */ 606 fixed bin (24), /* bit count, input */ 607 bit (3), /* "010"b implies don't set bit counts (use hcs_$set_bc_seg), truncate 608* seg, don't terminate seg */ 609 fixed bin (35)); /* code, output */ 610 dcl msf_manager_$get_ptr external entry (ptr, /* fcb_ptr, input */ 611 fixed bin, /* create switch, input */ 612 bit (1), /* create switch, input */ 613 ptr, /* pointer to seg., output, null if error */ 614 fixed bin (24), /* bit count, output */ 615 fixed bin (35)); /* code, output */ 616 dcl msf_manager_$open external entry (char (*), 617 /* directory pathname, input */ 618 char (*), /* entry name, input */ 619 ptr, /* fcb_ptr, output, good unless code is 620* error_table_$dirseg */ 621 fixed bin (35)); /* code, output */ 622 dcl (extend_attach_option, shared_option, blocked_option, append_option, old_option, dup_ok_opt, exclu_option, 623 noend_option, stat_opt, trans_opt, checkpoint_opt) 624 bit (1) aligned init ("0"b); 625 dcl tcf_name char (32) var; 626 dcl tcf_ptr ptr; 627 dcl (no_trunc_option, ssf_option, header_option) 628 bit (1) aligned init ("0"b); 629 dcl wait_time_option fixed (35) init (1); 630 dcl identifier fixed (35) init (0); 631 dcl max_recl fixed (35) init (0); 632 dcl (n, i, n_opts, er_code); 633 dcl saved_i fixed init (0); 634 dcl cv_dec_check_ entry (char (*), fixed) returns (fixed (35)); 635 dcl access_required (13) bit (5) static internal 636 init ("01000"b, "00010"b, "01010"b, "01000"b, "01010"b, "01010"b, "01010"b, "01000"b, 637 "01010"b, "01010"b, "01000"b, "01010"b, "01010"b); 638 /* second bit is r access, fourth bit is w access */ 639 dcl addr builtin; 640 dcl alloc_cb_file external entry (fixed bin, 641 /* size of block in words, input */ 642 ptr); /* pointer to block, output */ 643 dcl 1 attach_block based (attach_block_ptr), 644 /* the following are set by attach_file */ 645 2 flags aligned, 646 3 (extend_attach, appending, no_trunc, old, ssf, header_present, blocked, shared, was_msf, is_msf, 647 inv_lock_reset, dup_ok_sw, trans_sw, noend_sw, exclu_sw, stat_sw, checkpoint_sw) 648 bit (1) unal, 649 3 pad bit (19) unal, 650 2 wait_time fixed (35), 651 2 interp fixed, 652 2 max_rec_len fixed (35), 653 2 header_id fixed (35), 654 2 attach_descrip, 655 3 attach_descrip_len 656 fixed bin (35), /* < = 256 */ 657 3 attach_descrip_string 658 char (256), /* "-pn " (4 chars), the directory 659* pathname (dname_len chars), ">", the entry 660* name (ename_len chars), " -extend" (optional 8 chars), 661* and " -raw" or " -extend"(optional 8 chars) */ 662 2 dname_len fixed bin, /* < = l68 */ 663 2 ename_len fixed bin, /* < = 32 */ 664 /* The following are set by open_file */ 665 2 open_descrip, 666 3 open_descrip_len fixed bin (35), /* < = 31 */ 667 3 open_descrip_string 668 char (32), /* The string 669* contains the opening mode, e.g., "stream output", 670* (< = 23 chars) and " -extend" (8chars optional) */ 671 2 mode fixed bin, /* opening mode 1 <= 13 */ 672 2 file_type fixed bin, /* 0 = uns, 1 = seq, 2 = indx, 3 = blk */ 673 2 fcb_ptr ptr, /* pointer to msf_manager control block */ 674 2 first_seg_ptr ptr, /* pointer to first component 675* of the file. Thie pointer is valid throughout the 676* file opening */ 677 2 close_x entry (ptr), /* routine to perform operations required 678* for closing specific type of file obtained from open_x see 679* open_file */ 680 2 last_comp fixed, /* msf component number at open */ 681 2 tcf_iocbp ptr; /* iocb ptr for transaction control switch */ 682 dcl attach_block_ptr ptr; 683 dcl bit builtin; 684 dcl code fixed bin (35); /* status code argument */ 685 dcl com_err_ entry options (variable); 686 dcl command_switch bit (1) aligned; 687 dcl 1 common_header based (first_seg_ptr), /* This 688* header is used for all seq and indx files. Its contents 689* are manipulated by open_file and close_file but not by the 690* specific access methods. Its size is 4 words */ 691 2 file_code fixed bin (35), 692 2 open_lock bit (36) aligned, /* nonzero if file open unless shared */ 693 2 reserved (2) fixed bin; 694 dcl extend_arg bit (1) aligned; 695 dcl foo fixed bin (35); /* used when output parameters value is to 696* beignored */ 697 dcl hbound builtin; 698 dcl iocb_ptr ptr; 699 dcl iocb_ptr_arg ptr; 700 dcl is_input_only_mode (13) static internal bit (1) 701 init ("1"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "1"b, "0"b, "0"b); 702 dcl is_output_mode (13) static internal bit (1) 703 init ("0"b, "1"b, "1"b, "0"b, "1"b, "1"b, "0"b, "0"b, "1"b, "0"b, "0"b, "1"b, "0"b); 704 dcl length builtin; 705 dcl max_component_size fixed bin (19); 706 dcl mode_arg fixed bin; 707 dcl mode_descrip (13) char (24) varying static internal 708 init ("stream_input", "stream_output", "stream_input_output", "sequential_input", 709 "sequential_output", "sequential_input_output", "sequential_update", 710 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 711 "direct_input", "direct_output", "direct_update"); 712 dcl null builtin; 713 dcl option_array (*) char (*) varying; 714 dcl iox_$propagate entry (ptr); 715 dcl iox_$look_iocb entry (char (*), ptr, fixed (35)); 716 dcl rel_pathname char (168); 717 dcl rel_pathname_length fixed bin; 718 dcl reverse builtin; 719 dcl set_lock_$lock entry (bit (36) aligned, 720 /* lock word */ 721 fixed bin, /* num of seconds to wait */ 722 fixed bin (35)); /* code=0 or et_$invalid_lock_reset are success codes */ 723 dcl set_lock_$unlock entry (bit (36) aligned, 724 /* lock word */ 725 fixed bin (35)); /* code */ 726 dcl size builtin; 727 dcl substr builtin; 728 dcl verify builtin; 729 dcl error_table_$negative_nelem 730 external fixed (35); 731 dcl error_table_$noarg external fixed (35); 732 dcl error_table_$no_s_permission 733 external fixed (35); 734 dcl error_table_$no_operation 735 fixed (35) external; 736 dcl error_table_$bad_arg external fixed bin (35); 737 dcl error_table_$pathlong external fixed bin (35); 738 dcl error_table_$moderr external fixed bin (35); 739 dcl error_table_$dirseg external fixed bin (35); 740 dcl error_table_$not_detached 741 external fixed bin (35); 742 dcl error_table_$bad_file external fixed bin (35); 743 dcl error_table_$file_busy external fixed bin (35); 744 dcl error_table_$incompatible_attach 745 external fixed bin (35); 746 dcl error_table_$invalid_lock_reset 747 external fixed bin (35); 748 dcl free_cb_file external entry (fixed bin, 749 /* size of block in words, input */ 750 ptr); /* pointer to block); input */ 1 1 1 2 dcl 1 iocb aligned based (iocb_ptr), 1 3 /* I/O control block. */ 1 4 2 iocb_version fixed init (1), /* Version number of structure. */ 1 5 2 name char (32), /* I/O name of this block. */ 1 6 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 7 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 8 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 9 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 10 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 11 2 reserved bit (72), /* Reserved for future use. */ 1 12 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 13 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 14 /* open(p,mode,not_used,s) */ 1 15 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 16 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 17 /* get_line(p,bufptr,buflen,actlen,s) */ 1 18 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 19 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 20 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 21 /* put_chars(p,bufptr,buflen,s) */ 1 22 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 23 /* modes(p,newmode,oldmode,s) */ 1 24 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 25 /* position(p,u1,u2,s) */ 1 26 2 control entry (ptr, char (*), ptr, fixed (35)), 1 27 /* control(p,order,infptr,s) */ 1 28 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 29 /* read_record(p,bufptr,buflen,actlen,s) */ 1 30 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 31 /* write_record(p,bufptr,buflen,s) */ 1 32 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 33 /* rewrite_record(p,bufptr,buflen,s) */ 1 34 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 35 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 36 /* seek_key(p,key,len,s) */ 1 37 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 38 /* read_key(p,key,len,s) */ 1 39 2 read_length entry (ptr, fixed (21), fixed (35)); 1 40 /* read_length(p,len,s) */ 1 41 751 752 753 /* GENERAL COMMENTS 754* This external procedure implements file attachment and the 755* i-o operations open, close and detach for this attachment 756* (entries: open_file, close_file, detach_file). The code for 757* each entry immediately follows the entry and terminates with 758* a return statement. 759* 760* Before reading the code familiarize yourself with the general 761* conventions for implementing attachments (see the MPM) and read 762* the declarations of attach_block and common header. 763* 764* The whole thing can be considered a single program in which attach, 765* open, close, and detach are done in that order. The difficult operation 766* is open. It does that which is common to the various types of 767* files. The specific access method is called (via open_x) to set up its 768* control block and perform any special file initialization. open_file will 769* have to be changed when file types are put in the directory branches. */ 770 end /* end of vfile_attach program */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/10/87 1445.1 vfile_attach.pl1 >special_ldd>install>MR12.1-1104>vfile_attach.pl1 751 1 07/02/81 1905.0 iocbv.incl.pl1 >ldd>include>iocbv.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. access_mode 000472 automatic fixed bin(5,0) dcl 409 set ref 387* 388* 389 access_required 000142 constant bit(5) initial array unaligned dcl 635 ref 389 actual_iocb_ptr 12 based pointer level 2 dcl 1-2 ref 45 45 271 543 558 addr builtin function dcl 639 ref 62 179 179 179 179 179 179 304 343 343 alloc_cb_file 000042 constant entry external dcl 640 ref 183 append_option 000115 automatic bit(1) initial dcl 622 set ref 107* 148 148 148 197 622* appending 0(01) based bit(1) level 3 packed unaligned dcl 643 set ref 197* 198 208 attach_block based structure level 1 unaligned dcl 643 set ref 183 183 579 579 attach_block_ptr 000152 automatic pointer dcl 682 set ref 61 62 183 183 183* 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 198 198 198 199 200 201 202 203 204 205 206 208 212 214 216 218 220 222 224 228 230 232 238 242 244 246 252 253 272* 273 275 275 276 284 284 289 291 293 295 297 297 297 297 304 309 309 318 318 320 320 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 331 331 332 332 341 342 343 343 343 343 343 343 343 343 343 343 354 363 364 366 366 368 368 368 368 371 375 375 375 375 375 375 375 375 375 375 375 379 379 379 379 379 379 379 379 379 379 379 382 388 389 395 399 399 401 404 425 428 429 429 435 435 435 438 439 441 441 446 446 448 448 450 450 460 460 460 460 460 460 460 460 460 460 460 460 460 460 460 460 474 475 475 475 475 475 475 475 475 475 475 475 478 484 487 490 490 495 495 495 501 507 535 535 537 537 537 559* 560 561 561 561 575* 579 579 579* attach_data_ptr 16 based pointer level 2 dcl 1-2 set ref 61* 272 559 575 attach_descrip 5 based structure level 2 unaligned dcl 643 set ref 62 attach_descrip_len 5 based fixed bin(35,0) level 3 dcl 643 set ref 252* attach_descrip_ptr 14 based pointer level 2 dcl 1-2 set ref 45 45 62* 74 577* attach_descrip_string 6 based char(256) level 3 packed unaligned dcl 643 set ref 45 253* 343 343 343 343 375 375 375 375 379 379 379 379 475 475 475 475 bit builtin function dcl 683 ref 389 bit_count 7(12) 000100 automatic bit(24) level 2 packed unaligned dcl 590 set ref 340* 348 364 368 374 blocked 0(06) based bit(1) level 3 packed unaligned dcl 643 set ref 192* 238 322 435 blocked_option 000114 automatic bit(1) initial dcl 622 set ref 102* 148 148 148 192 622* branch_info 000100 automatic structure level 1 dcl 590 set ref 343 343 checkpoint_opt 000124 automatic bit(1) initial dcl 622 set ref 138* 148 148 148 189 622* checkpoint_sw 0(16) based bit(1) level 3 packed unaligned dcl 643 set ref 189* 230 322 460 close 36 based entry variable level 2 dcl 1-2 set ref 303* close_x 130 based entry variable level 2 dcl 643 set ref 297* 560 code parameter fixed bin(35,0) dcl 684 set ref 24 41 44* 45 51* 52* 56 58 68* 74* 76* 80* 82* 84 96* 104* 129* 140* 143 148* 179* 180 268 278 280 282 284 286 297* 300 318* 320* 322* 330* 351* 358* 382* 384 389* 392 441 452* 453 460* 478* 490* 504* 541 546* 549* 552* 555 557* 571 576* com_err_ 000044 constant entry external dcl 685 ref 68 command_switch parameter bit(1) dcl 686 ref 24 68 common_header based structure level 1 unaligned dcl 687 compatible_types 000004 constant bit(3) initial array unaligned dcl 466 ref 460 control 66 based entry variable level 2 dcl 1-2 set ref 64* 563* cv_dec_check_ 000040 constant entry external dcl 634 ref 164 detach_iocb 26 based entry variable level 2 dcl 1-2 set ref 65* 566* dname 000274 automatic char(168) dcl 264 set ref 178* 179 179 202 202 204 dname_len 106 based fixed bin(17,0) level 2 dcl 643 set ref 202* 204 343 343 343 343 375 375 375 375 379 379 379 379 475 475 475 475 dup_ok_opt 000117 automatic bit(1) initial dcl 622 set ref 121* 148 184 622* dup_ok_sw 0(11) based bit(1) level 3 packed unaligned dcl 643 set ref 184* 220 322 460 ename 000264 automatic char(32) dcl 256 set ref 178* 179 179 203 203 205 ename_len 107 based fixed bin(17,0) level 2 dcl 643 set ref 203* 205 343 343 375 375 379 379 475 475 er_code 000150 automatic fixed bin(17,0) dcl 632 set ref 164* 165 error_table_$bad_arg 000066 external static fixed bin(35,0) dcl 736 ref 82 96 140 148 318 error_table_$bad_file 000100 external static fixed bin(35,0) dcl 742 ref 452 error_table_$dirseg 000074 external static fixed bin(35,0) dcl 739 ref 351 error_table_$file_busy 000102 external static fixed bin(35,0) dcl 743 ref 490 504 error_table_$incompatible_attach 000104 external static fixed bin(35,0) dcl 744 ref 51 320 322 358 460 error_table_$invalid_lock_reset 000106 external static fixed bin(35,0) dcl 746 ref 496 error_table_$moderr 000072 external static fixed bin(35,0) dcl 738 ref 389 error_table_$negative_nelem 000056 external static fixed bin(35,0) dcl 729 ref 104 error_table_$no_operation 000064 external static fixed bin(35,0) dcl 734 ref 552 error_table_$no_s_permission 000062 external static fixed bin(35,0) dcl 732 ref 345 error_table_$noarg 000060 external static fixed bin(35,0) dcl 731 ref 129 error_table_$not_detached 000076 external static fixed bin(35,0) dcl 740 ref 74 error_table_$pathlong 000070 external static fixed bin(35,0) dcl 737 ref 76 exclu_option 000120 automatic bit(1) initial dcl 622 set ref 127* 148 148 186 622* exclu_sw 0(14) based bit(1) level 3 packed unaligned dcl 643 set ref 186* 244 322 322 460 expand_path_ 000112 constant entry external dcl 257 ref 179 extend_arg parameter bit(1) dcl 694 ref 268 322 368 extend_attach based bit(1) level 3 packed unaligned dcl 643 set ref 198* 322 368 extend_attach_option 000112 automatic bit(1) initial dcl 622 set ref 86* 88* 148 198 210 622* fcb_ptr 124 based pointer level 2 dcl 643 set ref 275* 297* 366* 401* 475* 478 535 535* file_code based fixed bin(35,0) level 2 dcl 687 set ref 429* 441* 446 448 450 file_code_table 000000 constant fixed bin(17,0) initial array dcl 469 ref 429 441 446 448 450 file_type 122 based fixed bin(17,0) level 2 dcl 643 set ref 284 289 291 293 295 428* 435* 438* 439* 441 446* 448* 450* 460 460 460 460 460 460 460 484 561 first_seg_bitcount 000450 automatic fixed bin(24,0) dcl 516 set ref 297* 366* 374* 405* first_seg_ptr 126 based pointer level 2 dcl 643 set ref 275* 297* 309 309 366* 375* 379* 382 388* 395* 399* 404* 429 441 446 448 450 490 495 537 537* 561 flags based structure level 2 dcl 643 foo 000154 automatic fixed bin(35,0) dcl 695 set ref 309* 343* 345 345 345* 348 354 366* 375* 379* 382 388* 395* 399* 401* 404* 475* 478 478 495* 496 496 537* 561* free_cb_file 000110 constant entry external dcl 748 ref 579 hbound builtin function dcl 697 ref 81 hcs_$fs_get_mode 000124 constant entry external dcl 410 ref 388 hcs_$get_max_length_seg 000126 constant entry external dcl 414 ref 395 hcs_$initiate 000020 constant entry external dcl 598 ref 379 hcs_$make_seg 000026 constant entry external dcl 601 ref 375 hcs_$set_bc_seg 000130 constant entry external dcl 418 ref 404 hcs_$status_long 000016 constant entry external dcl 597 ref 343 hcs_$terminate_noname 000022 constant entry external dcl 599 ref 537 hcs_$truncate_seg 000024 constant entry external dcl 600 ref 399 header_id 4 based fixed bin(35,0) level 2 dcl 643 set ref 195* header_option 000142 automatic bit(1) initial dcl 627 set ref 114* 148 194 627* header_present 0(05) based bit(1) level 3 packed unaligned dcl 643 set ref 194* 232 322 429 i 000146 automatic fixed bin(17,0) dcl 632 set ref 84* 86 88 88 91 99 107 109 111 117 119 121 123 123 125 127 129 129 129 134* 134 135 138* 161 164 168* 168 169 i_set_lock 000447 automatic bit(1) dcl 515 set ref 274* 309 502* 508* identifier 000144 automatic fixed bin(35,0) initial dcl 630 set ref 115* 195 236 630* info_ptr parameter pointer dcl 586 set ref 541 546* 549* interp 2 based fixed bin(17,0) level 2 dcl 643 set ref 201* 214 320 inv_lock_reset 0(10) based bit(1) level 3 packed unaligned dcl 643 set ref 501* 507* iocb based structure level 1 dcl 1-2 iocb_ptr 000156 automatic pointer dcl 698 set ref 39* 61 62 63 64 65 66* 68 74 271* 272 297* 303 304 305* 543* 546* 549* 558* 559 560* 563 564 565 566 567* 574* 575 577 578* iocb_ptr_arg parameter pointer dcl 699 ref 24 39 268 271 541 543 555 558 571 574 iox_$look_iocb 000050 constant entry external dcl 715 ref 44 iox_$propagate 000046 constant entry external dcl 714 ref 66 305 567 578 is_input_only_mode 000141 constant bit(1) initial array unaligned dcl 700 ref 322 368 487 561 is_msf 0(09) based bit(1) level 3 packed unaligned dcl 643 set ref 284 341* 371 399 474* is_new_file 000451 automatic bit(1) dcl 517 set ref 297* 368* 375 396 429 432 is_output_mode 000140 constant bit(1) initial array unaligned dcl 702 ref 368 last_comp 134 based fixed bin(17,0) level 2 dcl 643 set ref 342* 364* length builtin function dcl 704 ref 76 147 202 203 252 331 max_component_size 000160 automatic fixed bin(19,0) dcl 705 set ref 297* 395* max_rec_len 3 based fixed bin(35,0) level 2 dcl 643 set ref 193* 242 max_recl 000145 automatic fixed bin(35,0) initial dcl 631 set ref 103* 104 193 631* mode 121 based fixed bin(17,0) level 2 dcl 643 set ref 276* 297* 318 318 320 322 322 322 322 322 322 322 322 331 332 368 368 389 425 435 460 487 561 mode_arg parameter fixed bin(17,0) dcl 706 ref 268 276 mode_descrip 000005 constant varying char(24) initial array dcl 707 ref 331 332 msf_manager_$adjust 000032 constant entry external dcl 604 ref 401 msf_manager_$close 000030 constant entry external dcl 602 ref 535 msf_manager_$get_ptr 000034 constant entry external dcl 610 ref 366 msf_manager_$open 000036 constant entry external dcl 616 ref 475 n parameter fixed bin(35,0) dcl 173 set ref 159 170* n_opts 000147 automatic fixed bin(17,0) dcl 632 set ref 81* 82 84 129 161 name 1 based char(32) level 2 dcl 1-2 set ref 68* no_trunc 0(02) based bit(1) level 3 packed unaligned dcl 643 set ref 196* 198 206 322 no_trunc_option 000140 automatic bit(1) initial dcl 627 set ref 109* 148 148 148 148 148 196 627* noend_option 000121 automatic bit(1) initial dcl 622 set ref 125* 148 185 622* noend_sw 0(13) based bit(1) level 3 packed unaligned dcl 643 set ref 185* 212 322 460 null builtin function dcl 712 ref 45 52 52 74 275 309 343 343 382 478 535 537 546 549 564 577 num 000254 automatic fixed bin(35,0) dcl 173 set ref 164* 170 old 0(03) based bit(1) level 3 packed unaligned dcl 643 set ref 191* 198 216 368 old_option 000116 automatic bit(1) initial dcl 622 set ref 117* 191 622* open 32 based entry variable level 2 dcl 1-2 set ref 63* 565* open_blk_file 000120 constant entry external dcl 529 ref 295 open_descrip 110 based structure level 2 unaligned dcl 643 set ref 304 open_descrip_len 110 based fixed bin(35,0) level 3 dcl 643 set ref 331* open_descrip_ptr 20 based pointer level 2 dcl 1-2 set ref 304* 564* open_descrip_string 111 based char(32) level 3 packed unaligned dcl 643 set ref 332* open_indx_file 000122 constant entry external dcl 530 ref 293 open_lock 1 based bit(36) level 2 dcl 687 set ref 309* 490 495* 561* open_seq_file 000116 constant entry external dcl 528 ref 291 open_uns_file 000114 constant entry external dcl 527 ref 289 open_x 000452 automatic entry variable dcl 518 set ref 289* 291* 293* 295* 297 option_array parameter varying char array dcl 713 ref 24 76 81 86 88 88 91 99 107 109 111 117 119 121 123 123 125 127 129 129 135 138 146 147 164 order parameter char unaligned dcl 587 ref 541 546 549 rel_pathname 000161 automatic char(168) unaligned dcl 716 set ref 146* 179 179 rel_pathname_length 000233 automatic fixed bin(17,0) dcl 717 set ref 147* 179* reverse builtin function dcl 718 ref 202 203 saved_i 000151 automatic fixed bin(17,0) initial dcl 633 set ref 169* 633* set_lock_$lock 000052 constant entry external dcl 719 ref 495 set_lock_$unlock 000054 constant entry external dcl 723 ref 309 561 shared 0(07) based bit(1) level 3 packed unaligned dcl 643 set ref 199* 246 322 460 490 shared_option 000113 automatic bit(1) initial dcl 622 set ref 94* 148 148 199 622* size builtin function dcl 726 ref 183 183 579 579 ssf 0(04) based bit(1) level 3 packed unaligned dcl 643 set ref 190* 218 322 354 460 ssf_option 000141 automatic bit(1) initial dcl 627 set ref 119* 148 190 627* stat_opt 000122 automatic bit(1) initial dcl 622 set ref 123* 148 187 622* stat_sw 0(15) based bit(1) level 3 packed unaligned dcl 643 set ref 187* 222 322 460 string 000346 automatic varying char(256) dcl 265 set ref 204* 205* 205 206* 206 208* 208 210* 210 212* 212 214* 214 216* 216 218* 218 220* 220 222* 222 227* 227 230* 230 235* 235 236* 236 241* 241 242* 242 244* 244 249* 249 250* 250 252 253 sub_err_ 000010 constant entry external dcl 584 ref 52 substr builtin function dcl 727 ref 204 205 343 343 343 343 375 375 375 375 379 379 379 379 460 475 475 475 475 tcf_iocbp 136 based pointer level 2 dcl 643 set ref 228* tcf_name 000125 automatic varying char(32) dcl 625 set ref 44 135* 227 tcf_ptr 000136 automatic pointer dcl 626 set ref 44* 45 45 228 trans_opt 000123 automatic bit(1) initial dcl 622 set ref 41 136* 148 188 622* trans_sw 0(12) based bit(1) level 3 packed unaligned dcl 643 set ref 188* 224 322 460 type 000100 automatic bit(2) level 2 packed unaligned dcl 590 set ref 348 354 verify builtin function dcl 728 ref 202 203 vfile_io_control 000014 constant entry external dcl 589 ref 549 vfile_status_$seg 000012 constant entry external dcl 588 ref 546 wait_time 1 based fixed bin(35,0) level 2 dcl 643 set ref 200* 495 495 wait_time_option 000143 automatic fixed bin(35,0) initial dcl 629 set ref 95* 96 200 250 629* was_msf 0(08) based bit(1) level 3 packed unaligned dcl 643 set ref 273* 363* 537 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. n automatic fixed bin(17,0) dcl 632 string automatic varying char(32) dcl 335 NAMES DECLARED BY EXPLICIT CONTEXT. check_set_file_already_open 002243 constant entry internal dcl 482 ref 282 check_set_file_type 002000 constant entry internal dcl 423 ref 280 check_type 002076 constant entry internal dcl 458 ref 440 453 cleanup 004430 constant entry internal dcl 533 ref 312 568 close_file 002447 constant entry external dcl 555 ref 303 control_file 002341 constant entry external dcl 541 ref 64 563 create_attach_block 003367 constant entry internal dcl 176 ref 56 detach_file 002552 constant entry external dcl 571 ref 65 566 get_file_base 001210 constant entry internal dcl 338 ref 278 get_n_opt 003302 constant entry internal dcl 159 ref 95 103 115 open_file 000641 constant entry external dcl 268 ref 63 565 open_msf 002161 constant entry internal dcl 472 ref 284 365 verify_and_interpret_args 002620 constant entry internal dcl 72 ref 40 verify_open_args_set_descrip 001056 constant entry internal dcl 316 ref 277 vfile_attach 000373 constant entry external dcl 24 NAMES DECLARED BY CONTEXT OR IMPLICATION. char builtin function ref 236 242 250 divide builtin function ref 495 495 fixed builtin function ref 364 374 index builtin function ref 45 ltrim builtin function ref 236 242 250 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 5222 5354 4517 5232 Length 5660 4517 132 270 502 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vfile_attach 608 external procedure is an external procedure. verify_and_interpret_args internal procedure shares stack frame of external procedure vfile_attach. get_n_opt internal procedure shares stack frame of external procedure vfile_attach. create_attach_block internal procedure shares stack frame of external procedure vfile_attach. begin block on line 270 begin block shares stack frame of external procedure vfile_attach. verify_open_args_set_descrip internal procedure shares stack frame of external procedure vfile_attach. get_file_base internal procedure shares stack frame of external procedure vfile_attach. check_set_file_type internal procedure shares stack frame of external procedure vfile_attach. check_type internal procedure shares stack frame of external procedure vfile_attach. open_msf internal procedure shares stack frame of external procedure vfile_attach. check_set_file_already_open internal procedure shares stack frame of external procedure vfile_attach. cleanup internal procedure shares stack frame of external procedure vfile_attach. begin block on line 573 begin block shares stack frame of external procedure vfile_attach. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vfile_attach 000100 branch_info vfile_attach 000112 extend_attach_option vfile_attach 000113 shared_option vfile_attach 000114 blocked_option vfile_attach 000115 append_option vfile_attach 000116 old_option vfile_attach 000117 dup_ok_opt vfile_attach 000120 exclu_option vfile_attach 000121 noend_option vfile_attach 000122 stat_opt vfile_attach 000123 trans_opt vfile_attach 000124 checkpoint_opt vfile_attach 000125 tcf_name vfile_attach 000136 tcf_ptr vfile_attach 000140 no_trunc_option vfile_attach 000141 ssf_option vfile_attach 000142 header_option vfile_attach 000143 wait_time_option vfile_attach 000144 identifier vfile_attach 000145 max_recl vfile_attach 000146 i vfile_attach 000147 n_opts vfile_attach 000150 er_code vfile_attach 000151 saved_i vfile_attach 000152 attach_block_ptr vfile_attach 000154 foo vfile_attach 000156 iocb_ptr vfile_attach 000160 max_component_size vfile_attach 000161 rel_pathname vfile_attach 000233 rel_pathname_length vfile_attach 000254 num get_n_opt 000264 ename create_attach_block 000274 dname create_attach_block 000346 string create_attach_block 000447 i_set_lock begin block on line 270 000450 first_seg_bitcount begin block on line 270 000451 is_new_file begin block on line 270 000452 open_x begin block on line 270 000472 access_mode get_file_base THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_l_a r_g_a r_e_as alloc_char_temp cat_realloc_chars call_ent_var call_ext_out_desc call_ext_out begin_return_mac return_mac shorten_stack ext_entry ext_entry_desc set_chars_eis index_chars_eis divide_fx3 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. alloc_cb_file com_err_ cv_dec_check_ expand_path_ free_cb_file hcs_$fs_get_mode hcs_$get_max_length_seg hcs_$initiate hcs_$make_seg hcs_$set_bc_seg hcs_$status_long hcs_$terminate_noname hcs_$truncate_seg iox_$look_iocb iox_$propagate msf_manager_$adjust msf_manager_$close msf_manager_$get_ptr msf_manager_$open open_blk_file open_indx_file open_seq_file open_uns_file set_lock_$lock set_lock_$unlock sub_err_ vfile_io_control vfile_status_$seg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$bad_file error_table_$dirseg error_table_$file_busy error_table_$incompatible_attach error_table_$invalid_lock_reset error_table_$moderr error_table_$negative_nelem error_table_$no_operation error_table_$no_s_permission error_table_$noarg error_table_$not_detached error_table_$pathlong LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 622 000341 627 000354 629 000357 630 000361 631 000362 633 000363 24 000366 39 000412 40 000416 41 000417 44 000423 45 000454 51 000475 52 000500 56 000541 58 000544 61 000546 62 000551 63 000553 64 000557 65 000562 66 000565 67 000574 68 000575 70 000633 268 000634 271 000652 272 000657 273 000661 274 000663 275 000664 276 000670 277 000673 278 000674 280 000677 282 000702 284 000705 286 000717 289 000721 291 000732 293 000742 295 000752 297 000761 300 001007 303 001011 304 001016 305 001021 306 001030 309 001031 312 001052 314 001053 531 001055 316 001056 318 001057 320 001070 322 001102 330 001175 331 001176 332 001202 336 001207 338 001210 340 001211 341 001213 342 001215 343 001217 345 001300 348 001307 351 001325 352 001330 354 001331 358 001340 359 001343 363 001344 364 001346 365 001355 366 001356 368 001403 371 001450 374 001453 375 001456 379 001540 381 001624 382 001625 384 001634 387 001636 388 001637 389 001652 392 001674 395 001676 396 001711 399 001714 401 001735 404 001761 405 001776 421 001777 423 002000 425 002001 428 002005 429 002006 431 002016 432 002017 435 002022 438 002032 439 002035 440 002037 441 002040 443 002046 446 002047 448 002055 450 002062 452 002067 453 002072 456 002075 458 002076 460 002077 464 002160 472 002161 474 002162 475 002164 478 002231 480 002242 482 002243 484 002244 487 002247 490 002254 492 002265 495 002266 496 002311 501 002316 502 002320 503 002322 504 002323 507 002326 508 002330 513 002332 541 002333 543 002360 546 002365 549 002413 552 002437 553 002442 555 002443 557 002460 558 002461 559 002466 560 002470 561 002476 563 002521 564 002526 565 002530 566 002534 567 002537 568 002546 569 002547 571 002550 574 002563 575 002567 576 002571 577 002572 578 002575 579 002604 581 002617 72 002620 74 002621 76 002632 80 002652 81 002653 82 002656 84 002664 86 002675 88 002720 91 002734 94 002741 95 002743 96 002745 98 002753 99 002754 102 002761 103 002763 104 002765 106 002772 107 002773 109 003003 111 003013 114 003020 115 003022 116 003024 117 003025 119 003035 121 003045 123 003055 125 003072 127 003102 129 003112 134 003133 135 003134 136 003152 137 003154 138 003155 140 003165 141 003170 143 003172 146 003174 147 003211 148 003214 156 003301 159 003302 161 003304 164 003307 165 003355 168 003360 169 003361 170 003363 174 003366 176 003367 178 003370 179 003376 180 003423 183 003425 184 003440 185 003445 186 003452 187 003457 188 003464 189 003471 190 003476 191 003503 192 003510 193 003515 194 003520 195 003525 196 003527 197 003534 198 003541 199 003562 200 003567 201 003572 202 003573 203 003610 204 003625 205 003657 206 003672 208 003707 210 003724 212 003740 214 003755 216 003772 218 004007 220 004024 222 004041 224 004056 227 004061 228 004115 230 004120 232 004135 235 004140 236 004152 237 004232 238 004233 241 004236 242 004250 243 004331 244 004332 246 004347 249 004352 250 004364 252 004420 253 004423 266 004427 533 004430 535 004431 537 004445 539 004466 ----------------------------------------------------------- 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