1 /* Begin mrds_compiled_se_info.incl.pl1 -- John Hergert 09/01/84
 2    Data structure to hold all pertinent information regarding compiled
 3    selection expressions. Most of this information is put into the dbcb
 4    variables having the same names when the compiled selection is referenced.
 5 */
 6 
 7 
 8 /****^  HISTORY COMMENTS:
 9   1) change(87-01-22,Hergert), approve(88-05-19,MCR7903),
10      audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073):
11      Removed all references to var_exists_ptr.
12                                                    END HISTORY COMMENTS */
13 
14 
15 dcl     1 compiled_se_info     aligned based (compiled_se_info_ptr),
16           2 real_select_area_ptr ptr,                       /* the real one assigned at open time */
17           2 compile_area_ptr   ptr,                         /* run time work area */
18           2 temp_x_leaf_ptr    ptr,                         /* temp place to hold ptr to pred_leaf_list of .x.'s */
19           2 temp_temp_rel_list_ptr ptr,                     /* temporary holding spot for list of temp rels */
20           2 number_of_compiled_se                           /* count of number of cse's weve had in this opening */
21                                fixed bin (35),
22 
23 
24           2 se_info            (1                           /* various peices of information needed to describe the se */
25                                refer (compiled_se_info.number_of_compiled_se)),
26             3 free             bit(1) unal,                 /* indicates whether this se is being used or not */
27             3 dup_retain       bit(1) unal,                 /* se had a -dup in it */
28             3 reserved         bit(34) unal,                /* a few spares */
29             3 se_id_num        fixed bin(35),               /* the unique id num for the se */
30             3 seg_ptr          ptr,                         /* points to seg that has compiled se */
31             3 saved_ptrs,                                   /* these point to the various tables in the seg */
32               5 select_area_ptr
33                                ptr,
34               5 range_ptr      ptr,
35               5 select_ptr     ptr,
36               5 ti_ptr         ptr,
37               5 ss_ptr         ptr,
38               5 so_ptr         ptr,
39               5 temp_rel_list_ptr ptr,
40               5 x_leaf_ptr     ptr,                         /* ptr to list of ptrs to pred leaves for .x.'s */
41               5 lit_ptr        ptr,
42               5 reserved       (5) ptr;
43 
44 dcl     compiled_se_info_ptr   ptr;
45 
46 
47 
48 /* info relating to the attributes and the literal for filling .X.'s */
49 
50 dcl  1 x_pred_leaf  based (x_pred_leaf_ptr) aligned,
51        2 number_of_x fixed bin (35),                       /* number of .x. specified in this selection expr */
52        2 lit_arg_ptr ptr,                                  /* temp pointer to literal arg */
53        2 lit_desc_ptr ptr,                                  /* temp pointer to literal desc */
54        2 info (mrds_data_$max_pred_nodes refer (x_pred_leaf.number_of_x)), /* this should be big enough */
55          3 encode_proc bit unal,                            /* does this .x. have to be encoded */
56          3 pad bit(35) unal,
57          3 encode_entry entry,                              /* encode proc */
58          3 encode_in_desc_ptr ptr,                          /* ptr to input to encode descrptior */
59          3 encode_out_desc_ptr ptr,                         /* ptr to encoded descrptior */
60          3 encode_bit_len fixed bin(35),                    /* length in bits of encoded value */
61          3 lit_val_len fixed bin(35),                       /* length of value in bits to go in lit pool */
62          3 lit_val_ptr ptr;                                 /* ptr to value in lit pool */
63 
64 
65 dcl     x_pred_leaf_ptr     ptr;
66 
67 
68 /* array of names for the temp rels used in a cse */
69 /* these are used to make sure the temp isnt redefined on us after the se is compiled */
70 dcl  1 temp_rel_list based (trl_ptr) aligned,
71        2 number_of_temp_rels fixed bin(35),  /* total number of temp rels in se including sets */
72        2 temp_rel_info (mrds_data_$max_temp_rels) ,
73          3 name char(32),                    /* model name */
74          3 index fixed bin(35);              /* temp rel index */
75 
76 
77 dcl trl_ptr ptr;