COMPILATION LISTING OF SEGMENT lister_assign_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-05-04_1649.82_Thu_mdt 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 /* Program to assign specific value to specified field(s) in lister record(s). 19* 20* Written by Paul W. Benjamin, August 13, 1980. 21* Modified 811022 by PB to not allocate null fields. 22**/ 23 24 lister_assign_: 25 procedure (bv_in_file_ptr, bv_select_all, bv_selected_records_ptr, bv_assign_info_ptr) options (packed_decimal); 26 27 /* parameters */ 28 29 declare ( 30 bv_in_file_ptr ptr, 31 bv_select_all bit (1) aligned, 32 bv_selected_records_ptr ptr, 33 bv_assign_info_ptr ptr 34 ) parameter; 35 36 /* automatic */ 37 38 declare ( 39 assign_info_ptr ptr, 40 i fixed bin, 41 j fixed bin, 42 select_all bit (1) aligned, 43 selected_records_ptr ptr 44 ); 45 46 /* based */ 47 48 declare assign_string char (assign_length (j)) based (assign_ptr (j)); 49 50 declare 1 assign_info (0:field_table.max_field_index) aligned based (assign_info_ptr), 51 2 assign_ptr ptr, 52 2 assign_length fixed bin (21); 53 54 /* builtin */ 55 56 declare (hbound, lbound, null) 57 builtin; 58 59 /* include file */ 60 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 -------------------------------- */ 61 62 63 /* main program */ 64 65 in_file_ptr = bv_in_file_ptr; /* Copy arguments */ 66 select_all = bv_select_all; 67 selected_records_ptr = bv_selected_records_ptr; 68 assign_info_ptr = bv_assign_info_ptr; 69 70 field_table_ptr = input_file.field_table_offset; 71 72 if select_all 73 then do recordp = input_file.record_head repeat input_record.next while (recordp ^= null); 74 do j = 0 to field_table.max_field_index; /* modify all records */ 75 if assign_ptr (j) ^= null 76 then do; 77 if input_record.field (j) ^= null /* free old field */ 78 then do; 79 free input_record.field (j) -> atom; 80 input_record.field (j) = null; 81 end; 82 atom_length = assign_length (j); 83 if atom_length ^= 0 /* allocate if non-null */ 84 then do; 85 allocate atom in (input_file.area) set (atomp); 86 input_record.field (j) = atomp; 87 atom = assign_string; 88 end; 89 end; 90 end; 91 end; 92 else if selected_records_ptr ^= null 93 then do i = lbound (selected_records_ptr -> list_node.list (*), 1) 94 to hbound (selected_records_ptr -> list_node.list (*), 1); 95 do j = 0 to field_table.max_field_index; /* modify selected records */ 96 if assign_ptr (j) ^= null () 97 then do; 98 recordp = selected_records_ptr -> list_node.list (i); 99 if input_record.field (j) ^= null 100 then do; 101 free input_record.field (j) -> atom; 102 input_record.field (j) = null; 103 end; 104 atom_length = assign_length (j); 105 if atom_length ^= 0 106 then do; 107 allocate atom in (input_file.area) set (atomp); 108 input_record.field (j) = atomp; 109 atom = assign_string; 110 end; 111 end; 112 end; 113 end; 114 end; 115 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/04/00 1649.8 lister_assign_.pl1 >udd>sm>ds>w>ml>lister_assign_.pl1 61 1 11/06/84 1047.7 lister_structures.incl.pl1 >ldd>incl>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. area 10 based area(261112) level 2 dcl 1-14 ref 70 72 79 85 86 91 101 107 108 assign_info based structure array level 1 dcl 50 assign_info_ptr 000100 automatic pointer dcl 38 set ref 68* 75 82 87 87 96 104 109 109 assign_length 2 based fixed bin(21,0) array level 2 dcl 50 ref 82 87 104 109 assign_ptr based pointer array level 2 dcl 50 ref 75 87 96 109 assign_string based char packed unaligned dcl 48 ref 87 109 atom based varying char dcl 1-71 set ref 79 85 87* 101 107 109* atom_length 000110 automatic fixed bin(17,0) initial dcl 1-71 set ref 79 82* 83 85 87 101 104* 105 107 109 1-71* atomp 000112 automatic pointer dcl 1-71 set ref 85* 86 87 107* 108 109 bv_assign_info_ptr parameter pointer dcl 29 ref 24 68 bv_in_file_ptr parameter pointer dcl 29 ref 24 65 bv_select_all parameter bit(1) dcl 29 ref 24 66 bv_selected_records_ptr parameter pointer dcl 29 ref 24 67 field 2 based offset array level 2 dcl 1-50 set ref 77 79 80* 86* 99 101 102* 108* field_table based structure level 1 dcl 1-79 field_table_offset based offset level 2 dcl 1-14 ref 70 field_table_ptr 000114 automatic pointer dcl 1-75 set ref 70* 74 95 hbound builtin function dcl 56 ref 92 i 000102 automatic fixed bin(17,0) dcl 38 set ref 92* 98* in_file_ptr 000116 automatic pointer dcl 1-75 set ref 65* 70 70 72 72 79 85 86 91 101 107 108 input_file based structure level 1 dcl 1-14 input_record based structure level 1 dcl 1-50 j 000103 automatic fixed bin(17,0) dcl 38 set ref 74* 75 77 79 80 82 86 87 87* 95* 96 99 101 102 104 108 109 109* lbound builtin function dcl 56 ref 92 list 2 based pointer array level 2 dcl 1-137 ref 92 92 98 list_node based structure level 1 dcl 1-137 max_field_index 0(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 1-79 ref 74 95 next based offset level 2 dcl 1-50 ref 91 null builtin function dcl 56 ref 72 75 77 80 92 96 99 102 record_head 1 based offset level 2 dcl 1-14 ref 72 recordp 000120 automatic pointer dcl 1-75 set ref 72* 72* 77 79 80 86* 91 98* 99 101 102 108 select_all 000104 automatic bit(1) dcl 38 set ref 66* 72 selected_records_ptr 000106 automatic pointer dcl 38 set ref 67* 92 92 92 98 size based fixed bin(17,0) level 2 dcl 1-137 ref 92 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 MIN_FIELD_INDEX internal static fixed bin(17,0) initial dcl 1-135 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 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 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 NAME DECLARED BY EXPLICIT CONTEXT. lister_assign_ 000011 constant entry external dcl 24 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 346 356 320 356 Length 534 320 10 141 25 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME lister_assign_ 122 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME lister_assign_ 000100 assign_info_ptr lister_assign_ 000102 i lister_assign_ 000103 j lister_assign_ 000104 select_all lister_assign_ 000106 selected_records_ptr lister_assign_ 000110 atom_length lister_assign_ 000112 atomp lister_assign_ 000114 field_table_ptr lister_assign_ 000116 in_file_ptr lister_assign_ 000120 recordp lister_assign_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry pointer_hard offset_hard op_alloc_ op_freen_ 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 24 000004 1 71 000016 65 000017 66 000023 67 000026 68 000031 70 000034 72 000040 74 000052 75 000063 77 000071 79 000076 80 000111 82 000115 83 000121 85 000122 86 000133 87 000142 90 000156 91 000160 92 000167 95 000203 96 000213 98 000221 99 000226 101 000232 102 000245 104 000251 105 000255 107 000256 108 000267 109 000276 112 000312 113 000314 114 000316 ----------------------------------------------------------- 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