/* The procedure cobol_open_gen.pl1 generates the code which realizes the COBOL open statement. Two important indicators are involved, cobol_mode and multics_mode. OPEN fn eos (repeated if necessary) eos d=00 input 01 output 10 i-o 11 extend f=00 rewind 01 no-rewind 10 reversed verb=19 cobol_mode 1 e, str 5 e, seq 17 i, str 21 i, seq 25,26,27 i,rel(seq, ran, dyn) 29,30,31 i,ind(seq, ran, dyn) 37 i-o, seq 41,42,43 i-o,rel(seq, ran, dyn) 45,46,47 i-o, ind(seq, ran, dyn) 49 o, str 53 o, seq 57,58,59 o, rel(seq, ran, dyn) 61,62,63 o, ind(seq, ran, dyn) cobol_mode(multics_mode) COBOL verbs org=seq i 21(4) fr first record read o 53(5) eof write i-o 37(5,7) fr read rewrite e 5(6) eof(append bit = "1"b) write org=rel acc=seq i 25(8) fr read,start o 57(9) eof. write i-o 41(9,10) fr i-verbs modify acc=ran i 26(11) fr read o 58(12) eof write i-o 42(12,13) fr i,o-verbs modify acc=dyn i 27(8) fr read,start o 59(9,10) fr write i-o 43(9,10) fr i,o-verbs modify org=ind acc=seq i 29(8) fr read_next,start o 61(9) eof write 61(9,10) if alt keys i-o 45(10) fr i-verbs modify acc=ran i 30(11) fr read_key o 62(12) eof write i-o 46(12,13) fr i,o-verbs modify acc=dyn i 31(8) fr read,start o 63(9,10) fr write i-o 47(9,10) fr i,o-verbs modify org=str i 17(1) fb first byte o 49(2) eof e 1(2) eof last_cobol_op 1 open 5 read_key 2 close 6 rewrite 3 start 7 delete 4 read_next 8 write multics_mode 1,2,3 stream_(i o i-o) 4,5,6,7 seq_(i o i-o u) 8,9,10 k_s_(i o u) 11,12,13 d_(i o u) 1 mp based 2 n fixed bin 2 ptr(1) ptr type-1("OPEN") 2 ptr(2) ptr type-12(fn) 2 ptr(3) ptr eos Flow Chart alt_sw = file_table.organization = 3 ind & file_table.alternate_keys ^= 0 alt_output = alt_sw & cobol_mode = 61 TAG(ioerror.retry_tag) if file_table.external then OP30(open_ext_file,good_tag) else OP31(open_int_file,good_tag) GEN_IOERROR TAG(good_tag): OP32(find_iocb,iocb_tag) GEN_IOERROR TAG(iocb_tag): if file_table.external then OP33(check_attach,attach_tag) call ATTACH_OPTIONS_STRING OP34(attach_iocb,attach_tag);GEN_IOERROR TAG(attach_tag): OP37(check_file,open_tag1) if alt_output | cobol_mode = 59 o(rel-dyn) | cobol_mode = 63 o(ind-dyn) then OP36(open_close_file,open_tag2);GEN_IOERROR TAG(open_tag2): OP35(open_file,open_tag1) if alt_output | multics_mode = 10 k_s_u | ( multics_mode = 13 d_u & cobol_mode < 48 i,o ) | multics_mode = 7 seq_u then OP29(close_op_file,open_tag2) GEN_IOERROR TAG(open_tag1): if alt_sw then IO_UTIL$FILE_DESC;OP78(alt_open_file,0);SET_FSBPTR if file_table.linage then OP24(set_line_file_status,0) else OP25(set_file_status,0) return; ATTACH_OPTIONS_STRING: proc; if file_table.device = 7 device is unattached then IOERROR(10) else if file_table.eao_len > 0 explicit options then IO_UTIL$MOVE_LIT else do; if file_table.catalogued < 2 no pathname & file_table.device ^= 5 non-tape then do; end; else if file_table.catalogued then do; end; else do; end; if file_table.device = 5 tape then do; end; else do; extend_sw => " -extend" file_table.dup__alt => " dup_ok" end; end; end; */ %include cobol_opr_open; */ ----------------------------------------------------------- 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 */