1 /* ====== BEGIN INCLUDE FILE            lister_structures.incl.pl1 ================================ */
  2 
  3 /*
  4    Modified 800813 by PB to add PUT_UID to listform declarations.
  5    Modified 800825 by PB for version 2 lister file.
  6    Modified 840523 by PB to add SELECT_BEG and SELECT_END.
  7 */
  8 /* MASTER DECLARATIONS */
  9 
 10 /* format: style3 */
 11 dcl       lister_file_version_2
 12                               fixed bin initial (2) internal static options (constant);
 13 
 14 dcl       1 input_file        based (in_file_ptr) aligned,
 15             2 (
 16             field_table_offset,
 17             record_head,
 18             record_tail,
 19             unused            (2)
 20             )                 offset (input_file.area),
 21             2 next_uid        fixed bin (24) unsigned,
 22             2 version         fixed bin,
 23             2 n_records       fixed bin (17),
 24             2 area            area (261112);
 25 
 26 dcl       1 update_file       based (up_file_ptr) aligned,
 27             2 (
 28             field_table_offset,
 29             record_head,
 30             record_tail,
 31             unused            (2)
 32             )                 offset (update_file.area),
 33             2 next_uid        fixed bin (24) unsigned,
 34             2 version         fixed bin,
 35             2 n_records       fixed bin (17),
 36             2 area            area (261112);
 37 
 38 dcl       1 output_file       based (out_file_ptr) aligned,
 39             2 (
 40             field_table_offset,
 41             record_head,
 42             record_tail,
 43             unused            (2)
 44             )                 offset (output_file.area),
 45             2 next_uid        fixed bin (24) unsigned,
 46             2 version         fixed bin,
 47             2 n_records       fixed bin (17),
 48             2 area            area (261112);
 49 
 50 dcl       1 input_record      based (recordp) aligned,
 51             2 next            offset (input_file.area),
 52             2 uid             fixed bin (24) unsigned unaligned,
 53             2 max_field_index fixed bin (12) unsigned unaligned,
 54             2 field           dim (0:field_table.max_field_index refer (input_record.max_field_index))
 55                               offset (input_file.area);
 56 
 57 dcl       1 update_record     based aligned,
 58             2 next            offset (update_file.area),
 59             2 uid             fixed bin (24) unsigned unaligned,
 60             2 max_field_index fixed bin (12) unsigned unaligned,
 61             2 field           dim (0:field_table.max_field_index refer (update_record.max_field_index))
 62                               offset (update_file.area);
 63 
 64 dcl       1 output_record     based aligned,
 65             2 next            offset (output_file.area),
 66             2 uid             fixed bin (24) unsigned unaligned,
 67             2 max_field_index fixed bin (12) unsigned unaligned,
 68             2 field           dim (0:field_table.max_field_index refer (output_record.max_field_index))
 69                               offset (output_file.area);
 70 
 71 dcl       atom                char (atom_length) based (atomp) varying aligned,
 72           atom_length         fixed bin initial (0),        /* for table option */
 73           atomp               ptr;
 74 
 75 dcl       (fidp, field_table_ptr, format_table_ptr, in_file_ptr, ltp, recordp, select_ptr, out_file_ptr, up_file_ptr)
 76                               ptr,
 77           n                   fixed bin;
 78 
 79 dcl       1 field_table       based (field_table_ptr) aligned,
 80             2 record_delimiter
 81                               unal char (1),
 82             2 field_delimiter unal char (1),
 83             2 max_field_index unal fixed bin (17),
 84             2 hash_field_id_to_index
 85                               dimension (0:18) offset,
 86             2 index_to_field_id
 87                               dimension (0:n refer (field_table.max_field_index)) offset;
 88 
 89 dcl       1 field_identifier  based (fidp) aligned,
 90             2 next            offset,
 91             2 field_index     unal fixed bin (17),
 92             2 size            unal fixed bin (17),
 93             2 string          unal char (n refer (field_identifier.size));
 94 
 95 dcl       system_area         area (261120) based (area_ptr);
 96 dcl       area_ptr            ptr;
 97 
 98 /* LISTFORM DECLARATIONS */
 99 
