1 dcl 1 sort_ext$acl(1) ext,
  2    2 x_user_id char(32),
  3    2 x_modes bit(36),
  4    2 x_pad bit(36),
  5    2 x_acl_code fixed bin(35);
  6 dcl 1 acl(1)
  7            defined(sort_ext$acl),
  8    2 user_id char(32),
  9    2 modes bit(36),
 10    2 pad bit(36),
 11    2 acl_code fixed bin(35);
 12 dcl sort_ext$b(0: 31) fixed bin(30) ext;                    /*  keys - bit offset (usually) for sort_comp  */
 13 dcl b(0: 31) fixed bin(30)
 14            defined (sort_ext$b);
 15 dcl sort_ext$compares_counter fixed bin(34) ext;            /*  compares executed, excluding sequence checker  */
 16 dcl compares_counter fixed bin(34)
 17            defined(sort_ext$compares_counter);
 18 dcl sort_ext$compare_sw fixed bin(1) ext;                   /*  1 = user compare exit specified  */
 19 dcl compare_sw fixed bin(1)
 20            defined (sort_ext$compare_sw);
 21 dcl sort_ext$curr_input_file_attach char(256) ext;          /*  attach description, current input file (Sort)  */
 22 dcl curr_input_file_attach char(256)
 23            defined(sort_ext$curr_input_file_attach);
 24 dcl sort_ext$curr_input_file_name char(256) ext;            /*  pathname, current input file (Sort)  */
 25 dcl curr_input_file_name char(256)
 26            defined (sort_ext$curr_input_file_name);
 27 dcl sort_ext$curr_input_file_num fixed bin(17) ext;         /*  number for current input file (Sort)  */
 28 dcl curr_input_file_num fixed bin(17)
 29            defined (sort_ext$curr_input_file_num);
 30 dcl sort_ext$curr_output_file_attach char(256) ext;         /*  attach description, output file  */
 31 dcl curr_output_file_attach char(256)
 32            defined(sort_ext$curr_output_file_attach);
 33 dcl sort_ext$curr_output_file_name char(256) ext;           /*  pathname, output file  */
 34 dcl curr_output_file_name char(256)
 35            defined (sort_ext$curr_output_file_name);
 36 dcl sort_ext$debug_sw bit(1) ext;                           /*  1 = -debug argument specified  */
 37 dcl debug_sw bit(1)
 38            defined(sort_ext$debug_sw);
 39 dcl sort_ext$disaster2 fixed bin(17) ext;                   /*  0 = first call to sort_return or merge_return  */
 40 dcl disaster2 fixed bin(17)
 41            defined (sort_ext$disaster2);
 42 dcl sort_ext$dt(0: 31) fixed bin(30) ext;                   /*  keys - datatype for sort_comp  */
 43 dcl dt(0: 31) fixed bin(30)
 44            defined (sort_ext$dt);
 45 dcl sort_ext$input_driver_is_sort bit(1) ext;               /*  1 = Sort reads input files, 0 = input_file exit  */
 46 dcl input_driver_is_sort bit(1)
 47            defined(sort_ext$input_driver_is_sort);
 48 dcl sort_ext$input_file_exit_sw bit(1) ext;                 /*  1 = user input_file exit specified  */
 49 dcl input_file_exit_sw bit(1)
 50            defined(sort_ext$input_file_exit_sw);
 51 dcl sort_ext$input_file_max fixed bin(17) ext;              /*  number of input files specified [init(10)]  */
 52                     /*  must also change  merge_return:  merge_read_count  &  input_file_len  */
 53 dcl input_file_max fixed bin(17)
 54            defined(sort_ext$input_file_max);
 55 dcl sort_ext$input_record_exit_sw fixed bin(1) ext;         /*  1 = user input_record exit specified  */
 56 dcl input_record_exit_sw fixed bin(1)
 57            defined(sort_ext$input_record_exit_sw);
 58 dcl sort_ext$input_rec_deleted fixed bin(30) ext;           /*  number of records deleted at input_record exit  */
 59 dcl input_rec_deleted fixed bin(30)
 60            defined(sort_ext$input_rec_deleted);
 61 dcl sort_ext$input_rec_inserted fixed bin(30) ext;          /*  number of records inserted _record exit  */
 62 dcl input_rec_inserted fixed bin(30)
 63            defined(sort_ext$input_rec_inserted);
 64 dcl sort_ext$in_buff_ptr ptr ext;                           /*  buffer for an input record (Sort or Merge reading)  */
 65 dcl in_buff_ptr ptr
 66            defined (sort_ext$in_buff_ptr);
 67 dcl sort_ext$leng(0: 31) fixed bin(30) ext;                 /*  keys - length or precision for sort_comp  */
 68 dcl leng(0: 31) fixed bin(30)
 69            defined (sort_ext$leng);
 70 dcl sort_ext$max1 fixed bin(30) ext;                        /*  limits size of unsorted string SS (sort_release)  */
 71 dcl max1 fixed bin(30)
 72            defined (sort_ext$max1);
 73 dcl sort_ext$max2 fixed bin(30) ext;                        /*  limits size of unsorted string SS (sort_release)  */
 74 dcl max2 fixed bin(30)
 75            defined (sort_ext$max2);
 76 dcl sort_ext$max3 fixed bin(30) ext;                        /*  maximum number of records per string SS  */
 77 dcl max3 fixed bin(30)
 78            defined (sort_ext$max3);
 79 dcl sort_ext$max4 fixed bin(30) ext;                        /*  maximum merge order allowed (sort_presort)  */
 80 dcl max4 fixed bin(30)
 81            defined (sort_ext$max4);
 82 dcl sort_ext$max_rec_length fixed bin(30) ext;              /*  maximum record length permitted by Sort or Merge;  */
 83                                                             /*  slightly less than sys_info$max_seg_size  */
 84 dcl max_rec_length fixed bin(30)
 85            defined (sort_ext$max_rec_length);
 86 dcl sort_ext$merge_compares fixed bin(34) ext;              /*  number of compares in merge  */
 87 dcl merge_compares fixed bin(34)
 88            defined(sort_ext$merge_compares);
 89 dcl sort_ext$merge_in_iocb_ptrs(10) ptr ext;                /*  iox_ iocb's for Merge input files  */
 90 dcl merge_in_iocb_ptrs(10) ptr
 91            defined(sort_ext$merge_in_iocb_ptrs);
 92 dcl sort_ext$merge_input_file_attaches(10) char(256) ext;   /*  attach descriptions, Merge input files  */
 93 dcl merge_input_file_attaches(10) char(256)
 94            defined(sort_ext$merge_input_file_attaches);
 95 dcl sort_ext$merge_input_file_names(10) char(256) ext;      /*  pathnames, Merge input files  */
 96 dcl merge_input_file_names(10) char(256)
 97            defined(sort_ext$merge_input_file_names);
 98 dcl sort_ext$mii fixed bin(17) ext;                         /*  merge order for Sort [init(0)]  */
 99 dcl mii fixed bin(17)
