/* The procedure cobol_read_gen.pl1 generates code which realizes the COBOL read statement . READ fn [id] eos eos a=000 neither 001 END 010 INVALID b=0 no INTO 1 INTO c=0 no KEY 1 KEY d=00 no NEXT 01 NEXT e key number f=00 no NOT 01 NOT verb=21 mp.n 3-4 mp.ptr(1) type-1("READ") mp.ptr(2) type-12(file-name) mp.ptr(3) type-9(INTO id) mp.ptr(n) eos org=rel acc=seq 1: read[next][end] acc=ran 1: read[invalid] acc=dyn 1: read next[end] 2: read[invalid] org=ind acc=seq 1: read[next] acc=ran 2: read[key][invalid] acc=dyn 1: read next[end] 2: read[key][invalid] Flow Chart read_next_sw = file_table.access < 2 seq | end_stmt.d = "01"b read next alt_sw = file_table.organization = 3 ind & file_table.alternate_keys ^= 0 TAG(ioerror.retry_error): OP63(init_read,ntag) GEN_IOERROR TAG(ntag): if file_table.organization = 4 stream then do; OP64(get_line,ntag);GEN_IOERROR TAG(ntag): end; else do; if file_table.access = 3 dyn & ( file_table.external | file_table.open_ext ) then do; INCR_NTAG OP54(delete_error,ntag);GEN_ERROR TAG(ntag): end; iosw = file_table.access < 2 seq & ( file_table.external | file_table.delete | file_table.write ) if read_next_sw then do; if ( file_organization>1 not-seq & iosw & file_table.access < 2 seq ) | ( file_table.organization = 2 rel & file_table.relative_key ) then do; INCR_NTAG OP69(read_key_for_read,ntag);GEN_IOERROR TAG(ntag): end; else do; if alt_sw then do; INCR_NTAG IO_UTIL$FILE_DESC OP92(alt_find_rec,ntag,skip_read_tag) TAG(ntag): SET_FSBPTR end; end; end else do; if alt_sw then do; IO_UTIL$FILE_KEY(0,0) IO_UTIL$FILE_DESC IO_UTIL$FILE_NUM OP84(alt_read_key) SET_FSBPTR end; INCR_NTAG OP67(read_seek_key,ntag);GEN_IOERROR TAG(ntag): end; INCR_NTAG if read_next_sw then do; OP65(read_record,ntag) if alt_sw then do; TAG(skip_read_tag): end; else OP66(nonseq_read_tag,ntag) TAG(ntag): if alt_sw then do; IO_UTIL$FILE_DESC SET_FSBPTR if read_next_sw then OP80(alt_read_next,0) else OP81(alt_read_key,0) end; end; */ %include cobol_opr_read; */ ----------------------------------------------------------- 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 */