100 declare   (
101           PUT_LITERAL         initial (-1),
102           PUT_SPACES          initial (-2),
103           PUT_END             initial (-3),
104           PUT_DATE            initial (-4),
105           PUT_TIME            initial (-5),
106           PUT_RECORD_COUNT    initial (-6),
107           PUT_ARGUMENT        initial (-7),
108           PUT_UID             initial (-8)
109           )                   fixed bin internal static;
110 
111 dcl       1 format_table      aligned based (format_table_ptr),
112             2 size            fixed bin (17) unal,
113             2 before          fixed bin (17) unal,
114             2 after           fixed bin (17) unal,
115             2 record          fixed bin (17) unal,
116             2 literal_table   ptr,
117             2 item            dim (n refer (format_table.size)),
118               3 action        fixed bin (17) unal,
119               3 justification bit (2) unal,
120               3 argument_number
121                               fixed bin (15) unal,
122               3 width         fixed bin (21);
123 
124 dcl       1 literal_table     aligned based (ltp),
125             2 size            fixed bin,                    /* number of slots allocated */
126             2 n_literals      fixed bin,                    /* number of slots in use */
127             2 literal         dim (n refer (literal_table.size)) ptr unal;
128 
129 dcl       (
130           flush_left          initial ("00"b),
131           center              initial ("01"b),
132           flush_right         initial ("10"b)
133           )                   bit (2) aligned internal static options (constant);
134 
135 dcl       MIN_FIELD_INDEX     fixed bin initial (0) internal static options (constant);
136 
137 dcl       1 list_node         aligned based,
138             2 size            fixed bin,
139             2 list            dimension (n refer (list_node.size)) ptr;
140 
141 /* SELECT DECLARATIONS */
142 
143 dcl       1 select_expression based (select_ptr) aligned,
144             2 literal_table_ptr
145                               ptr,
146             2 size            fixed bin,
147             2 last_element    fixed bin,
148             2 element         dim (n refer (select_expression.size)),
149               3 opcode        unal bit (9),
150               3 not           unal bit (1),
151               3 top           unal bit (1),
152               3 unused        unal bit (7),
153               3 field_index   unal fixed bin (8),
154               3 literal_index unal fixed bin (8),
155           1 element           aligned,
156             2 opcode          fixed bin,
157             2 not             bit (1) aligned,
158             2 top             bit (1) aligned,
159             2 field_index     fixed bin,
160             2 literal_index   fixed bin,
161           operand1            fixed bin defined (element.field_index),
162           operand2            fixed bin defined (element.literal_index);
163 
164 dcl       (
165           SELECT_AND          init ("000000001"b),
166           SELECT_OR           init ("000000010"b),
167           SELECT_NOT          init ("000000011"b),
168           SELECT_FIND         init ("000000100"b),
169           SELECT_EQ           init ("000000101"b),
170           SELECT_LT           init ("000000110"b),
171           SELECT_GT           init ("000000111"b),
172           SELECT_LE           init ("000001000"b),
173           SELECT_GE           init ("000001001"b),
174           SELECT_NEQ          init ("000001010"b),
175           SELECT_NLT          init ("000001011"b),
176           SELECT_NGT          init ("000001100"b),
177           SELECT_NLE          init ("000001101"b),
178           SELECT_NGE          init ("000001110"b),
179           SELECT_BEG          init ("000001111"b),
180           SELECT_END          init ("000010000"b)
181           )                   bit (9) aligned internal static;
182 
183 dcl       (
184           ANY_FIELD           init (-1),
185           NULL_FIELD          init (-2),
186           NUMERIC_FIELD       init (-3),
187           UID                 init (-4)
188           )                   aligned fixed bin (8) static;
189 
190 dcl       1 numeric_atom      aligned based (atomp),
191             2 flag            fixed bin (35),               /* must be -1 */
192             2 value           float dec (29) unal;
193 
194 dcl       numeric_flag        fixed bin (35) internal static initial (-1) options (constant);
195 
196 /* SORT DECLARATIONS */
197 
198 declare   n_items_to_sort     fixed bin,
199           sort_list_ptr       ptr;
200 
201 declare   1 sort_list         aligned based (sort_list_ptr),
202             2 n_keys          fixed bin,
203             2 key             (n_items_to_sort refer (sort_list.n_keys)),
204               3 field_index   fixed bin,
205               3 ascending     bit (1) aligned,
206               3 numeric       bit (1) aligned;
207 
208 /* MERGE DECLARATIONS */
209 
210 dcl       (
211           MERGE_ADD           init (0),
212           MERGE_AND           init (1),
213           MERGE_OR            init (2),
214           MERGE_SUBTRACT      init (3)
215           )                   fixed bin internal static options (constant);
216 
217 /* ------ END INCLUDE FILE              lister_structures.incl.pl1 -------------------------------- */