1 
  2 /* begin include file ...cobol_report_writer.incl.pl1 */
  3 /* Modified since Version 5.0 */
  4 
  5                     declare   1         list_link based(list_link_ptr),
  6                               2                   next      ptr,
  7                               2                   loc       ptr;
  8 
  9 
 10                     declare list_link_ptr ptr;
 11 
 12 
 13 
 14                     declare   1         list_def  based(list_def_ptr),
 15                               2                   first     ptr,                /* first elem */
 16                               2                   last      ptr,                /* last_elem */
 17                               2                   count     fixed bin;          /* elem count */
 18 
 19 
 20                     declare list_def_ptr ptr;
 21 
 22 
 23 
 24 
 25                     declare   1         integer_spec        based(integer_spec_ptr),
 26                               2                   first     ptr,                /* first token */
 27                               2                   last      ptr,                /* last token */
 28                               2                   count     fixed bin,          /* value */
 29                               2                   type      fixed bin;          /* 0(missing)1(integer)2(ae) */
 30 
 31                     declare integer_spec_ptr ptr;
 32 
 33 /* report description */
 34 
 35                     declare   1         report    based(current_report_loc),
 36                               2                   rep_next  ptr,
 37                               2                   rep_up    ptr,                /* parent, null() */
 38                               2                   rep_tok_line fixed bin,
 39                               2                   rep_tok_column fixed bin,
 40                               2                   rep_type  fixed bin,          /* 0 */
 41                               2                   rep_level fixed bin,          /* 0 */
 42                               2                   rep_name_ptr ptr,             /* report name */
 43                               2                   code char(32) varying,        /* CODE clause */
 44                               2                   page                          /* PAGE clause */
 45                                                      like integer_spec,
 46                               2                   heading                       /* HEADING clause */
 47                                                      like integer_spec,
 48                               2                   first_detail                  /* FIRST DETAIL clause */
 49                                                      like integer_spec,
 50                               2                   last_detail                   /* LAST DETAIL clause */
 51                                                      like integer_spec,
 52                               2                   footing                       /* FOOTING clause */
 53                                                      like integer_spec,
 54                               2                   file_name ptr, /* report file name */
 55                               2                   rep_sum_ptr         ptr,
 56                               2                   controls,
 57                               3                             loc       ptr,
 58                               3                             final     bit(1),
 59                               2                   g_i_count fixed bin,
 60                               2                   rh        ptr,                /* RH group */
 61                               2                   rf        ptr,                /* RF group */
 62                               2                   ph        ptr,                /* PH group */
 63                               2                   pf        ptr,                /* PF group */
 64 
 65                               2                   de        ptr,                /* DE table */
 66                               2                   ch        ptr,                /* CH table */
 67                               2                   cf        ptr,                /* CF table */
 68                               2                   rep_num   fixed bin,
 69                               2                   indicators,
 70                               3                             ng_exists bit(1); /* "1"b if group has NEXT GROUP clause */
 71 
 72 
 73                     declare current_report_loc ptr;
 74 
 75 
 76 
 77 
 78 /* root node */
 79 
 80                     declare   1         root      based(rt_ptr),                          /* report group descr */
 81                               2                   rt_next   ptr,
 82                               2                   rt_up     ptr,                          /* parent chain */
 83                               2                   rt_tok_line         fixed bin,
 84                               2                   rt_tok_column       fixed bin,
 85                               2                   rt_type             fixed bin,          /* 3 */
 86                               2                   rt_level            fixed bin,
 87                               2                   rt_name_ptr         ptr,                /* report group name */
 88                               2                   line,                                   /* LINE clause */
 89                               3                             value     fixed bin,
 90                               3                             type      fixed bin,
 91           /* 0(missing)1(integer)2(PLUS integer)3(PAGE integer) */
 92 
 93                               2                   next_group,                             /* NEXT GROUP clause */
 94                               3                             value fixed bin,
 95                               3                             type fixed bin,
 96                     /*0(missing)1(NEXT PAGE),2(integer),3(PLUS integer)*/
 97                               2                   use_proc,
 98                               3                             use_proc_name_ptr ptr,        /* loc of use proc name */
 99                               3                             suppress bit(1),              /* SUPPRESS PRINTING */
