COMPILATION LISTING OF SEGMENT lister_create_record_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/84 1154.1 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* LISTER_CREATE_RECORD_ - Program to create a new, empty record in a specified file. 19* Written by PG. 20* Modified 760427 by PG to add $after entry. 21* Modified 770707 by PG to keep output_file.n_records accurate, and to rename 22* from assist_create_record_ to lister_create_record_. 23* Modified 800825 by PB to assign uid. 24**/ 25 26 /* format: style3 */ 27 lister_create_record_: 28 procedure (bv_in_file_ptr) returns (ptr) options (packed_decimal); 29 30 /* parameters */ 31 32 declare (bv_in_file_ptr, bv_previous_record_ptr) 33 ptr parameter, 34 bv_retained_uid fixed bin (24) unsigned unaligned parameter; 35 36 /* builtins */ 37 38 declare (hbound, null) builtin; 39 40 /* automatic */ 41 42 declare flx fixed bin, 43 previous_record_ptr ptr, 44 retained_uid fixed bin (24) unsigned unaligned; 45 46 /* include files */ 47 1 1 /* ====== BEGIN INCLUDE FILE lister_structures.incl.pl1 ================================ */ 1 2 1 3 /* 1 4* Modified 800813 by PB to add PUT_UID to listform declarations. 1 5* Modified 800825 by PB for version 2 lister file. 1 6* Modified 840523 by PB to add SELECT_BEG and SELECT_END. 1 7**/ 1 8 /* MASTER DECLARATIONS */ 1 9 1 10 /* format: style3 */ 1 11 dcl lister_file_version_2 1 12 fixed bin initial (2) internal static options (constant); 1 13 1 14 dcl 1 input_file based (in_file_ptr) aligned, 1 15 2 ( 1 16 field_table_offset, 1 17 record_head, 1 18 record_tail, 1 19 unused (2) 1 20 ) offset (input_file.area), 1 21 2 next_uid fixed bin (24) unsigned, 1 22 2 version fixed bin, 1 23 2 n_records fixed bin (17), 1 24 2 area area (261112); 1 25 1 26 dcl 1 update_file based (up_file_ptr) aligned, 1 27 2 ( 1 28 field_table_offset, 1 29 record_head, 1 30 record_tail, 1 31 unused (2) 1 32 ) offset (update_file.area), 1 33 2 next_uid fixed bin (24) unsigned, 1 34 2 version fixed bin, 1 35 2 n_records fixed bin (17), 1 36 2 area area (261112); 1 37 1 38 dcl 1 output_file based (out_file_ptr) aligned, 1 39 2 ( 1 40 field_table_offset, 1 41 record_head, 1 42 record_tail, 1 43 unused (2) 1 44 ) offset (output_file.area), 1 45 2 next_uid fixed bin (24) unsigned, 1 46 2 version fixed bin, 1 47 2 n_records fixed bin (17), 1 48 2 area area (261112); 1 49 1 50 dcl 1 input_record based (recordp) aligned, 1 51 2 next offset (input_file.area), 1 52 2 uid fixed bin (24) unsigned unaligned, 1 53 2 max_field_index fixed bin (12) unsigned unaligned, 1 54 2 field dim (0:field_table.max_field_index refer (input_record.max_field_index)) 1 55 offset (input_file.area); 1 56 1 57 dcl 1 update_record based aligned, 1 58 2 next offset (update_file.area), 1 59 2 uid fixed bin (24) unsigned unaligned, 1 60 2 max_field_index fixed bin (12) unsigned unaligned, 1 61 2 field dim (0:field_table.max_field_index refer (update_record.max_field_index)) 1 62 offset (update_file.area); 1 63 1 64 dcl 1 output_record based aligned, 1 65 2 next offset (output_file.area), 1 66 2 uid fixed bin (24) unsigned unaligned, 1 67 2 max_field_index fixed bin (12) unsigned unaligned, 1 68 2 field dim (0:field_table.max_field_index refer (output_record.max_field_index)) 1 69 offset (output_file.area); 1 70 1 71 dcl atom char (atom_length) based (atomp) varying aligned, 1 72 atom_length fixed bin initial (0), /* for table option */ 1 73 atomp ptr; 1 74 1 75 dcl (fidp, field_table_ptr, format_table_ptr, in_file_ptr, ltp, recordp, select_ptr, out_file_ptr, up_file_ptr) 1 76 ptr, 1 77 n fixed bin; 1 78 1 79 dcl 1 field_table based (field_table_ptr) aligned, 1 80 2 record_delimiter 1 81 unal char (1), 1 82 2 field_delimiter unal char (1), 1 83 2 max_field_index unal fixed bin (17), 1 84 2 hash_field_id_to_index 1 85 dimension (0:18) offset, 1 86 2 index_to_field_id 1 87 dimension (0:n refer (field_table.max_field_index)) offset; 1 88 1 89 dcl 1 field_identifier based (fidp) aligned, 1 90 2 next offset, 1 91 2 field_index unal fixed bin (17), 1 92 2 size unal fixed bin (17), 1 93 2 string unal char (n refer (field_identifier.size)); 1 94 1 95 dcl system_area area (261120) based (area_ptr); 1 96 dcl area_ptr ptr; 1 97 1 98 /* LISTFORM DECLARATIONS */ 1 99 1 100 declare ( 1 101 PUT_LITERAL initial (-1), 1 102 PUT_SPACES initial (-2), 1 103 PUT_END initial (-3), 1 104 PUT_DATE initial (-4), 1 105 PUT_TIME initial (-5), 1 106 PUT_RECORD_COUNT initial (-6), 1 107 PUT_ARGUMENT initial (-7), 1 108 PUT_UID initial (-8) 1 109 ) fixed bin internal static; 1 110 1 111 dcl 1 format_table aligned based (format_table_ptr), 1 112 2 size fixed bin (17) unal, 1 113 2 before fixed bin (17) unal, 1 114 2 after fixed bin (17) unal, 1 115 2 record fixed bin (17) unal, 1 116 2 literal_table ptr, 1 117 2 item dim (n refer (format_table.size)), 1 118 3 action fixed bin (17) unal, 1 119 3 justification bit (2) unal, 1 120 3 argument_number 1 121 fixed bin (15) unal, 1 122 3 width fixed bin (21); 1 123 1 124 dcl 1 literal_table aligned based (ltp), 1 125 2 size fixed bin, /* number of slots allocated */ 1 126 2 n_literals fixed bin, /* number of slots in use */ 1 127 2 literal dim (n refer (literal_table.size)) ptr unal; 1 128 1 129 dcl ( 1 130 flush_left initial ("00"b), 1 131 center initial ("01"b), 1 132 flush_right initial ("10"b) 1 133 ) bit (2) aligned internal static options (constant); 1 134 1 135 dcl MIN_FIELD_INDEX fixed bin initial (0) internal static options (constant); 1 136 1 137 dcl 1 list_node aligned based, 1 138 2 size fixed bin, 1 139 2 list dimension (n refer (list_node.size)) ptr; 1 140 1 141 /* SELECT DECLARATIONS */ 1 142 1 143 dcl 1 select_expression based (select_ptr) aligned, 1 144 2 literal_table_ptr 1 145 ptr, 1 146 2 size fixed bin, 1 147 2 last_element fixed bin, 1 148 2 element dim (n refer (select_expression.size)), 1 149 3 opcode unal bit (9), 1 150 3 not unal bit (1), 1 151 3 top unal bit (1), 1 152 3 unused unal bit (7), 1 153 3 field_index unal fixed bin (8), 1 154 3 literal_index unal fixed bin (8), 1 155 1 element aligned, 1 156 2 opcode fixed bin, 1 157 2 not bit (1) aligned, 1 158 2 top bit (1) aligned, 1 159 2 field_index fixed bin, 1 160 2 literal_index fixed bin, 1 161 operand1 fixed bin defined (element.field_index), 1 162 operand2 fixed bin defined (element.literal_index); 1 163 1 164 dcl ( 1 165 SELECT_AND init ("000000001"b), 1 166 SELECT_OR init ("000000010"b), 1 167 SELECT_NOT init ("000000011"b), 1 168 SELECT_FIND init ("000000100"b), 1 169 SELECT_EQ init ("000000101"b), 1 170 SELECT_LT init ("000000110"b), 1 171 SELECT_GT init ("000000111"b), 1 172 SELECT_LE init ("000001000"b), 1 173 SELECT_GE init ("000001001"b), 1 174 SELECT_NEQ init ("000001010"b), 1 175 SELECT_NLT init ("000001011"b), 1 176 SELECT_NGT init ("000001100"b), 1 177 SELECT_NLE init ("000001101"b), 1 178 SELECT_NGE init ("000001110"b), 1 179 SELECT_BEG init ("000001111"b), 1 180 SELECT_END init ("000010000"b) 1 181 ) bit (9) aligned internal static; 1 182 1 183 dcl ( 1 184 ANY_FIELD init (-1), 1 185 NULL_FIELD init (-2), 1 186 NUMERIC_FIELD init (-3), 1 187 UID init (-4) 1 188 ) aligned fixed bin (8) static; 1 189 1 190 dcl 1 numeric_atom aligned based (atomp), 1 191 2 flag fixed bin (35), /* must be -1 */ 1 192 2 value float dec (29) unal; 1 193 1 194 dcl numeric_flag fixed bin (35) internal static initial (-1) options (constant); 1 195 1 196 /* SORT DECLARATIONS */ 1 197 1 198 declare n_items_to_sort fixed bin, 1 199 sort_list_ptr ptr; 1 200 1 201 declare 1 sort_list aligned based (sort_list_ptr), 1 202 2 n_keys fixed bin, 1 203 2 key (n_items_to_sort refer (sort_list.n_keys)), 1 204 3 field_index fixed bin, 1 205 3 ascending bit (1) aligned, 1 206 3 numeric bit (1) aligned; 1 207 1 208 /* MERGE DECLARATIONS */ 1 209 1 210 dcl ( 1 211 MERGE_ADD init (0), 1 212 MERGE_AND init (1), 1 213 MERGE_OR init (2), 1 214 MERGE_SUBTRACT init (3) 1 215 ) fixed bin internal static options (constant); 1 216 1 217 /* ------ END INCLUDE FILE lister_structures.incl.pl1 -------------------------------- */ 48 49 50 /* program */ 51 52 retained_uid = 0; 53 main: 54 call allocate_record; 55 56 if input_file.record_tail = null 57 then input_file.record_head = recordp; 58 else input_file.record_tail -> input_record.next = recordp; 59 60 input_file.record_tail = recordp; 61 input_record.next = null; 62 return (recordp); 63 64 retain_uid: 65 entry (bv_in_file_ptr, bv_retained_uid) returns (ptr); 66 67 retained_uid = bv_retained_uid; 68 goto main; 69 70 /* LISTER_CREATE_RECORD_$AFTER: - Entry to create a new, empty record that is 71* threaded into a specific place in the output file. Used by lister_merge_. 72* Written 760427 by PG. 73* */ 74 75 assist_create_record_$after: 76 entry (bv_in_file_ptr, bv_previous_record_ptr) returns (ptr); 77 78 previous_record_ptr = bv_previous_record_ptr; 79 retained_uid = 0; 80 call allocate_record; 81 82 if previous_record_ptr = null /* make new record 1st in file */ 83 then do; 84 input_record.next = input_file.record_head; 85 input_file.record_head = recordp; 86 87 if input_file.record_tail = null 88 then input_file.record_tail = recordp; 89 end; 90 else do; /* put new record before "previous_record" */ 91 input_record.next = previous_record_ptr -> input_record.next; 92 previous_record_ptr -> input_record.next = recordp; 93 end; 94 95 return (recordp); 96 97 allocate_record: 98 procedure; 99 100 in_file_ptr = bv_in_file_ptr; 101 field_table_ptr = input_file.field_table_offset; 102 103 allocate input_record in (input_file.area) set (recordp); 104 input_file.n_records = input_file.n_records + 1; 105 106 if retained_uid = 0 107 then do; 108 input_record.uid = input_file.next_uid; 109 input_file.next_uid = input_file.next_uid + 1; 110 end; 111 else input_record.uid = retained_uid; 112 113 do flx = MIN_FIELD_INDEX to hbound (input_record.field, 1); 114 input_record.field (flx) = null; 115 end; 116 117 return; 118 119 end allocate_record; 120 121 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/05/84 1151.5 lister_create_record_.pl1 >special_ldd>online>6883-11/02/84>lister_create_record_.pl1 48 1 11/02/84 1208.5 lister_structures.incl.pl1 >special_ldd>online>6883-11/02/84>lister_structures.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. MIN_FIELD_INDEX constant fixed bin(17,0) initial dcl 1-135 ref 113 area 10 based area(261112) level 2 dcl 1-14 ref 56 58 58 60 85 87 92 101 103 atom_length 000105 automatic fixed bin(17,0) initial dcl 1-71 set ref 1-71* bv_in_file_ptr parameter pointer dcl 32 ref 27 64 75 100 bv_previous_record_ptr parameter pointer dcl 32 ref 75 78 bv_retained_uid parameter fixed bin(24,0) unsigned unaligned dcl 32 ref 64 67 field 2 based offset array level 2 dcl 1-50 set ref 113 114* field_table based structure level 1 dcl 1-79 field_table_offset based offset level 2 dcl 1-14 ref 101 field_table_ptr 000106 automatic pointer dcl 1-75 set ref 101* 103 103 flx 000100 automatic fixed bin(17,0) dcl 42 set ref 113* 114* hbound builtin function dcl 38 ref 113 in_file_ptr 000110 automatic pointer dcl 1-75 set ref 56 56 56 58 58 58 60 60 84 85 85 87 87 87 92 100* 101 101 103 104 104 108 109 109 input_file based structure level 1 dcl 1-14 input_record based structure level 1 dcl 1-50 set ref 103 max_field_index 0(18) based fixed bin(17,0) level 2 in structure "field_table" packed unaligned dcl 1-79 in procedure "lister_create_record_" ref 103 103 max_field_index 1(24) based fixed bin(12,0) level 2 in structure "input_record" packed unsigned unaligned dcl 1-50 in procedure "lister_create_record_" set ref 103* 113 n_records 7 based fixed bin(17,0) level 2 dcl 1-14 set ref 104* 104 next based offset level 2 dcl 1-50 set ref 58* 61* 84* 91* 91 92* next_uid 5 based fixed bin(24,0) level 2 unsigned dcl 1-14 set ref 108 109* 109 null builtin function dcl 38 ref 56 61 82 87 114 previous_record_ptr 000102 automatic pointer dcl 42 set ref 78* 82 91 92 record_head 1 based offset level 2 dcl 1-14 set ref 56* 84 85* record_tail 2 based offset level 2 dcl 1-14 set ref 56 58 60* 87 87* recordp 000112 automatic pointer dcl 1-75 set ref 56 58 60 61 62 84 85 87 91 92 95 103* 108 111 113 114 retained_uid 000104 automatic fixed bin(24,0) unsigned unaligned dcl 42 set ref 52* 67* 79* 106 111 uid 1 based fixed bin(24,0) level 2 packed unsigned unaligned dcl 1-50 set ref 108* 111* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ANY_FIELD internal static fixed bin(8,0) initial dcl 1-183 MERGE_ADD internal static fixed bin(17,0) initial dcl 1-210 MERGE_AND internal static fixed bin(17,0) initial dcl 1-210 MERGE_OR internal static fixed bin(17,0) initial dcl 1-210 MERGE_SUBTRACT internal static fixed bin(17,0) initial dcl 1-210 NULL_FIELD internal static fixed bin(8,0) initial dcl 1-183 NUMERIC_FIELD internal static fixed bin(8,0) initial dcl 1-183 PUT_ARGUMENT internal static fixed bin(17,0) initial dcl 1-100 PUT_DATE internal static fixed bin(17,0) initial dcl 1-100 PUT_END internal static fixed bin(17,0) initial dcl 1-100 PUT_LITERAL internal static fixed bin(17,0) initial dcl 1-100 PUT_RECORD_COUNT internal static fixed bin(17,0) initial dcl 1-100 PUT_SPACES internal static fixed bin(17,0) initial dcl 1-100 PUT_TIME internal static fixed bin(17,0) initial dcl 1-100 PUT_UID internal static fixed bin(17,0) initial dcl 1-100 SELECT_AND internal static bit(9) initial dcl 1-164 SELECT_BEG internal static bit(9) initial dcl 1-164 SELECT_END internal static bit(9) initial dcl 1-164 SELECT_EQ internal static bit(9) initial dcl 1-164 SELECT_FIND internal static bit(9) initial dcl 1-164 SELECT_GE internal static bit(9) initial dcl 1-164 SELECT_GT internal static bit(9) initial dcl 1-164 SELECT_LE internal static bit(9) initial dcl 1-164 SELECT_LT internal static bit(9) initial dcl 1-164 SELECT_NEQ internal static bit(9) initial dcl 1-164 SELECT_NGE internal static bit(9) initial dcl 1-164 SELECT_NGT internal static bit(9) initial dcl 1-164 SELECT_NLE internal static bit(9) initial dcl 1-164 SELECT_NLT internal static bit(9) initial dcl 1-164 SELECT_NOT internal static bit(9) initial dcl 1-164 SELECT_OR internal static bit(9) initial dcl 1-164 UID internal static fixed bin(8,0) initial dcl 1-183 area_ptr automatic pointer dcl 1-96 atom based varying char dcl 1-71 atomp automatic pointer dcl 1-71 center internal static bit(2) initial dcl 1-129 element automatic structure level 1 dcl 1-143 fidp automatic pointer dcl 1-75 field_identifier based structure level 1 dcl 1-89 flush_left internal static bit(2) initial dcl 1-129 flush_right internal static bit(2) initial dcl 1-129 format_table based structure level 1 dcl 1-111 format_table_ptr automatic pointer dcl 1-75 list_node based structure level 1 dcl 1-137 lister_file_version_2 internal static fixed bin(17,0) initial dcl 1-11 literal_table based structure level 1 dcl 1-124 ltp automatic pointer dcl 1-75 n automatic fixed bin(17,0) dcl 1-75 n_items_to_sort automatic fixed bin(17,0) dcl 1-198 numeric_atom based structure level 1 dcl 1-190 numeric_flag internal static fixed bin(35,0) initial dcl 1-194 operand1 defined fixed bin(17,0) dcl 1-143 operand2 defined fixed bin(17,0) dcl 1-143 out_file_ptr automatic pointer dcl 1-75 output_file based structure level 1 dcl 1-38 output_record based structure level 1 dcl 1-64 select_expression based structure level 1 dcl 1-143 select_ptr automatic pointer dcl 1-75 sort_list based structure level 1 dcl 1-201 sort_list_ptr automatic pointer dcl 1-198 system_area based area(261120) dcl 1-95 up_file_ptr automatic pointer dcl 1-75 update_file based structure level 1 dcl 1-26 update_record based structure level 1 dcl 1-57 NAMES DECLARED BY EXPLICIT CONTEXT. allocate_record 000164 constant entry internal dcl 97 ref 53 80 assist_create_record_$after 000110 constant entry external dcl 75 lister_create_record_ 000014 constant entry external dcl 27 main 000027 constant label dcl 53 ref 68 retain_uid 000065 constant entry external dcl 64 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 322 332 245 332 Length 532 245 10 164 54 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME lister_create_record_ 88 external procedure is an external procedure. allocate_record internal procedure shares stack frame of external procedure lister_create_record_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME lister_create_record_ 000100 flx lister_create_record_ 000102 previous_record_ptr lister_create_record_ 000104 retained_uid lister_create_record_ 000105 atom_length lister_create_record_ 000106 field_table_ptr lister_create_record_ 000110 in_file_ptr lister_create_record_ 000112 recordp lister_create_record_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry pointer_hard offset_hard alloc_based NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1 71 000005 27 000010 52 000025 53 000027 56 000030 58 000041 60 000050 61 000054 62 000056 64 000061 67 000076 68 000103 75 000104 78 000121 79 000125 80 000127 82 000130 84 000134 85 000137 87 000143 89 000151 91 000152 92 000154 95 000161 97 000164 100 000165 101 000171 103 000175 104 000210 106 000212 108 000215 109 000220 110 000221 111 000222 113 000224 114 000235 115 000241 117 000243 ----------------------------------------------------------- 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