100            defined (sort_ext$mii);
101 dcl sort_ext$min_rec_length fixed bin(30) ext;              /*  record length required to include all key fields  */
102 dcl min_rec_length fixed bin(30)
103            defined (sort_ext$min_rec_length);
104 dcl sort_ext$mip (1000) fixed bin(30) ext;                  /*  number of records in each string MS for merge  */
105 dcl mip (1000) fixed bin(30)
106            defined (sort_ext$mip);
107 dcl sort_ext$msp (1000) ptr ext;                            /*  sorted strings MS(1:mii) to be merged  */
108 dcl msp (1000) ptr
109            defined (sort_ext$msp);
110 dcl sort_ext$no_of_keys fixed bin(30) ext;                  /*  number of keys specified  */
111 dcl no_of_keys fixed bin(30)
112            defined(sort_ext$no_of_keys);
113 dcl sort_ext$old_input_file_num fixed bin(17) ext;          /*  used for identifying files with bad key data  */
114 dcl old_input_file_num fixed bin(17)                        /*       (illegal_procedure handler in sort_presort)  */
115            defined(sort_ext$old_input_file_num);
116 dcl sort_ext$output_driver_is_sort bit(1) ext;              /*  1 = Sort or Merge writes output file;  */
117 dcl output_driver_is_sort bit(1)                            /*  0 = output_file exit  */
118            defined(sort_ext$output_driver_is_sort);
119 dcl sort_ext$output_file_exit_sw bit(1) ext;                /*  1 = user output_file exit specified  */
120 dcl output_file_exit_sw bit(1)
121            defined(sort_ext$output_file_exit_sw);
122 dcl sort_ext$output_rec_deleted fixed bin(30) ext;          /*  number of records deleted at output_record exit  */
123 dcl output_rec_deleted fixed bin(30)
124            defined(sort_ext$output_rec_deleted);
125 dcl sort_ext$output_rec_inserted fixed bin(30) ext;         /*  number of record inserted at output_record exit  */
126 dcl output_rec_inserted fixed bin(30)
127            defined(sort_ext$output_rec_inserted);
128 dcl sort_ext$output_record_exit_sw fixed bin(1) ext;        /*  1 = user output_record exit specified  */
129 dcl output_record_exit_sw fixed bin(1)
130            defined(sort_ext$output_record_exit_sw);
131 dcl sort_ext$presort_compares fixed bin(34) ext;            /*  number of compares in presort  */
132 dcl presort_compares fixed bin(34)
133            defined(sort_ext$presort_compares);
134 dcl 1 sort_ext$pu(5) ext,
135    2 x_n fixed bin,                                         /*  [init((5) 1)]  */
136    2 x_rcpu fixed bin(71);
137 dcl 1 pu(5)
138            defined(sort_ext$pu),
139    2 n fixed bin,
140    2 rcpu fixed bin(71);
141 dcl sort_ext$read_count fixed bin(30) ext;                  /*  number of records read by Sort (or by Merge)  */
142 dcl read_count fixed bin(30)
143            defined (sort_ext$read_count);
144 dcl sort_ext$rec_ptr_a ptr ext;                             /*  buffer for output_record exit and sequence checker  */
145 dcl rec_ptr_a ptr
146            defined(sort_ext$rec_ptr_a);
147 dcl sort_ext$rec_ptr_b ptr ext;                             /*  buffer for output_record exit and sequence checker  */
148 dcl rec_ptr_b ptr
149            defined(sort_ext$rec_ptr_b);
150 dcl sort_ext$release_count fixed bin(30) ext;               /*  number of records released to Sort (Merge)  */
151 dcl release_count fixed bin(30)
152            defined (sort_ext$release_count);
153 dcl sort_ext$report_sw bit(2) ext;                          /*  00 = print summary report, 01 = suppress  */
154 dcl report_sw bit(2)
155            defined (sort_ext$report_sw);
156 dcl sort_ext$return_count fixed bin(30) ext;                /*  number of records returned from Sort (Merge)  */
157 dcl return_count fixed bin(30)
158            defined (sort_ext$return_count);
159 dcl sort_ext$rev(0: 31) fixed bin(1) ext;                   /*  keys - descending indicator for sort_comp  */
160 dcl rev(0: 31) fixed bin(1)
161            defined (sort_ext$rev);
162 dcl sort_ext$sii fixed bin(30) ext;                         /*  number of records, current string (sort_release)  */
163 dcl sii fixed bin(30)
164            defined (sort_ext$sii);
165 dcl sort_ext$sip ptr ext;                                   /*  SI - tree of indices (subscripts) for records  */
166 dcl sip ptr                                                 /*       being sorted or merged  */
167            defined (sort_ext$sip);
168 dcl sort_ext$sort_compare_exit variable                     /*  entry point, user compare exit procedure  */
169            entry(ptr, ptr) returns(fixed bin(1)) ext;
170 dcl sort_ext$sort_desc_pn  char(168) ext;                   /*  pathname, Sort (Merge) Description segment  */
171 dcl sort_desc_pn char(168)
172            defined(sort_ext$sort_desc_pn);
173 dcl sort_ext$sort_input_record_exit variable                /*  entry point, user input_record exit procedure  */
174            entry(ptr, fixed bin(21), fixed bin, bit(1)) ext;
175 dcl sort_input_record_exit variable
176           entry(ptr, fixed bin(21), fixed bin, bit(1))
177            defined(sort_ext$sort_input_record_exit);
178 dcl sort_ext$sort_output_record_exit variable               /*  entry point, user output_record exit procedure  */
179           entry(ptr, fixed bin(21), ptr, fixed bin(21), fixed bin, fixed bin(1), bit(1), bit(1), bit(1)) ext;
180 dcl sort_output_record_exit variable
181           entry(ptr, fixed bin(21), ptr, fixed bin(21), fixed bin, fixed bin(1), bit(1), bit(1), bit(1))
182           defined(sort_ext$sort_output_record_exit);
183 dcl sort_ext$srp ptr ext;                                   /*  SR - position and length of each record  */
184 dcl srp ptr                                                 /*       in SS string for presort  */
185            defined (sort_ext$srp);
186 dcl sort_ext$ssi fixed bin(30) ext;                         /*  char offset in SS of current record (sort_release)  */
187 dcl ssi fixed bin(30)
188            defined (sort_ext$ssi);
189 dcl sort_ext$ssp ptr ext;                                   /*  SS - unsorted string during presort  */
190 dcl ssp ptr
191            defined (sort_ext$ssp);
192 dcl sort_ext$state fixed bin(17) ext;                       /*  state variable controlling sequence of calls to  */
193 dcl state fixed bin(17)                                     /*    the various stages of the Sort (Merge) [init(0)]  */
194            defined (sort_ext$state);
195 dcl sort_ext$terminate_print_sw bit(1) ext;                 /*  0 = command prints (sort_merge_print_report)  */
196 dcl terminate_print_sw bit(1)                               /*  1 = subroutine prints (sort_merge_terminate)  */
197            defined (sort_ext$terminate_print_sw);
198 dcl 1 sort_ext$time_info(5) ext,                            /*  used for -time information  */
199    2 x_etime fixed bin(71),
200    2 x_vtime fixed bin(71),
201    2 x_pf fixed bin,
202    2 x_pd_f fixed bin;
203 dcl 1 time_info(5)
204            defined(sort_ext$time_info),
205    2 etime fixed bin(71),
206    2 vtime fixed bin(71),
207    2 pf fixed bin,
208    2 pd_f fixed bin;
209 dcl sort_ext$time_sw bit(1) ext;                            /*  1 = -time argument specified  */
210 dcl time_sw bit(1)
211            defined(sort_ext$time_sw);
212 dcl sort_ext$user_out_sw char(32) ext;                      /*  I/O switch for summary report, diagnostics:  */
213 dcl user_out_sw char(32)                                    /*       "user_output", "" = suppress, other = user switch  */
214            defined(sort_ext$user_out_sw);
215 dcl sort_ext$unique_prefix char(16) ext;                    /*  unique to each invocation, for temporary names  */
216 dcl unique_prefix char(16)
217            defined (sort_ext$unique_prefix); /* -4- */
218 dcl sort_ext$w(0: 31) fixed bin(30) ext;                    /*  keys - word (sometimes char) offset for sort_comp  */
219 dcl w(0: 31) fixed bin(30)
220            defined (sort_ext$w);
221 dcl sort_ext$wf_dir_name char(168) aligned ext;             /*  -td directory pathname argument  */
222 dcl wf_dir_name char(168) aligned
223            defined(sort_ext$wf_dir_name);
224 dcl sort_ext$wf_full_name char(168) ext;                    /*  absolute -td directory pathname  */
225 dcl wf_full_name char(168)
226            defined (sort_ext$wf_full_name); /* -42- */
227 dcl sort_ext$whoami char(6) ext;                            /*  "sort", "merge", "sort_", "merge_" called  */
228 dcl whoami char(6)
229            defined (sort_ext$whoami); /* -2- */
230 dcl sort_ext$write_count fixed bin(30) ext;                 /*  number of records written by Sort (Merge)  */
231 dcl write_count fixed bin(30)
232            defined (sort_ext$write_count);