COMPILATION LISTING OF SEGMENT merge Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/11/82 1228.9 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 /* Modified on 01/25/82 by FCH, [1], number of input files = 10 */ 11 12 merge: proc; 13 14 /* EXTERNAL ENTRIES */ 15 dcl clock_ entry returns(fixed bin(71)); 16 dcl com_err_ entry options(variable); 17 dcl command_query_ entry options(variable); 18 dcl cpu_time_and_paging_ entry(fixed bin, fixed bin(71), fixed bin); 19 dcl cu_$arg_count entry(fixed bin), 20 cu_$arg_list_ptr entry(ptr); 21 dcl hcs_$get_process_usage entry(ptr, fixed bin(35)); 22 dcl hcs_$truncate_seg entry(ptr, fixed bin(24), fixed bin(35)), 23 hcs_$delentry_seg entry(ptr, fixed bin(35)), 24 hcs_$terminate_noname entry(ptr, fixed bin(35)); 25 dcl unique_chars_ entry(bit(*)) returns(char(15)); 26 27 dcl merge_$merge_private entry((*)char(*), char(*), (*)ptr, char(*), fixed bin(35)); 28 dcl sort_merge_command entry((*)char(*), char(*), (1)ptr, char(*), char(*), fixed bin(17), 29 bit(1), bit(1), bit(1), fixed bin(35), fixed bin(35), 30 float bin(27), fixed bin, ptr, ptr, ptr); 31 dcl sort_merge_command_finish entry(fixed bin(35), fixed bin(35), bit(1), bit(1)); 32 dcl sort_merge_sub_error entry; 33 34 /* EXTERNAL STATIC */ 35 1 1 dcl 1 sort_ext$acl(1) ext, 1 2 2 x_user_id char(32), 1 3 2 x_modes bit(36), 1 4 2 x_pad bit(36), 1 5 2 x_acl_code fixed bin(35); 1 6 dcl 1 acl(1) 1 7 defined(sort_ext$acl), 1 8 2 user_id char(32), 1 9 2 modes bit(36), 1 10 2 pad bit(36), 1 11 2 acl_code fixed bin(35); 1 12 dcl sort_ext$b(0: 31) fixed bin(30) ext; /* keys - bit offset (usually) for sort_comp */ 1 13 dcl b(0: 31) fixed bin(30) 1 14 defined (sort_ext$b); 1 15 dcl sort_ext$compares_counter fixed bin(34) ext; /* compares executed, excluding sequence checker */ 1 16 dcl compares_counter fixed bin(34) 1 17 defined(sort_ext$compares_counter); 1 18 dcl sort_ext$compare_sw fixed bin(1) ext; /* 1 = user compare exit specified */ 1 19 dcl compare_sw fixed bin(1) 1 20 defined (sort_ext$compare_sw); 1 21 dcl sort_ext$curr_input_file_attach char(256) ext; /* attach description, current input file (Sort) */ 1 22 dcl curr_input_file_attach char(256) 1 23 defined(sort_ext$curr_input_file_attach); 1 24 dcl sort_ext$curr_input_file_name char(256) ext; /* pathname, current input file (Sort) */ 1 25 dcl curr_input_file_name char(256) 1 26 defined (sort_ext$curr_input_file_name); 1 27 dcl sort_ext$curr_input_file_num fixed bin(17) ext; /* number for current input file (Sort) */ 1 28 dcl curr_input_file_num fixed bin(17) 1 29 defined (sort_ext$curr_input_file_num); 1 30 dcl sort_ext$curr_output_file_attach char(256) ext; /* attach description, output file */ 1 31 dcl curr_output_file_attach char(256) 1 32 defined(sort_ext$curr_output_file_attach); 1 33 dcl sort_ext$curr_output_file_name char(256) ext; /* pathname, output file */ 1 34 dcl curr_output_file_name char(256) 1 35 defined (sort_ext$curr_output_file_name); 1 36 dcl sort_ext$debug_sw bit(1) ext; /* 1 = -debug argument specified */ 1 37 dcl debug_sw bit(1) 1 38 defined(sort_ext$debug_sw); 1 39 dcl sort_ext$disaster2 fixed bin(17) ext; /* 0 = first call to sort_return or merge_return */ 1 40 dcl disaster2 fixed bin(17) 1 41 defined (sort_ext$disaster2); 1 42 dcl sort_ext$dt(0: 31) fixed bin(30) ext; /* keys - datatype for sort_comp */ 1 43 dcl dt(0: 31) fixed bin(30) 1 44 defined (sort_ext$dt); 1 45 dcl sort_ext$input_driver_is_sort bit(1) ext; /* 1 = Sort reads input files, 0 = input_file exit */ 1 46 dcl input_driver_is_sort bit(1) 1 47 defined(sort_ext$input_driver_is_sort); 1 48 dcl sort_ext$input_file_exit_sw bit(1) ext; /* 1 = user input_file exit specified */ 1 49 dcl input_file_exit_sw bit(1) 1 50 defined(sort_ext$input_file_exit_sw); 1 51 dcl sort_ext$input_file_max fixed bin(17) ext; /* number of input files specified [init(10)] */ 1 52 /* must also change merge_return: merge_read_count & input_file_len */ 1 53 dcl input_file_max fixed bin(17) 1 54 defined(sort_ext$input_file_max); 1 55 dcl sort_ext$input_record_exit_sw fixed bin(1) ext; /* 1 = user input_record exit specified */ 1 56 dcl input_record_exit_sw fixed bin(1) 1 57 defined(sort_ext$input_record_exit_sw); 1 58 dcl sort_ext$input_rec_deleted fixed bin(30) ext; /* number of records deleted at input_record exit */ 1 59 dcl input_rec_deleted fixed bin(30) 1 60 defined(sort_ext$input_rec_deleted); 1 61 dcl sort_ext$input_rec_inserted fixed bin(30) ext; /* number of records inserted _record exit */ 1 62 dcl input_rec_inserted fixed bin(30) 1 63 defined(sort_ext$input_rec_inserted); 1 64 dcl sort_ext$in_buff_ptr ptr ext; /* buffer for an input record (Sort or Merge reading) */ 1 65 dcl in_buff_ptr ptr 1 66 defined (sort_ext$in_buff_ptr); 1 67 dcl sort_ext$leng(0: 31) fixed bin(30) ext; /* keys - length or precision for sort_comp */ 1 68 dcl leng(0: 31) fixed bin(30) 1 69 defined (sort_ext$leng); 1 70 dcl sort_ext$max1 fixed bin(30) ext; /* limits size of unsorted string SS (sort_release) */ 1 71 dcl max1 fixed bin(30) 1 72 defined (sort_ext$max1); 1 73 dcl sort_ext$max2 fixed bin(30) ext; /* limits size of unsorted string SS (sort_release) */ 1 74 dcl max2 fixed bin(30) 1 75 defined (sort_ext$max2); 1 76 dcl sort_ext$max3 fixed bin(30) ext; /* maximum number of records per string SS */ 1 77 dcl max3 fixed bin(30) 1 78 defined (sort_ext$max3); 1 79 dcl sort_ext$max4 fixed bin(30) ext; /* maximum merge order allowed (sort_presort) */ 1 80 dcl max4 fixed bin(30) 1 81 defined (sort_ext$max4); 1 82 dcl sort_ext$max_rec_length fixed bin(30) ext; /* maximum record length permitted by Sort or Merge; */ 1 83 /* slightly less than sys_info$max_seg_size */ 1 84 dcl max_rec_length fixed bin(30) 1 85 defined (sort_ext$max_rec_length); 1 86 dcl sort_ext$merge_compares fixed bin(34) ext; /* number of compares in merge */ 1 87 dcl merge_compares fixed bin(34) 1 88 defined(sort_ext$merge_compares); 1 89 dcl sort_ext$merge_in_iocb_ptrs(10) ptr ext; /* iox_ iocb's for Merge input files */ 1 90 dcl merge_in_iocb_ptrs(10) ptr 1 91 defined(sort_ext$merge_in_iocb_ptrs); 1 92 dcl sort_ext$merge_input_file_attaches(10) char(256) ext; /* attach descriptions, Merge input files */ 1 93 dcl merge_input_file_attaches(10) char(256) 1 94 defined(sort_ext$merge_input_file_attaches); 1 95 dcl sort_ext$merge_input_file_names(10) char(256) ext; /* pathnames, Merge input files */ 1 96 dcl merge_input_file_names(10) char(256) 1 97 defined(sort_ext$merge_input_file_names); 1 98 dcl sort_ext$mii fixed bin(17) ext; /* merge order for Sort [init(0)] */ 1 99 dcl mii fixed bin(17) 1 100 defined (sort_ext$mii); 1 101 dcl sort_ext$min_rec_length fixed bin(30) ext; /* record length required to include all key fields */ 1 102 dcl min_rec_length fixed bin(30) 1 103 defined (sort_ext$min_rec_length); 1 104 dcl sort_ext$mip (1000) fixed bin(30) ext; /* number of records in each string MS for merge */ 1 105 dcl mip (1000) fixed bin(30) 1 106 defined (sort_ext$mip); 1 107 dcl sort_ext$msp (1000) ptr ext; /* sorted strings MS(1:mii) to be merged */ 1 108 dcl msp (1000) ptr 1 109 defined (sort_ext$msp); 1 110 dcl sort_ext$no_of_keys fixed bin(30) ext; /* number of keys specified */ 1 111 dcl no_of_keys fixed bin(30) 1 112 defined(sort_ext$no_of_keys); 1 113 dcl sort_ext$old_input_file_num fixed bin(17) ext; /* used for identifying files with bad key data */ 1 114 dcl old_input_file_num fixed bin(17) /* (illegal_procedure handler in sort_presort) */ 1 115 defined(sort_ext$old_input_file_num); 1 116 dcl sort_ext$output_driver_is_sort bit(1) ext; /* 1 = Sort or Merge writes output file; */ 1 117 dcl output_driver_is_sort bit(1) /* 0 = output_file exit */ 1 118 defined(sort_ext$output_driver_is_sort); 1 119 dcl sort_ext$output_file_exit_sw bit(1) ext; /* 1 = user output_file exit specified */ 1 120 dcl output_file_exit_sw bit(1) 1 121 defined(sort_ext$output_file_exit_sw); 1 122 dcl sort_ext$output_rec_deleted fixed bin(30) ext; /* number of records deleted at output_record exit */ 1 123 dcl output_rec_deleted fixed bin(30) 1 124 defined(sort_ext$output_rec_deleted); 1 125 dcl sort_ext$output_rec_inserted fixed bin(30) ext; /* number of record inserted at output_record exit */ 1 126 dcl output_rec_inserted fixed bin(30) 1 127 defined(sort_ext$output_rec_inserted); 1 128 dcl sort_ext$output_record_exit_sw fixed bin(1) ext; /* 1 = user output_record exit specified */ 1 129 dcl output_record_exit_sw fixed bin(1) 1 130 defined(sort_ext$output_record_exit_sw); 1 131 dcl sort_ext$presort_compares fixed bin(34) ext; /* number of compares in presort */ 1 132 dcl presort_compares fixed bin(34) 1 133 defined(sort_ext$presort_compares); 1 134 dcl 1 sort_ext$pu(5) ext, 1 135 2 x_n fixed bin, /* [init((5) 1)] */ 1 136 2 x_rcpu fixed bin(71); 1 137 dcl 1 pu(5) 1 138 defined(sort_ext$pu), 1 139 2 n fixed bin, 1 140 2 rcpu fixed bin(71); 1 141 dcl sort_ext$read_count fixed bin(30) ext; /* number of records read by Sort (or by Merge) */ 1 142 dcl read_count fixed bin(30) 1 143 defined (sort_ext$read_count); 1 144 dcl sort_ext$rec_ptr_a ptr ext; /* buffer for output_record exit and sequence checker */ 1 145 dcl rec_ptr_a ptr 1 146 defined(sort_ext$rec_ptr_a); 1 147 dcl sort_ext$rec_ptr_b ptr ext; /* buffer for output_record exit and sequence checker */ 1 148 dcl rec_ptr_b ptr 1 149 defined(sort_ext$rec_ptr_b); 1 150 dcl sort_ext$release_count fixed bin(30) ext; /* number of records released to Sort (Merge) */ 1 151 dcl release_count fixed bin(30) 1 152 defined (sort_ext$release_count); 1 153 dcl sort_ext$report_sw bit(2) ext; /* 00 = print summary report, 01 = suppress */ 1 154 dcl report_sw bit(2) 1 155 defined (sort_ext$report_sw); 1 156 dcl sort_ext$return_count fixed bin(30) ext; /* number of records returned from Sort (Merge) */ 1 157 dcl return_count fixed bin(30) 1 158 defined (sort_ext$return_count); 1 159 dcl sort_ext$rev(0: 31) fixed bin(1) ext; /* keys - descending indicator for sort_comp */ 1 160 dcl rev(0: 31) fixed bin(1) 1 161 defined (sort_ext$rev); 1 162 dcl sort_ext$sii fixed bin(30) ext; /* number of records, current string (sort_release) */ 1 163 dcl sii fixed bin(30) 1 164 defined (sort_ext$sii); 1 165 dcl sort_ext$sip ptr ext; /* SI - tree of indices (subscripts) for records */ 1 166 dcl sip ptr /* being sorted or merged */ 1 167 defined (sort_ext$sip); 1 168 dcl sort_ext$sort_compare_exit variable /* entry point, user compare exit procedure */ 1 169 entry(ptr, ptr) returns(fixed bin(1)) ext; 1 170 dcl sort_ext$sort_desc_pn char(168) ext; /* pathname, Sort (Merge) Description segment */ 1 171 dcl sort_desc_pn char(168) 1 172 defined(sort_ext$sort_desc_pn); 1 173 dcl sort_ext$sort_input_record_exit variable /* entry point, user input_record exit procedure */ 1 174 entry(ptr, fixed bin(21), fixed bin, bit(1)) ext; 1 175 dcl sort_input_record_exit variable 1 176 entry(ptr, fixed bin(21), fixed bin, bit(1)) 1 177 defined(sort_ext$sort_input_record_exit); 1 178 dcl sort_ext$sort_output_record_exit variable /* entry point, user output_record exit procedure */ 1 179 entry(ptr, fixed bin(21), ptr, fixed bin(21), fixed bin, fixed bin(1), bit(1), bit(1), bit(1)) ext; 1 180 dcl sort_output_record_exit variable 1 181 entry(ptr, fixed bin(21), ptr, fixed bin(21), fixed bin, fixed bin(1), bit(1), bit(1), bit(1)) 1 182 defined(sort_ext$sort_output_record_exit); 1 183 dcl sort_ext$srp ptr ext; /* SR - position and length of each record */ 1 184 dcl srp ptr /* in SS string for presort */ 1 185 defined (sort_ext$srp); 1 186 dcl sort_ext$ssi fixed bin(30) ext; /* char offset in SS of current record (sort_release) */ 1 187 dcl ssi fixed bin(30) 1 188 defined (sort_ext$ssi); 1 189 dcl sort_ext$ssp ptr ext; /* SS - unsorted string during presort */ 1 190 dcl ssp ptr 1 191 defined (sort_ext$ssp); 1 192 dcl sort_ext$state fixed bin(17) ext; /* state variable controlling sequence of calls to */ 1 193 dcl state fixed bin(17) /* the various stages of the Sort (Merge) [init(0)] */ 1 194 defined (sort_ext$state); 1 195 dcl sort_ext$terminate_print_sw bit(1) ext; /* 0 = command prints (sort_merge_print_report) */ 1 196 dcl terminate_print_sw bit(1) /* 1 = subroutine prints (sort_merge_terminate) */ 1 197 defined (sort_ext$terminate_print_sw); 1 198 dcl 1 sort_ext$time_info(5) ext, /* used for -time information */ 1 199 2 x_etime fixed bin(71), 1 200 2 x_vtime fixed bin(71), 1 201 2 x_pf fixed bin, 1 202 2 x_pd_f fixed bin; 1 203 dcl 1 time_info(5) 1 204 defined(sort_ext$time_info), 1 205 2 etime fixed bin(71), 1 206 2 vtime fixed bin(71), 1 207 2 pf fixed bin, 1 208 2 pd_f fixed bin; 1 209 dcl sort_ext$time_sw bit(1) ext; /* 1 = -time argument specified */ 1 210 dcl time_sw bit(1) 1 211 defined(sort_ext$time_sw); 1 212 dcl sort_ext$user_out_sw char(32) ext; /* I/O switch for summary report, diagnostics: */ 1 213 dcl user_out_sw char(32) /* "user_output", "" = suppress, other = user switch */ 1 214 defined(sort_ext$user_out_sw); 1 215 dcl sort_ext$unique_prefix char(16) ext; /* unique to each invocation, for temporary names */ 1 216 dcl unique_prefix char(16) 1 217 defined (sort_ext$unique_prefix); /* -4- */ 1 218 dcl sort_ext$w(0: 31) fixed bin(30) ext; /* keys - word (sometimes char) offset for sort_comp */ 1 219 dcl w(0: 31) fixed bin(30) 1 220 defined (sort_ext$w); 1 221 dcl sort_ext$wf_dir_name char(168) aligned ext; /* -td directory pathname argument */ 1 222 dcl wf_dir_name char(168) aligned 1 223 defined(sort_ext$wf_dir_name); 1 224 dcl sort_ext$wf_full_name char(168) ext; /* absolute -td directory pathname */ 1 225 dcl wf_full_name char(168) 1 226 defined (sort_ext$wf_full_name); /* -42- */ 1 227 dcl sort_ext$whoami char(6) ext; /* "sort", "merge", "sort_", "merge_" called */ 1 228 dcl whoami char(6) 1 229 defined (sort_ext$whoami); /* -2- */ 1 230 dcl sort_ext$write_count fixed bin(30) ext; /* number of records written by Sort (Merge) */ 1 231 dcl write_count fixed bin(30) 1 232 defined (sort_ext$write_count); 36 37 /* INTERNAL STATIC (constants only) */ 38 dcl pending_string char(120) varying init("Pending work in previous invocation of ^a will be lost if you proceed; 39 do you wish to proceed?") internal static; 40 dcl (on init("1"b), 41 off init("0"b) ) bit(1) internal static; 42 43 /* AUTOMATIC AND BASED */ 2 1 /* BEGIN INCLUDE FILE ... sort_merge_pars.incl.pl1 */ 2 2 2 3 /* input_file_max = maximum number of input files for sort-merge */ 2 4 2 5 2 6 dcl 1 attach_array(0:10 /*input_file_max*/), 2 7 2 count fixed bin(17), 2 8 2 desc char(168); 2 9 2 10 dcl input_file(10 /*input_file_max*/) char(256); 2 11 2 12 /* END INCLUDE FILE ... sort_merge_pars.incl.pl1 */ 44 45 dcl output_file char(256), 46 merge_desc(1) ptr, 47 temp_dir char(168), 48 user_out_sw_temp char(8), 49 merge_code fixed bin(35), 50 merge_order_temp fixed bin(35), 51 file_size_temp float bin(27), 52 string_size_temp fixed bin(35); 53 dcl input_file_temp(total_if_pns) char(256) based(addr(input_file)); 54 dcl arg_err_code fixed bin(35); 55 dcl (perm_sd, 56 temp_sd) ptr init(null()); 57 dcl (fatal_sw, 58 no_args_sw, 59 arg_err_sw) bit(1); 60 dcl total_if_pns fixed bin(17); 61 dcl total_args fixed bin, 62 arg_list_ptr ptr; 63 64 dcl 1 query_info aligned, 65 2 version fixed bin init(2), 66 2 yes_or_no_sw bit(1) unaligned, 67 2 suppress_name_sw bit(1) aligned, 68 2 status_code fixed bin(35), 69 2 query_code fixed bin(35); 70 dcl answer char(4) varying; 71 72 dcl state_code fixed bin(35); 73 dcl hcs_code fixed bin(35); 74 75 dcl (sub_error_, cleanup) condition; 76 77 78 /* Start. */ 79 80 call state_test(state_code); /* Test state variable. */ 81 if state_code ^= 0 then do; 82 arg_err_sw = off; 83 fatal_sw = on; 84 call com_err_(0, "merge", " Merge will not be attempted."); 85 return; /* to command level without resetting state variable */ 86 end; 87 etime(1) = clock_(); 88 call cpu_time_and_paging_(pf(1), vtime(1), pd_f(1)); 89 call hcs_$get_process_usage(addr(pu(1)), hcs_code); 90 temp_sd, 91 perm_sd = null(); /* Used by cleanup proc */ 92 debug_sw = off; /* used by cleanpp procedure */ 93 on cleanup call cleanup_proc; 94 on sub_error_ call sort_merge_sub_error; 95 call cu_$arg_count(total_args); 96 /* Get pointer to argument list, so that arguments may be obtained 97* within any procedure via cu_$arg_ptr_rel */ 98 call cu_$arg_list_ptr(arg_list_ptr); 99 100 call sort_merge_command(input_file, output_file, merge_desc, temp_dir, user_out_sw_temp, total_if_pns, 101 arg_err_sw, fatal_sw, no_args_sw, merge_order_temp, string_size_temp, 102 file_size_temp, total_args, arg_list_ptr, perm_sd, temp_sd); 103 104 if no_args_sw = on then go to exit; /* Prompting message printed by sort_merge_command. */ 105 if arg_err_sw = on then merge_code = 1; 106 /* to ensure that merge_ will not attempt to execute merging process */ 107 else merge_code = 0; 108 if fatal_sw = off then /* go on if Merge Description is readable. */ 109 call merge_$merge_private(input_file_temp, output_file, merge_desc, user_out_sw_temp, merge_code); 110 111 call sort_merge_command_finish(arg_err_code, merge_code, arg_err_sw, fatal_sw); 112 113 exit: 114 call cleanup_proc; 115 state = 0; 116 return; /* to command level */ 117 118 state_test: proc(state_code); /* Test state variable: */ 119 dcl state_code fixed bin(35) parameter; 120 if state = 0 121 | (state = 8 & index(whoami, "_") ^= 0) /* Subroutine called last time */ 122 then call set_state; 123 else do; /* Error */ 124 call query(pending_string); 125 if answer = "no" then do; 126 state_code = 1; 127 return; 128 end; 129 else call set_state; 130 end; 131 132 set_state: proc; 133 whoami = "merge"; 134 state = 1; /* Set state variable. */ 135 state_code = 0; 136 unique_prefix = before(unique_chars_("0"b), " ")||"."; /* Get unique string for temporary names. */ 137 end set_state; 138 139 140 end state_test; 141 142 143 query: proc(string); /* Ask user about proceeding: */ 144 dcl string char(*) varying parameter; 145 yes_or_no_sw = on; 146 suppress_name_sw = off; 147 status_code, query_code = 0; 148 call command_query_(addr(query_info), answer, "merge", string, whoami); 149 end query; 150 151 152 cleanup_proc: proc; 153 dcl code fixed bin(35); 154 if debug_sw = off then do; 155 if temp_sd ^= null() then call hcs_$delentry_seg(temp_sd, code); 156 if perm_sd ^= null() then call hcs_$terminate_noname(perm_sd, code); 157 end; 158 else do; 159 if temp_sd ^= null() then call hcs_$truncate_seg(temp_sd, 0, code); 160 end; 161 state = 0; 162 end cleanup_proc; 163 164 165 end merge; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/82 1024.6 merge.pl1 >spec>on>11/11/82>merge.pl1 36 1 12/20/77 1614.2 sort_ext.incl.pl1 >ldd>include>sort_ext.incl.pl1 44 2 11/11/82 1226.7 sort_merge_pars.incl.pl1 >spec>on>11/11/82>sort_merge_pars.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. answer 001506 automatic varying char(4) dcl 70 set ref 125 148* arg_err_code 001462 automatic fixed bin(35,0) dcl 54 set ref 111* arg_err_sw 001472 automatic bit(1) unaligned dcl 57 set ref 82* 100* 105 111* arg_list_ptr 001476 automatic pointer dcl 61 set ref 98* 100* cleanup 001520 stack reference condition dcl 75 ref 93 clock_ 000050 constant entry external dcl 15 ref 87 code 000100 automatic fixed bin(35,0) dcl 153 set ref 155* 156* 159* com_err_ 000052 constant entry external dcl 16 ref 84 command_query_ 000054 constant entry external dcl 17 ref 148 cpu_time_and_paging_ 000056 constant entry external dcl 18 ref 88 cu_$arg_count 000060 constant entry external dcl 19 ref 95 cu_$arg_list_ptr 000062 constant entry external dcl 19 ref 98 debug_sw defined bit(1) unaligned dcl 1-37 set ref 92* 154 etime defined fixed bin(71,0) array level 2 dcl 1-203 set ref 87* fatal_sw 001470 automatic bit(1) unaligned dcl 57 set ref 83* 100* 108 111* file_size_temp 001460 automatic float bin(27) dcl 45 set ref 100* hcs_$delentry_seg 000070 constant entry external dcl 22 ref 155 hcs_$get_process_usage 000064 constant entry external dcl 21 ref 89 hcs_$terminate_noname 000072 constant entry external dcl 22 ref 156 hcs_$truncate_seg 000066 constant entry external dcl 22 ref 159 hcs_code 001511 automatic fixed bin(35,0) dcl 73 set ref 89* input_file 000100 automatic char(256) array unaligned dcl 2-10 set ref 100* 108 input_file_temp based char(256) array unaligned dcl 53 set ref 108* merge_$merge_private 000076 constant entry external dcl 27 ref 108 merge_code 001456 automatic fixed bin(35,0) dcl 45 set ref 105* 107* 108* 111* merge_desc 001400 automatic pointer array dcl 45 set ref 100* 108* merge_order_temp 001457 automatic fixed bin(35,0) dcl 45 set ref 100* no_args_sw 001471 automatic bit(1) unaligned dcl 57 set ref 100* 104 off constant bit(1) initial unaligned dcl 40 ref 82 92 108 146 154 on constant bit(1) initial unaligned dcl 40 ref 83 104 105 145 output_file 001300 automatic char(256) unaligned dcl 45 set ref 100* 108* pd_f 5 defined fixed bin(17,0) array level 2 dcl 1-203 set ref 88* pending_string 000010 internal static varying char(120) initial dcl 38 set ref 124* perm_sd 001464 automatic pointer initial dcl 55 set ref 55* 90* 100* 156 156* pf 4 defined fixed bin(17,0) array level 2 dcl 1-203 set ref 88* pu defined structure array level 1 unaligned dcl 1-137 set ref 89 89 query_code 4 001500 automatic fixed bin(35,0) level 2 dcl 64 set ref 147* query_info 001500 automatic structure level 1 dcl 64 set ref 148 148 sort_ext$debug_sw 000106 external static bit(1) unaligned dcl 1-36 set ref 92* 92 154 154 sort_ext$pu 000110 external static structure array level 1 unaligned dcl 1-134 ref 89 89 89 89 89 89 89 89 sort_ext$state 000112 external static fixed bin(17,0) dcl 1-192 set ref 115* 115 120 120 120 120 134* 134 161* 161 sort_ext$time_info 000114 external static structure array level 1 unaligned dcl 1-198 set ref 87* 87 88 88 88 88 88 88 sort_ext$unique_prefix 000116 external static char(16) unaligned dcl 1-215 set ref 136* 136 sort_ext$whoami 000120 external static char(6) unaligned dcl 1-227 set ref 120 120 133* 133 148 148 sort_merge_command 000100 constant entry external dcl 28 ref 100 sort_merge_command_finish 000102 constant entry external dcl 31 ref 111 sort_merge_sub_error 000104 constant entry external dcl 32 ref 94 state defined fixed bin(17,0) dcl 1-193 set ref 115* 120 120 134* 161* state_code parameter fixed bin(35,0) dcl 119 in procedure "state_test" set ref 118 126* 135* state_code 001510 automatic fixed bin(35,0) dcl 72 in procedure "merge" set ref 80* 81 status_code 3 001500 automatic fixed bin(35,0) level 2 dcl 64 set ref 147* string parameter varying char dcl 144 set ref 143 148* string_size_temp 001461 automatic fixed bin(35,0) dcl 45 set ref 100* sub_error_ 001512 stack reference condition dcl 75 ref 94 suppress_name_sw 2 001500 automatic bit(1) level 2 dcl 64 set ref 146* temp_dir 001402 automatic char(168) unaligned dcl 45 set ref 100* temp_sd 001466 automatic pointer initial dcl 55 set ref 55* 90* 100* 155 155* 159 159* time_info defined structure array level 1 unaligned dcl 1-203 total_args 001474 automatic fixed bin(17,0) dcl 61 set ref 95* 100* total_if_pns 001473 automatic fixed bin(17,0) dcl 60 set ref 100* 108 unique_chars_ 000074 constant entry external dcl 25 ref 136 unique_prefix defined char(16) unaligned dcl 1-216 set ref 136* user_out_sw_temp 001454 automatic char(8) unaligned dcl 45 set ref 100* 108* version 001500 automatic fixed bin(17,0) initial level 2 dcl 64 set ref 64* vtime 2 defined fixed bin(71,0) array level 2 dcl 1-203 set ref 88* whoami defined char(6) unaligned dcl 1-228 set ref 120 133* 148* yes_or_no_sw 1 001500 automatic bit(1) level 2 packed unaligned dcl 64 set ref 145* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. acl defined structure array level 1 unaligned dcl 1-6 attach_array automatic structure array level 1 unaligned dcl 2-6 b defined fixed bin(30,0) array dcl 1-13 compare_sw defined fixed bin(1,0) dcl 1-19 compares_counter defined fixed bin(34,0) dcl 1-16 curr_input_file_attach defined char(256) unaligned dcl 1-22 curr_input_file_name defined char(256) unaligned dcl 1-25 curr_input_file_num defined fixed bin(17,0) dcl 1-28 curr_output_file_attach defined char(256) unaligned dcl 1-31 curr_output_file_name defined char(256) unaligned dcl 1-34 disaster2 defined fixed bin(17,0) dcl 1-40 dt defined fixed bin(30,0) array dcl 1-43 in_buff_ptr defined pointer dcl 1-65 input_driver_is_sort defined bit(1) unaligned dcl 1-46 input_file_exit_sw defined bit(1) unaligned dcl 1-49 input_file_max defined fixed bin(17,0) dcl 1-53 input_rec_deleted defined fixed bin(30,0) dcl 1-59 input_rec_inserted defined fixed bin(30,0) dcl 1-62 input_record_exit_sw defined fixed bin(1,0) dcl 1-56 leng defined fixed bin(30,0) array dcl 1-68 max1 defined fixed bin(30,0) dcl 1-71 max2 defined fixed bin(30,0) dcl 1-74 max3 defined fixed bin(30,0) dcl 1-77 max4 defined fixed bin(30,0) dcl 1-80 max_rec_length defined fixed bin(30,0) dcl 1-84 merge_compares defined fixed bin(34,0) dcl 1-87 merge_in_iocb_ptrs defined pointer array dcl 1-90 merge_input_file_attaches defined char(256) array unaligned dcl 1-93 merge_input_file_names defined char(256) array unaligned dcl 1-96 mii defined fixed bin(17,0) dcl 1-99 min_rec_length defined fixed bin(30,0) dcl 1-102 mip defined fixed bin(30,0) array dcl 1-105 msp defined pointer array dcl 1-108 no_of_keys defined fixed bin(30,0) dcl 1-111 old_input_file_num defined fixed bin(17,0) dcl 1-114 output_driver_is_sort defined bit(1) unaligned dcl 1-117 output_file_exit_sw defined bit(1) unaligned dcl 1-120 output_rec_deleted defined fixed bin(30,0) dcl 1-123 output_rec_inserted defined fixed bin(30,0) dcl 1-126 output_record_exit_sw defined fixed bin(1,0) dcl 1-129 presort_compares defined fixed bin(34,0) dcl 1-132 read_count defined fixed bin(30,0) dcl 1-142 rec_ptr_a defined pointer dcl 1-145 rec_ptr_b defined pointer dcl 1-148 release_count defined fixed bin(30,0) dcl 1-151 report_sw defined bit(2) unaligned dcl 1-154 return_count defined fixed bin(30,0) dcl 1-157 rev defined fixed bin(1,0) array dcl 1-160 sii defined fixed bin(30,0) dcl 1-163 sip defined pointer dcl 1-166 sort_desc_pn defined char(168) unaligned dcl 1-171 sort_ext$acl external static structure array level 1 unaligned dcl 1-1 sort_ext$b external static fixed bin(30,0) array dcl 1-12 sort_ext$compare_sw external static fixed bin(1,0) dcl 1-18 sort_ext$compares_counter external static fixed bin(34,0) dcl 1-15 sort_ext$curr_input_file_attach external static char(256) unaligned dcl 1-21 sort_ext$curr_input_file_name external static char(256) unaligned dcl 1-24 sort_ext$curr_input_file_num external static fixed bin(17,0) dcl 1-27 sort_ext$curr_output_file_attach external static char(256) unaligned dcl 1-30 sort_ext$curr_output_file_name external static char(256) unaligned dcl 1-33 sort_ext$disaster2 external static fixed bin(17,0) dcl 1-39 sort_ext$dt external static fixed bin(30,0) array dcl 1-42 sort_ext$in_buff_ptr external static pointer dcl 1-64 sort_ext$input_driver_is_sort external static bit(1) unaligned dcl 1-45 sort_ext$input_file_exit_sw external static bit(1) unaligned dcl 1-48 sort_ext$input_file_max external static fixed bin(17,0) dcl 1-51 sort_ext$input_rec_deleted external static fixed bin(30,0) dcl 1-58 sort_ext$input_rec_inserted external static fixed bin(30,0) dcl 1-61 sort_ext$input_record_exit_sw external static fixed bin(1,0) dcl 1-55 sort_ext$leng external static fixed bin(30,0) array dcl 1-67 sort_ext$max1 external static fixed bin(30,0) dcl 1-70 sort_ext$max2 external static fixed bin(30,0) dcl 1-73 sort_ext$max3 external static fixed bin(30,0) dcl 1-76 sort_ext$max4 external static fixed bin(30,0) dcl 1-79 sort_ext$max_rec_length external static fixed bin(30,0) dcl 1-82 sort_ext$merge_compares external static fixed bin(34,0) dcl 1-86 sort_ext$merge_in_iocb_ptrs external static pointer array dcl 1-89 sort_ext$merge_input_file_attaches external static char(256) array unaligned dcl 1-92 sort_ext$merge_input_file_names external static char(256) array unaligned dcl 1-95 sort_ext$mii external static fixed bin(17,0) dcl 1-98 sort_ext$min_rec_length external static fixed bin(30,0) dcl 1-101 sort_ext$mip external static fixed bin(30,0) array dcl 1-104 sort_ext$msp external static pointer array dcl 1-107 sort_ext$no_of_keys external static fixed bin(30,0) dcl 1-110 sort_ext$old_input_file_num external static fixed bin(17,0) dcl 1-113 sort_ext$output_driver_is_sort external static bit(1) unaligned dcl 1-116 sort_ext$output_file_exit_sw external static bit(1) unaligned dcl 1-119 sort_ext$output_rec_deleted external static fixed bin(30,0) dcl 1-122 sort_ext$output_rec_inserted external static fixed bin(30,0) dcl 1-125 sort_ext$output_record_exit_sw external static fixed bin(1,0) dcl 1-128 sort_ext$presort_compares external static fixed bin(34,0) dcl 1-131 sort_ext$read_count external static fixed bin(30,0) dcl 1-141 sort_ext$rec_ptr_a external static pointer dcl 1-144 sort_ext$rec_ptr_b external static pointer dcl 1-147 sort_ext$release_count external static fixed bin(30,0) dcl 1-150 sort_ext$report_sw external static bit(2) unaligned dcl 1-153 sort_ext$return_count external static fixed bin(30,0) dcl 1-156 sort_ext$rev external static fixed bin(1,0) array dcl 1-159 sort_ext$sii external static fixed bin(30,0) dcl 1-162 sort_ext$sip external static pointer dcl 1-165 sort_ext$sort_compare_exit external static entry variable dcl 1-168 sort_ext$sort_desc_pn external static char(168) unaligned dcl 1-170 sort_ext$sort_input_record_exit external static entry variable dcl 1-173 sort_ext$sort_output_record_exit external static entry variable dcl 1-178 sort_ext$srp external static pointer dcl 1-183 sort_ext$ssi external static fixed bin(30,0) dcl 1-186 sort_ext$ssp external static pointer dcl 1-189 sort_ext$terminate_print_sw external static bit(1) unaligned dcl 1-195 sort_ext$time_sw external static bit(1) unaligned dcl 1-209 sort_ext$user_out_sw external static char(32) unaligned dcl 1-212 sort_ext$w external static fixed bin(30,0) array dcl 1-218 sort_ext$wf_dir_name external static char(168) dcl 1-221 sort_ext$wf_full_name external static char(168) unaligned dcl 1-224 sort_ext$write_count external static fixed bin(30,0) dcl 1-230 sort_input_record_exit defined entry variable dcl 1-175 sort_output_record_exit defined entry variable dcl 1-180 srp defined pointer dcl 1-184 ssi defined fixed bin(30,0) dcl 1-187 ssp defined pointer dcl 1-190 terminate_print_sw defined bit(1) unaligned dcl 1-196 time_sw defined bit(1) unaligned dcl 1-210 user_out_sw defined char(32) unaligned dcl 1-213 w defined fixed bin(30,0) array dcl 1-219 wf_dir_name defined char(168) dcl 1-222 wf_full_name defined char(168) unaligned dcl 1-225 write_count defined fixed bin(30,0) dcl 1-231 NAMES DECLARED BY EXPLICIT CONTEXT. cleanup_proc 000664 constant entry internal dcl 152 ref 93 113 exit 000452 constant label dcl 113 ref 104 merge 000060 constant entry external dcl 12 query 000605 constant entry internal dcl 143 ref 124 set_state 000527 constant entry internal dcl 132 ref 120 129 state_test 000461 constant entry internal dcl 118 ref 80 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 89 89 108 148 148 before builtin function ref 136 index builtin function ref 120 null builtin function ref 55 55 90 155 156 159 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1266 1410 766 1276 Length 1650 766 122 223 277 40 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME merge 1016 external procedure is an external procedure. on unit on line 93 64 on unit on unit on line 94 64 on unit state_test internal procedure shares stack frame of external procedure merge. set_state internal procedure shares stack frame of external procedure merge. query internal procedure shares stack frame of external procedure merge. cleanup_proc 80 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 pending_string merge STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cleanup_proc 000100 code cleanup_proc merge 000100 input_file merge 001300 output_file merge 001400 merge_desc merge 001402 temp_dir merge 001454 user_out_sw_temp merge 001456 merge_code merge 001457 merge_order_temp merge 001460 file_size_temp merge 001461 string_size_temp merge 001462 arg_err_code merge 001464 perm_sd merge 001466 temp_sd merge 001470 fatal_sw merge 001471 no_args_sw merge 001472 arg_err_sw merge 001473 total_if_pns merge 001474 total_args merge 001476 arg_list_ptr merge 001500 query_info merge 001506 answer merge 001510 state_code merge 001511 hcs_code merge THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ com_err_ command_query_ cpu_time_and_paging_ cu_$arg_count cu_$arg_list_ptr hcs_$delentry_seg hcs_$get_process_usage hcs_$terminate_noname hcs_$truncate_seg merge_$merge_private sort_merge_command sort_merge_command_finish sort_merge_sub_error unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sort_ext$debug_sw sort_ext$pu sort_ext$state sort_ext$time_info sort_ext$unique_prefix sort_ext$whoami LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000057 55 000065 64 000070 80 000072 81 000074 82 000076 83 000077 84 000101 85 000130 87 000131 88 000140 89 000154 90 000167 92 000172 93 000175 94 000217 95 000240 98 000247 100 000256 104 000355 105 000361 107 000370 108 000371 111 000435 113 000452 115 000456 116 000460 118 000461 120 000463 124 000504 125 000514 126 000521 127 000524 129 000525 140 000526 132 000527 133 000530 134 000535 135 000537 136 000541 137 000603 143 000605 145 000616 146 000620 147 000621 148 000623 149 000662 152 000663 154 000671 155 000674 156 000711 157 000727 159 000730 161 000750 162 000752 ----------------------------------------------------------- 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