COMPILATION LISTING OF SEGMENT sort_input_proc Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 02/14/84 0735.8 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 /* *************************************** 8* * * 9* * * 10* * Copyright (c) 1975, 1976, 1977 by * 11* * Honeywell Information Systems, Inc. * 12* * * 13* * * 14* *************************************** */ 15 sort_input_proc: proc(input_proc_code); 16 17 /* EXTERNAL ENTRIES */ 18 dcl ioa_$rsnnl entry options(variable); 19 dcl iox_$attach_ioname entry(char(*), ptr, char(*), fixed bin(35)); 20 dcl iox_$open entry(ptr, fixed bin, bit(1) aligned, fixed bin(35)); 21 dcl iox_$read_record entry(ptr, ptr, fixed bin(21), fixed bin(21), fixed bin(35)); 22 dcl iox_$close entry(ptr, fixed bin(35)); 23 dcl iox_$detach_iocb entry(ptr, fixed bin(35)); 24 dcl iox_$destroy_iocb entry(ptr, fixed bin(35)); 25 dcl sub_err_ entry options(variable); 26 27 28 /* EXTERNAL STATIC */ 29 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); 30 31 32 dcl (error_table_$not_detached, 33 error_table_$not_attached, 34 error_table_$not_closed, 35 error_table_$no_record, 36 error_table_$not_open, 37 error_table_$short_record, 38 error_table_$long_record, 39 error_table_$end_of_info, 40 error_table_$out_of_sequence, 41 error_table_$request_not_recognized, 42 error_table_$fatal_error) fixed bin(35) external; 43 44 /* PARAMETERS AND AUTOMATIC */ 45 dcl input_proc_code fixed bin(35) parameter; 46 47 dcl in_switch char(32), 48 in_switch_length fixed bin(17), 49 iox_code fixed bin(35), 50 sort_code fixed bin(35), 51 in_iocb_ptr ptr, 52 in_mode fixed bin, 53 seq_input fixed bin init(4), 54 no_extend bit(1) aligned init("0"b), 55 in_buff_len fixed bin(21) init(sort_ext$max_rec_length), 56 in_rec_len fixed bin(21), 57 in_attach_desc char(176); 58 dcl this_file_read_count fixed bin(35); 59 dcl sort_release_ptr ptr; 60 dcl sort_release_len fixed bin (21); 61 dcl retval fixed bin(35); 62 dcl cleanup condition; 63 64 65 /* Start. */ 66 input_proc_code = 0; 67 in_iocb_ptr = null(); 68 on cleanup call cleanup_proc; 69 call ioa_$rsnnl(unique_prefix||"sort_in_^d_", in_switch, in_switch_length, curr_input_file_num); 70 /* Convert from fixed binary to character string. */ 71 /* Attach. */ 72 if curr_input_file_attach = "" then in_attach_desc = "vfile_ "||curr_input_file_name; 73 else in_attach_desc = curr_input_file_attach; 74 call iox_$attach_ioname(in_switch, in_iocb_ptr, in_attach_desc, iox_code); 75 if iox_code ^= 0 then do; 76 /* error_table_$not_detached */ 77 call iox_error("Attaching"); 78 end; 79 /* Open. */ 80 in_mode = seq_input; 81 call iox_$open(in_iocb_ptr, in_mode, no_extend, iox_code); 82 if iox_code ^= 0 then do; 83 /* error_table_$not_attached 84* $not_closed */ 85 call iox_error("Opening"); 86 end; 87 this_file_read_count = 0; 88 /* Read and release. */ 89 read: call iox_$read_record(in_iocb_ptr, in_buff_ptr, in_buff_len, in_rec_len, iox_code); 90 if iox_code = error_table_$end_of_info then go to close; 91 if iox_code ^= 0 then do; 92 /* error_table_$no_record 93* $long_record */ 94 call iox_error("Reading"); 95 end; 96 this_file_read_count = this_file_read_count + 1; 97 sort_release_ptr = in_buff_ptr; /* save to pass because sort_release can change the contents of it */ 98 sort_release_len = in_rec_len; 99 call sort_release(sort_release_ptr, sort_release_len, sort_code); 100 if sort_code ^= 0 then do; 101 /* release errors */ 102 if sort_code = error_table_$long_record | sort_code = error_table_$short_record then do; 103 if curr_input_file_attach = "" then 104 call sub_err_(sort_code, whoami, "c", null(), retval, 105 "Record ^d of input file ^d, file name ^a", 106 this_file_read_count, curr_input_file_num, curr_input_file_name); 107 else call sub_err_(sort_code, whoami, "c", null(), retval, 108 "Record ^d of input file ^d, attach description ^a", 109 this_file_read_count, curr_input_file_num, curr_input_file_attach); 110 input_proc_code = error_table_$fatal_error; 111 call cleanup_proc; 112 go to exit; 113 end; 114 else if sort_code = error_table_$out_of_sequence then do; 115 call sub_err_(sort_code, whoami, "c", null(), retval, 116 "Calling sort_$release."); 117 call cleanup_proc; 118 go to exit; 119 end; 120 else do; 121 input_proc_code = sort_code; 122 call cleanup_proc; 123 go to exit; 124 end; 125 end; 126 go to read; 127 /* Close. */ 128 close: 129 read_count = read_count + this_file_read_count; 130 call iox_$close(in_iocb_ptr, iox_code); 131 if iox_code ^= 0 then do; 132 /* error_table_$not_open */ 133 call iox_error("Closing"); 134 end; 135 /* Detach. */ 136 call iox_$detach_iocb(in_iocb_ptr, iox_code); 137 if iox_code ^= 0 then do; 138 /* error_table_$not_attached 139* $not_closed */ 140 call iox_error("Detaching"); 141 end; 142 /* Destroy iocb. */ 143 call iox_$destroy_iocb(in_iocb_ptr, iox_code); 144 in_iocb_ptr = null(); 145 /* no errors returned? */ 146 exit: 147 return; /* to driver */ 148 release: entry(pt,fb,fb1); 149 dcl pt ptr, 150 fb fixed bin(21), 151 fb1 fixed bin(35); 152 153 sort_release_ptr = pt; 154 sort_release_len = fb; 155 call sort_release(sort_release_ptr,sort_release_len,fb1); 156 return; 157 /* */ 158 159 sort_release: proc(relp,relbl,ec); 160 /* EXTERNAL ENTRIES */ 161 dcl hcs_$make_seg entry(char(*) aligned, char(*) aligned, char(*), fixed bin(5), ptr, fixed bin(35)), 162 sort_presort entry(fixed bin(35)) ext; 163 /* EXTERNAL STATIC */ 164 /* PARAMETERS,AUTOMATIC & BASED */ 165 dcl presort_code fixed bin(35); 166 dcl retval fixed bin(35); 167 dcl (relp ptr, 168 relbl fixed bin(21)) parameter; 169 dcl hcs_code fixed bin(35); 2 1 dcl result fixed bin(1); /* result of compare procedure (Sort's or user's) */ 2 2 2 3 dcl I (255*1024) fixed bin(30) based, /* an array, which when based upon sip (presort) 2 4* contain entries which are indexes to rows in R table */ 2 5 /* when based upon mip (merge) each row contains the 2 6* number of records in each merge string */ 2 7 1 R (85*1024) based, /* 85 = 255/3 */ 2 8 2 pt fixed bin(30), /* references the first character in the S string 2 9* of each record */ 2 10 2 ln fixed bin(30); /* references the number of characters in each 2 11* record of the S string */ 2 12 dcl S char(255*4096) based, /* string of presort records */ 2 13 S1(255*4096) char(1) based; /* used in adjusting pointers */ 2 14 dcl ec fixed bin(35) parameter, 2 15 pt1 ptr, 2 16 pt2 ptr, 2 17 w_p ptr int static, 2 18 fb fixed bin(21) based(w_p); 170 171 dcl input_rec char(262144) based(relp); 172 /* following declarations are for input record exit */ 173 dcl hold_ptr ptr int static, 174 hold_len fixed bin(24) int static, 175 rec_len fixed bin(21) int static, 176 rec_ptr ptr int static, 177 action fixed bin int static, 178 close_exit bit(1) int static; 179 180 ec = 0; /* initially set error code to 0 */ 181 182 /* test state code */ 183 if state ^= 3 then /* initiate not yet called-sequence error */ 184 do; 185 ec = error_table_$out_of_sequence; 186 return; 187 end; 188 189 /* test for short and long record length */ 190 if relbl > max_rec_length then /* record too long */ 191 do; 192 ec = error_table_$long_record ; 193 return; 194 end; 195 if relbl < min_rec_length then /* record too short */ 196 do; 197 ec = error_table_$short_record; 198 return; 199 end; 200 if ssi=0 then do; /* This is the initial call to RELEASE. */ 201 call hcs_$make_seg(wf_dir_name, unique_prefix||"sort_work.SI", "", 8+2, /* rw */ sip, hcs_code); 202 if hcs_code ^= 0 then do; 203 call hcs_error("create", "SI"); 204 return; 205 end; 206 call hcs_$make_seg(wf_dir_name, unique_prefix||"sort_work.SR", "", 8+2, srp, hcs_code); 207 if hcs_code ^= 0 then do; 208 call hcs_error("create", "SR"); 209 return; 210 end; 211 call hcs_$make_seg(wf_dir_name, unique_prefix||"sort_work.SS", "", 8+2, ssp, hcs_code); 212 if hcs_code ^= 0 then do; 213 call hcs_error("create", "SS"); 214 return; 215 end; 216 mii = 0; 217 ssi = 1; 218 sii = 0; 219 end; 220 if (((relbl+ssi)>max1) & (mii ^= 0)) | (sii>max3) | (relbl+ssi) > max2 then do; 221 /* Sort the accumulated records. */ 222 call sort_presort(presort_code); 223 if presort_code ^= 0 then do; 224 ec = presort_code; 225 return; 226 end; 227 228 /* Initialize the sort tables for next input. */ 229 sii = 0; 230 ssi = 1; 231 end; 232 rep: if input_record_exit_sw ^= 0 then /* test for input record exit */ 233 do; 234 if close_exit = "1"b then if relp=null() /* called from commence with close exit on */ 235 then return; 236 else go to norm; 237 rec_ptr = relp; /* use input's input buffer */ 238 rec_len = relbl; 239 action = 0; 240 call sort_input_record_exit(rec_ptr,rec_len,action,close_exit); 241 if rec_ptr=null() & action^=3 then return; 242 /* called from commence and no inserted record */ 243 if action = 0 then 244 do; /* accept current record */ 245 call ck_len(rec_len,"altered"); 246 relp = rec_ptr; /* set record to be accepted to the one handed back by user */ 247 relbl = rec_len; 248 go to norm; 249 end; 250 if action = 1 then /* delete the current record */ 251 do; 252 input_rec_deleted = input_rec_deleted+1; /* increment deleted count */ 253 return; 254 end; 255 if action = 3 then 256 do; /* insert a new record */ 257 call ck_len(rec_len,"inserted"); 258 hold_ptr = relp; /* save old current record and length */ 259 hold_len = relbl; 260 relp = rec_ptr; /* set release pointer to record to be inserted */ 261 relbl = rec_len; 262 input_rec_inserted = input_rec_inserted+1; /* increment inserted count */ 263 go to norm; 264 end; 265 else do; /* illegal action code */ 266 call sub_err_(error_table_$request_not_recognized, whoami, "c", null(), retval, 267 "Invalid action = ^d by user input_record exit procedure.",action); 268 ec=error_table_$fatal_error; 269 goto exit; 270 end; 271 end; 272 /* following will set up double word alignment mechanism */ 273 norm: ssi=divide(ssi + 4 -1 +7,8,24) *8 + 1; 274 if compare_sw ^= 0 then do; 275 w_p = addr(substr(ssp->S,ssi,1)); 276 w_p = ptr(w_p,fixed(rel(w_p),21)-1); /* move back one word */ 277 fb = relbl; /* set length of record */ 278 end; 279 /* Move the input record into the sort storage area. */ 280 substr(ssp->S,ssi,relbl)=substr(input_rec,1,relbl); /* relfb changed to 1-always start with first pos */ 281 sii=sii+1; /* Count of the records for the next sort. */ 282 srp->R.pt(sii)=ssi; /* Location in sort storage segment of the record. */ 283 srp->R.ln(sii)=relbl; /* The length of the record. */ 284 release_count = release_count +1; /* increment release count */ 285 ssi=ssi+relbl; /* Update the next location 286* available in the sort storage segment. */ 287 sip->I(sii)=sii; /* Record index for sort. */ 288 if input_record_exit_sw ^= 0 & action = 3 then 289 do; /* input record switch on and just inserted a record */ 290 /* don't get another record */ 291 relp = hold_ptr; /* reset current record to old current record */ 292 relbl = hold_len; 293 action = 0; /* incase close exit is on next time through */ 294 go to rep; 295 end; 296 exit: return; 297 298 299 ck_len: proc(length,action_type); 300 /* this will check the length handed to it by the input record exit 301* code-if it is too long it will write an error mesage and exit with 302* a fatal error code */ 303 /* */ 304 dcl sub_err_ entry options(variable), 305 length fixed bin(21) parameter, 306 action_type char(*) parameter; 307 if length > max_rec_length then 308 do; /* record too long */ 309 call sub_err_(error_table_$long_record,whoami, "c", null(), retval, 310 "Record ^a by user input_record exit procedure.",action_type); 311 ec=error_table_$fatal_error; 312 goto exit; 313 end; 314 if length ^a", 327 action, before(wf_dir_name, " "), unique_prefix||name); 328 ec = error_table_$fatal_error; 329 end hcs_error; 330 end sort_release; 331 332 iox_error: proc(action); 333 dcl action char(*) parameter; 334 input_proc_code = error_table_$fatal_error; 335 if curr_input_file_attach = "" then 336 call sub_err_(iox_code, whoami, "c", null(),retval, 337 "^a input file ^d, file name ^a", 338 action, curr_input_file_num, curr_input_file_name); 339 else call sub_err_(iox_code, whoami, "c", null(), retval, 340 "^a input file ^d, attach description ^a", 341 action, curr_input_file_num, curr_input_file_attach); 342 call cleanup_proc; 343 go to exit; 344 end iox_error; 345 346 347 cleanup_proc: proc; 348 if in_iocb_ptr = null() then return; 349 call iox_$close(in_iocb_ptr, iox_code); 350 call iox_$detach_iocb(in_iocb_ptr, iox_code); 351 call iox_$destroy_iocb(in_iocb_ptr, iox_code); 352 end cleanup_proc; 353 354 end sort_input_proc; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 02/14/84 0735.8 sort_input_proc.pl1 >special_ldd>on>6617>sort_input_proc.pl1 30 1 12/20/77 1614.2 sort_ext.incl.pl1 >ldd>include>sort_ext.incl.pl1 170 2 04/26/76 1500.0 sort_common.incl.pl1 >ldd>include>sort_common.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. I based fixed bin(30,0) array dcl 2-3 set ref 287* R based structure array level 1 unaligned dcl 2-3 S based char(1044480) unaligned dcl 2-12 set ref 275 280* action 000020 internal static fixed bin(17,0) dcl 173 in procedure "sort_release" set ref 239* 240* 241 243 250 255 266* 288 293* action parameter char unaligned dcl 333 in procedure "iox_error" set ref 332 335* 339* action parameter char unaligned dcl 323 in procedure "hcs_error" set ref 322 325* action_type parameter char unaligned dcl 304 set ref 299 309* 316* cleanup 000204 stack reference condition dcl 62 ref 68 close_exit 000021 internal static bit(1) unaligned dcl 173 set ref 234 240* compare_sw defined fixed bin(1,0) dcl 1-19 ref 274 curr_input_file_attach defined char(256) unaligned dcl 1-22 set ref 72 73 103 107* 335 339* curr_input_file_name defined char(256) unaligned dcl 1-25 set ref 72 103* 335* curr_input_file_num defined fixed bin(17,0) dcl 1-28 set ref 69* 103* 107* 335* 339* ec parameter fixed bin(35,0) dcl 2-14 set ref 159 180* 185* 192* 197* 224* 268* 311* 318* 328* error_table_$end_of_info 000132 external static fixed bin(35,0) dcl 32 ref 90 error_table_$fatal_error 000140 external static fixed bin(35,0) dcl 32 ref 110 268 311 318 328 334 error_table_$long_record 000130 external static fixed bin(35,0) dcl 32 set ref 102 192 309* error_table_$out_of_sequence 000134 external static fixed bin(35,0) dcl 32 ref 114 185 error_table_$request_not_recognized 000136 external static fixed bin(35,0) dcl 32 set ref 266* error_table_$short_record 000126 external static fixed bin(35,0) dcl 32 set ref 102 197 316* fb parameter fixed bin(21,0) dcl 149 in procedure "sort_input_proc" ref 148 154 fb based fixed bin(21,0) dcl 2-14 in procedure "sort_release" set ref 277* fb1 parameter fixed bin(35,0) dcl 149 set ref 148 155* hcs_$make_seg 000142 constant entry external dcl 161 ref 201 206 211 hcs_code 000222 automatic fixed bin(35,0) dcl 169 set ref 201* 202 206* 207 211* 212 325* hold_len 000014 internal static fixed bin(24,0) dcl 173 set ref 259* 292 hold_ptr 000012 internal static pointer dcl 173 set ref 258* 291 in_attach_desc 000123 automatic char(176) unaligned dcl 47 set ref 72* 73* 74* in_buff_len 000121 automatic fixed bin(21,0) initial dcl 47 set ref 47* 89* in_buff_ptr defined pointer dcl 1-65 set ref 89* 97 in_iocb_ptr 000114 automatic pointer dcl 47 set ref 67* 74* 81* 89* 130* 136* 143* 144* 348 349* 350* 351* in_mode 000116 automatic fixed bin(17,0) dcl 47 set ref 80* 81* in_rec_len 000122 automatic fixed bin(21,0) dcl 47 set ref 89* 98 in_switch 000100 automatic char(32) unaligned dcl 47 set ref 69* 74* in_switch_length 000110 automatic fixed bin(17,0) dcl 47 set ref 69* input_proc_code parameter fixed bin(35,0) dcl 45 set ref 15 66* 110* 121* 334* input_rec based char(262144) unaligned dcl 171 ref 280 input_rec_deleted defined fixed bin(30,0) dcl 1-59 set ref 252* 252 input_rec_inserted defined fixed bin(30,0) dcl 1-62 set ref 262* 262 input_record_exit_sw defined fixed bin(1,0) dcl 1-56 ref 232 288 ioa_$rsnnl 000022 constant entry external dcl 18 ref 69 iox_$attach_ioname 000024 constant entry external dcl 19 ref 74 iox_$close 000032 constant entry external dcl 22 ref 130 349 iox_$destroy_iocb 000036 constant entry external dcl 24 ref 143 351 iox_$detach_iocb 000034 constant entry external dcl 23 ref 136 350 iox_$open 000026 constant entry external dcl 20 ref 81 iox_$read_record 000030 constant entry external dcl 21 ref 89 iox_code 000111 automatic fixed bin(35,0) dcl 47 set ref 74* 75 81* 82 89* 90 91 130* 131 136* 137 143* 335* 339* 349* 350* 351* length parameter fixed bin(21,0) dcl 304 ref 299 307 314 ln 1 based fixed bin(30,0) array level 2 dcl 2-3 set ref 283* max1 defined fixed bin(30,0) dcl 1-71 ref 220 max2 defined fixed bin(30,0) dcl 1-74 ref 220 max3 defined fixed bin(30,0) dcl 1-77 ref 220 max_rec_length defined fixed bin(30,0) dcl 1-84 ref 190 307 mii defined fixed bin(17,0) dcl 1-99 set ref 216* 220 min_rec_length defined fixed bin(30,0) dcl 1-102 ref 195 314 name parameter char unaligned dcl 323 ref 322 325 no_extend 000120 automatic bit(1) initial dcl 47 set ref 47* 81* presort_code 000220 automatic fixed bin(35,0) dcl 165 set ref 222* 223 224 pt based fixed bin(30,0) array level 2 in structure "R" dcl 2-3 in procedure "sort_release" set ref 282* pt parameter pointer dcl 149 in procedure "sort_input_proc" ref 148 153 read_count defined fixed bin(30,0) dcl 1-142 set ref 128* 128 rec_len 000015 internal static fixed bin(21,0) dcl 173 set ref 238* 240* 245* 247 257* 261 rec_ptr 000016 internal static pointer dcl 173 set ref 237* 240* 241 246 260 relbl parameter fixed bin(21,0) dcl 167 set ref 159 190 195 220 220 238 247* 259 261* 277 280 280 283 285 292* release_count defined fixed bin(30,0) dcl 1-151 set ref 284* 284 relp parameter pointer dcl 167 set ref 159 234 237 246* 258 260* 280 291* retval 000221 automatic fixed bin(35,0) dcl 166 in procedure "sort_release" set ref 266* 309* 316* 325* retval 000203 automatic fixed bin(35,0) dcl 61 in procedure "sort_input_proc" set ref 103* 107* 115* 335* 339* seq_input 000117 automatic fixed bin(17,0) initial dcl 47 set ref 47* 80 sii defined fixed bin(30,0) dcl 1-163 set ref 218* 220 229* 281* 281 282 283 287 287 sip defined pointer dcl 1-166 set ref 201* 287 sort_code 000112 automatic fixed bin(35,0) dcl 47 set ref 99* 100 102 102 103* 107* 114 115* 121 sort_ext$compare_sw 000042 external static fixed bin(1,0) dcl 1-18 ref 274 274 sort_ext$curr_input_file_attach 000044 external static char(256) unaligned dcl 1-21 ref 72 72 73 73 103 103 107 107 335 335 339 339 sort_ext$curr_input_file_name 000046 external static char(256) unaligned dcl 1-24 ref 72 72 103 103 335 335 sort_ext$curr_input_file_num 000050 external static fixed bin(17,0) dcl 1-27 ref 69 69 103 103 107 107 335 335 339 339 sort_ext$in_buff_ptr 000060 external static pointer dcl 1-64 ref 89 89 97 97 sort_ext$input_rec_deleted 000054 external static fixed bin(30,0) dcl 1-58 set ref 252* 252 252 252 sort_ext$input_rec_inserted 000056 external static fixed bin(30,0) dcl 1-61 set ref 262* 262 262 262 sort_ext$input_record_exit_sw 000052 external static fixed bin(1,0) dcl 1-55 ref 232 232 288 288 sort_ext$max1 000062 external static fixed bin(30,0) dcl 1-70 ref 220 220 sort_ext$max2 000064 external static fixed bin(30,0) dcl 1-73 ref 220 220 sort_ext$max3 000066 external static fixed bin(30,0) dcl 1-76 ref 220 220 sort_ext$max_rec_length 000070 external static fixed bin(30,0) dcl 1-82 ref 47 190 190 307 307 sort_ext$mii 000072 external static fixed bin(17,0) dcl 1-98 set ref 216* 216 220 220 sort_ext$min_rec_length 000074 external static fixed bin(30,0) dcl 1-101 ref 195 195 314 314 sort_ext$read_count 000076 external static fixed bin(30,0) dcl 1-141 set ref 128* 128 128 128 sort_ext$release_count 000100 external static fixed bin(30,0) dcl 1-150 set ref 284* 284 284 284 sort_ext$sii 000102 external static fixed bin(30,0) dcl 1-162 set ref 218* 218 220 220 229* 229 281* 281 281 281 282 282 283 283 287 287 287 287 sort_ext$sip 000104 external static pointer dcl 1-165 ref 201 201 287 287 sort_ext$sort_input_record_exit 000106 external static entry variable dcl 1-173 ref 240 240 sort_ext$srp 000110 external static pointer dcl 1-183 ref 206 206 282 282 283 283 sort_ext$ssi 000112 external static fixed bin(30,0) dcl 1-186 set ref 200 200 217* 217 220 220 220 220 230* 230 273* 273 273 273 275 275 280 280 282 282 285* 285 285 285 sort_ext$ssp 000114 external static pointer dcl 1-189 ref 211 211 275 275 280 280 sort_ext$state 000116 external static fixed bin(17,0) dcl 1-192 ref 183 183 sort_ext$unique_prefix 000120 external static char(16) unaligned dcl 1-215 ref 69 69 201 201 206 206 211 211 325 325 sort_ext$wf_dir_name 000122 external static char(168) dcl 1-221 ref 201 201 206 206 211 211 325 325 325 325 sort_ext$whoami 000124 external static char(6) unaligned dcl 1-227 ref 103 103 107 107 115 115 266 266 309 309 316 316 325 325 335 335 339 339 sort_input_record_exit defined entry variable dcl 1-175 ref 240 sort_presort 000144 constant entry external dcl 161 ref 222 sort_release_len 000202 automatic fixed bin(21,0) dcl 60 set ref 98* 99* 154* 155* sort_release_ptr 000200 automatic pointer dcl 59 set ref 97* 99* 153* 155* srp defined pointer dcl 1-184 set ref 206* 282 283 ssi defined fixed bin(30,0) dcl 1-187 set ref 200 217* 220 220 230* 273* 273 275 280 282 285* 285 ssp defined pointer dcl 1-190 set ref 211* 275 280 state defined fixed bin(17,0) dcl 1-193 ref 183 sub_err_ 000146 constant entry external dcl 304 in procedure "ck_len" ref 309 316 sub_err_ 000040 constant entry external dcl 25 in procedure "sort_input_proc" ref 103 107 115 266 325 335 339 this_file_read_count 000177 automatic fixed bin(35,0) dcl 58 set ref 87* 96* 96 103* 107* 128 unique_prefix defined char(16) unaligned dcl 1-216 ref 69 201 206 211 325 w_p 000010 internal static pointer dcl 2-14 set ref 275* 276* 276 276 277 wf_dir_name defined char(168) dcl 1-222 set ref 201* 206* 211* 325 325 whoami defined char(6) unaligned dcl 1-228 set ref 103* 107* 115* 266* 309* 316* 325* 335* 339* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. S1 based char(1) array unaligned dcl 2-12 acl defined structure array level 1 unaligned dcl 1-6 b defined fixed bin(30,0) array dcl 1-13 compares_counter defined fixed bin(34,0) dcl 1-16 curr_output_file_attach defined char(256) unaligned dcl 1-31 curr_output_file_name defined char(256) unaligned dcl 1-34 debug_sw defined bit(1) unaligned dcl 1-37 disaster2 defined fixed bin(17,0) dcl 1-40 dt defined fixed bin(30,0) array dcl 1-43 error_table_$no_record external static fixed bin(35,0) dcl 32 error_table_$not_attached external static fixed bin(35,0) dcl 32 error_table_$not_closed external static fixed bin(35,0) dcl 32 error_table_$not_detached external static fixed bin(35,0) dcl 32 error_table_$not_open external static fixed bin(35,0) dcl 32 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 leng defined fixed bin(30,0) array dcl 1-68 max4 defined fixed bin(30,0) dcl 1-80 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 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 pt1 automatic pointer dcl 2-14 pt2 automatic pointer dcl 2-14 pu defined structure array level 1 unaligned dcl 1-137 rec_ptr_a defined pointer dcl 1-145 rec_ptr_b defined pointer dcl 1-148 report_sw defined bit(2) unaligned dcl 1-154 result automatic fixed bin(1,0) dcl 2-1 return_count defined fixed bin(30,0) dcl 1-157 rev defined fixed bin(1,0) array dcl 1-160 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$compares_counter external static fixed bin(34,0) dcl 1-15 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$debug_sw external static bit(1) unaligned dcl 1-36 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$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$leng external static fixed bin(30,0) array dcl 1-67 sort_ext$max4 external static fixed bin(30,0) dcl 1-79 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$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$pu external static structure array level 1 unaligned dcl 1-134 sort_ext$rec_ptr_a external static pointer dcl 1-144 sort_ext$rec_ptr_b external static pointer dcl 1-147 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$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_output_record_exit external static entry variable dcl 1-178 sort_ext$terminate_print_sw external static bit(1) unaligned dcl 1-195 sort_ext$time_info external static structure array level 1 unaligned dcl 1-198 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_full_name external static char(168) unaligned dcl 1-224 sort_ext$write_count external static fixed bin(30,0) dcl 1-230 sort_output_record_exit defined entry variable dcl 1-180 terminate_print_sw defined bit(1) unaligned dcl 1-196 time_info defined structure array level 1 unaligned dcl 1-203 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_full_name defined char(168) unaligned dcl 1-225 write_count defined fixed bin(30,0) dcl 1-231 NAMES DECLARED BY EXPLICIT CONTEXT. ck_len 001715 constant entry internal dcl 299 ref 245 257 cleanup_proc 002421 constant entry internal dcl 347 ref 68 111 117 122 342 close 000754 constant label dcl 128 ref 90 exit 001035 constant label dcl 146 in procedure "sort_input_proc" ref 112 118 123 343 exit 001714 constant label dcl 296 in procedure "sort_release" ref 269 312 319 hcs_error 002066 constant entry internal dcl 322 ref 203 208 213 iox_error 002230 constant entry internal dcl 332 ref 77 85 94 133 140 norm 001615 constant label dcl 273 ref 234 248 263 read 000442 constant label dcl 89 set ref 126 release 001042 constant entry external dcl 148 rep 001401 constant label dcl 232 ref 294 sort_input_proc 000240 constant entry external dcl 15 sort_release 001071 constant entry internal dcl 159 ref 99 155 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 275 before builtin function ref 325 325 divide builtin function ref 273 fixed builtin function ref 276 null builtin function ref 67 103 103 107 107 115 115 144 234 241 266 266 309 309 316 316 325 325 335 335 339 339 348 ptr builtin function ref 276 rel builtin function ref 276 substr builtin function set ref 275 280* 280 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3236 3406 2540 3246 Length 3754 2540 150 331 475 12 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME sort_input_proc 498 external procedure is an external procedure. on unit on line 68 64 on unit sort_release internal procedure shares stack frame of external procedure sort_input_proc. ck_len internal procedure shares stack frame of external procedure sort_input_proc. hcs_error internal procedure shares stack frame of external procedure sort_input_proc. iox_error internal procedure shares stack frame of external procedure sort_input_proc. cleanup_proc 70 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 w_p sort_release 000012 hold_ptr sort_release 000014 hold_len sort_release 000015 rec_len sort_release 000016 rec_ptr sort_release 000020 action sort_release 000021 close_exit sort_release STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME sort_input_proc 000100 in_switch sort_input_proc 000110 in_switch_length sort_input_proc 000111 iox_code sort_input_proc 000112 sort_code sort_input_proc 000114 in_iocb_ptr sort_input_proc 000116 in_mode sort_input_proc 000117 seq_input sort_input_proc 000120 no_extend sort_input_proc 000121 in_buff_len sort_input_proc 000122 in_rec_len sort_input_proc 000123 in_attach_desc sort_input_proc 000177 this_file_read_count sort_input_proc 000200 sort_release_ptr sort_input_proc 000202 sort_release_len sort_input_proc 000203 retval sort_input_proc 000220 presort_code sort_release 000221 retval sort_release 000222 hcs_code sort_release THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_var 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. hcs_$make_seg ioa_$rsnnl iox_$attach_ioname iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$open iox_$read_record sort_presort sub_err_ sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$end_of_info error_table_$fatal_error error_table_$long_record error_table_$out_of_sequence error_table_$request_not_recognized error_table_$short_record sort_ext$compare_sw sort_ext$curr_input_file_attach sort_ext$curr_input_file_name sort_ext$curr_input_file_num sort_ext$in_buff_ptr sort_ext$input_rec_deleted sort_ext$input_rec_inserted sort_ext$input_record_exit_sw sort_ext$max1 sort_ext$max2 sort_ext$max3 sort_ext$max_rec_length sort_ext$mii sort_ext$min_rec_length sort_ext$read_count sort_ext$release_count sort_ext$sii sort_ext$sip sort_ext$sort_input_record_exit sort_ext$srp sort_ext$ssi sort_ext$ssp sort_ext$state sort_ext$unique_prefix sort_ext$wf_dir_name sort_ext$whoami LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 47 000225 15 000235 66 000246 67 000250 68 000252 69 000274 72 000327 73 000352 74 000356 75 000402 77 000404 80 000413 81 000415 82 000432 85 000434 87 000441 89 000442 90 000461 91 000465 94 000467 96 000474 97 000500 98 000504 99 000506 100 000510 102 000512 103 000517 107 000602 110 000657 111 000663 112 000667 114 000670 115 000672 117 000737 118 000743 121 000744 122 000746 123 000752 126 000753 128 000754 130 000760 131 000770 133 000772 136 000777 137 001010 140 001012 143 001022 144 001033 146 001035 148 001036 153 001050 154 001054 155 001056 156 001070 159 001071 180 001073 183 001074 185 001100 186 001102 190 001103 192 001106 193 001110 195 001111 197 001113 198 001115 200 001116 201 001120 202 001165 203 001167 204 001176 206 001177 207 001245 208 001247 209 001256 211 001257 212 001325 213 001327 214 001336 216 001337 217 001341 218 001343 220 001344 222 001362 223 001370 224 001372 225 001374 229 001375 230 001377 232 001401 234 001404 237 001416 238 001422 239 001424 240 001425 241 001441 243 001452 245 001454 246 001472 247 001476 248 001500 250 001501 252 001503 253 001504 255 001505 257 001507 258 001525 259 001532 260 001534 261 001536 262 001540 263 001541 266 001542 268 001610 269 001614 273 001615 274 001623 275 001625 276 001634 277 001641 280 001644 281 001656 282 001657 283 001666 284 001673 285 001674 287 001675 288 001701 291 001706 292 001710 293 001712 294 001713 296 001714 299 001715 307 001726 309 001733 311 002002 312 002006 314 002007 316 002011 318 002060 319 002064 321 002065 322 002066 325 002104 328 002222 329 002227 332 002230 334 002241 335 002245 339 002333 342 002413 343 002417 347 002420 348 002426 349 002433 350 002443 351 002455 352 002467 ----------------------------------------------------------- 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