100 
101 
102                               2                   group_type          fixed bin,
103 
104           /* 1(RH), 2(PH), 3(CH), 4(DE), 5(CF), 6(PF), 7(RF) */
105 
106                               2                   field_table_ptr ptr,                    /* field table loc */
107                               2                   line_table_ptr ptr,                     /* line table loc */
108                               2                   group_desc,
109                               3                             type fixed bin, /*0(missing)1(abs)2(rel)3(page)*/
110                               3                             line fixed bin, /* i1(page,abs),j1(rel)*/
111                               3                             size fixed bin, /* first line to last line */
112                               2                   group_number fixed bin,                 /* group number */
113                               2                   usage_disp          bit(1) unal,
114                               2                   nodes                                   /* report group nodes          */
115                                                      like list_def;
116 
117 
118                     declare rt_ptr ptr;
119 
120 
121 
122 
123 /* non_terminal node */
124 
125                     declare   1         non_term_node       based(ntn_ptr),     /* non-terminal node */
126                               2                   ntn_next  ptr,
127                               2                   ntn_up    ptr,                                    /* parent chain */
128                               2                   ntn_tok_line        fixed bin,
129                               2                   ntn_tok_column      fixed bin,
130                               2                   ntn_type            fixed bin,          /* 1 */
131                               2                   ntn_level           fixed bin,          /* ntn_level number */
132                               2                   ntn_name_ptr        ptr,                /* node name */
133                               2                   LINE
134                                                        like non_term_node_line;
135 
136 
137                     declare ntn_ptr ptr;
138 
139 
140 
141 
142                     declare   1         non_term_node_line based,
143                               2                   line,                                   /* LINE clause */
144                               3                             value     fixed bin,
145                               3                             type      fixed bin,
146 
147           /* 0(missing)1(integer)2(PLUS integer)3(PAGE integer) */
148 
149                               2                   usage_disp          bit(1) unal;        /* USAGE clause */
150 
151 
152 /* terminal node */
153 
154 
155                     declare   1         term_node based(tn_ptr),                          /* terminal node */
156                               2                   tn_next   ptr,
157                               2                   tn_up     ptr,                          /* parent ptr */
158                               2                   tn_tok_line         fixed bin,
159                               2                   tn_tok_column       fixed bin,
160                               2                   tn_type             fixed bin,          /* 2 */
161                               2                   tn_level  fixed bin,                    /* level number */
162                               2                   tn_name_ptr         ptr,                /* node tn_name */
163                               2                   LINE
164                                                        like term_node_line;
165 
166 
167                     declare tn_ptr ptr;
168 
169                     declare   1         term_node_line      based,
170                               2                   line,                         /* LINE clause */
171                               3                             value     fixed bin,
172                               3                             type      fixed bin,
173           /* 0(missing)1(integer)2(PLUS integer)3(PAGE integer) */
174 
175                               2                   usage_disp bit(1) unal,       /* USAGE clause */
176                               2                   blank_zero bit(1) unal,       /* BLANK clause */
177                               2                   group_ind bit(1) unal,        /* GROUP INDICATE clause */
178                               2                   just_right bit(1) unal,       /* JUSTIFIED clause */
179                               2                   reset     bit(1) unal,
180                               2                   non_num   bit(1) unal,
181                               2                   sign fixed bin(4) unal unsigned,
182           /* 0(missing)1(leading)2(trailing)3(leading sep)4(trailing sep) */    /* SIGN clause */
183                               2                   data_type fixed bin(2) unal unsigned,
184           /* 0(missing)1(SOURCE)2(VALUE)3(SUM) */
185                               2                   g_i_count fixed bin, /* group indicate number */
186                               2                   rep_sum_ptr         ptr,      /* sum counter chain for the report */
187                               2                   column,                                 /* COLUMN clause */
188                               3                             value     fixed bin,          /* lexeme defining integer */
189                               3                             type      fixed bin,
190 
191           /* 0(missing)1(integer)2(PLUS integer) */
192 
193                               2                   picture   ptr,                /* PICTURE clause */
194                               2                   nd_loc              ptr, /* source-sum-value clause */
195                               2                   rep_group_ptr       ptr;      /* loc of group node */
196 
197 
198 /* CH table */
199 
200                     declare   1         ch_table based(ch_table_ptr),
201                               2                   ch_size   fixed bin,
202                               2                   entry(0: ch_table_size refer(ch_table.ch_size)),
203                               3                             ch_loc              ptr, /* node defining CH group */
204                               3                             ch_sum_chain        ptr,
205                               3                             ch_crossfoot
206                                                                  like list_def,
207                               3                             ch_rollfwd
208                                                                  like list_def,
209                               3                             ch_reset
210                                                                  like list_def,
211 
212                               3                             ch_sum_name_seq_ptr ptr;
213 
214                     declare ch_table_ptr ptr;
215                     declare ch_table_size fixed bin;
216 
217 
218 /* CF table */
219 
220                     declare   1         cf_table based(cf_table_ptr),
221                               2                   cf_size   fixed bin,
222                               2                   entry(0:cf_table_size refer(cf_table.cf_size)),
223                               3                             cf_loc              ptr, /* node defining CF group */
224                               3                             cf_sum_chain        ptr, /* sum counter chain */
225                               3                             cf_crossfoot
226                                                                  like list_def,
227                               3                             cf_rollfwd
228                                                                  like list_def,
229                               3                             cf_reset
230                                                                  like list_def,
231                               3                             cf_sum_name_seq_ptr ptr; /* seq of sum ctr names */
232 
233                     declare cf_table_ptr ptr;
234                     declare cf_table_size fixed bin;
235 
236 
237 /* de table */
238 
239 
240                     declare   1         de_table based(de_table_ptr),
241                               2                   det_name_seq_ptr ptr, /* seq of de group names */
242                               2                   det_subtot_all
243                                                        like list_def,
244                               2                   det_size  fixed bin,
245                               2                   entry(de_table_size refer(de_table.det_size)),
246                               3                             det_loc   ptr,
247                               3                             det_subtot
248                                                                  like list_def;
249 
250                     declare de_table_ptr ptr;
251                     declare de_table_size fixed bin;
252 
253 
254 /* group table */
255 
256 
257 
258 /* line table */
259 
260 declare   1         LINE_table based(LINE_table_ptr),
261           2                   LT_size   fixed bin,
262           2                   LT(line_table_size refer(LINE_table.LT_size)),
263           3                             LT_first_field      fixed bin,          /* field table entry, first field */
264           3                             LT_field_count      fixed bin,          /* field count */
265           3                             LT_line_size        fixed bin,          /* size of the line */
266           3                             LT_line_num         fixed bin;          /* pos(abs), neg(rel) */
267 
268 
269                     declare LINE_table_ptr ptr;
270                     declare line_table_size fixed bin;
271 
272 /* field table */
273 
274           declare   1         FIELD_table based(FIELD_table_ptr),
275                     2                   FT_size   fixed bin,
276                     2                   FT(field_table_size refer(FIELD_table.FT_size)),
277                     3                             FT_loc              ptr,      /* node defining field */
278                     3                             FT_field_pos        fixed bin,          /* abs col num if printable */
279                     3                             FT_field_size       fixed bin,          /* size(pic and sign) */
280                     3                             FT_left_fill_size   fixed bin;          /* pos(rel), neg(abs) */
281 
282 
283                     declare FIELD_table_ptr ptr;
284                     declare field_table_size fixed bin;
285 
286 /* qual name */
287 
288 
289 
290 
291                     declare   1         qual_name based(qual_name_ptr),         /* descr of qual name */
292                               2                   qn_size   fixed bin,          /* count of comps */
293                               2                   qn_loc(qual_name_size refer(qual_name.qn_size))   ptr;
294 
295                     declare qual_name_size fixed bin;
296                     declare qual_name_ptr ptr;
297 
298 
299 
300 
301 /* qual name sequence */
302 
303 
304 
305                     declare   1         qual_name_seq       based(qual_name_seq_ptr),
306                               2                   qns_size  fixed bin,
307                               2                   qns_loc(qual_name_seq_size refer(qual_name_seq.qns_size))   ptr;
308 
309                     declare qual_name_seq_size fixed bin;
310                     declare qual_name_seq_ptr ptr;
311 
312 /* sum counter chain entry */
313 
314                     declare   1         sum based(sum_ptr),
315                               2                   sum_next  ptr,
316                               2                   sum_loc   ptr,
317                               2                   sum_qn_ptr          ptr;
318 
319                     declare sum_SIZE fixed bin;
320                     declare sum_ptr ptr;
321 
322 
323 /* def of identifier */
324 
325                     declare   1         ident     based(ident_ptr),
326                               2                   id_name_loc         ptr,      /* def of qual id_name */
327                               2                   subscripts
328                                                        like list_def;
329 
330                     declare ident_ptr ptr;
331                     declare ident_SIZE fixed bin;
332 
333 
334 
335 
336 /* sum_counter def */
337 
338                     declare   1         sum_counter         based(sum_counter_ptr),
339                               2                   sct_reset_loc       ptr,                /* def of RESET clause */
340                               2                   sct_size            fixed bin,          /* count of SUM clauses */
341                               2                   sct_loc(sum_counter_size refer(sum_counter.sct_size)) ptr;
342 
343                     declare sum_counter_size fixed bin;
344                     declare sum_counter_ptr ptr;
345 
346                     declare sum_counter_lifo_ptr ptr;
347 
348 
349 
350 /* def of sum clause */
351 
352 
353                     declare   1         sum_clause          based(sum_clause_ptr),
354                               2                   sc_upon_loc         ptr,                /* def of UPON clause */
355                               2                   sc_size             fixed bin,          /* ident count */
356                               2                   sc_loc(sum_clause_size refer(sum_clause.sc_size)) ptr;
357 
358                     declare sum_clause_size fixed bin;
359                     declare sum_clause_ptr ptr;
360                     declare sum_clause_lifo_ptr ptr;
361 
362 /* upon clause */
363 
364                     declare   1         upon_clause based(upon_clause_ptr),
365                               2                   upon_size fixed bin,
366                               2                   upon_loc(0 refer(upon_clause.upon_size)) ptr;
367 
368                     declare upon_clause_ptr ptr;
369 
370 /* reset clause description */
371 
372                     declare   1         reset_clause        based(reset_clause_ptr),
373                               2                   rc_loc    ptr,
374                               2                   rc_final  bit(1);
375 
376                     declare reset_clause_ptr ptr;
377                     declare reset_clause_SIZE fixed bin;
378 
379 /* reset chain entry */
380 
381                     declare   1         reset_chain_entry based(reset_chain_entry_ptr)
382                                              like list_link;
383 
384                     declare reset_chain_entry_ptr ptr;
385                     declare reset_chain_entry_SIZE fixed bin;
386 
387 /* chain entry */
388 
389 
390                     declare   1         chain_entry         based(chain_entry_ptr),
391                               2                   ce_next   ptr,
392                               2                   ce_loc    ptr, /* addend loc */
393                               2                   ce_sum_loc ptr; /* sum counter loc */
394 
395                     declare chain_entry_ptr ptr;
396                     declare chain_entry_SIZE fixed bin;
397 
398 
399                     declare   1         picture based(addr_record),
400                               2                   size      fixed bin,
401                               2                   line      fixed bin,
402                               2                   column    fixed bin,
403                               2                   type      fixed bin,
404                               2                   length    fixed bin,
405                               2                   string    char(0 refer(picture.length));
406 
407                     declare (sum_ctr_ctr , user_word_size) fixed bin;
408                     declare user_word_ptr ptr;
409 
410                     declare   1         user_word based(addr_record),
411                               2                   size      fixed bin,
412                               2                   line      fixed bin,
413                               2                   column    fixed bin,
414                               2                   type      fixed bin,
415                               2                   info      bit(8),
416                               2                   length    fixed bin,
417                               2                   word      char(0 refer(user_word.length));
418 
419 /* end include file ... cobol_report_writer.incl.pl1 */