1 /* BEGIN INCLUDE vrm_search_list.incl.pl1 */
 2 
 3 dcl  vrm_search_list_ptr pointer;
 4 dcl  vsl_number_of_and_groups fixed bin;
 5 dcl  vsl_max_number_of_constraints fixed bin;
 6 
 7 dcl 1 vrm_search_list aligned based (vrm_search_list_ptr),
 8     2 num_and_groups fixed bin (17) unal,                   /* Number of and groups in list */
 9     2 max_num_constraints fixed bin (17) unal,              /* Maximum number of constraints in any search spec and group */
10     2 current_and_group fixed bin (17) unal,
11     2 and_groups (vsl_number_of_and_groups refer (vrm_search_list.num_and_groups)),
12       3 num_cons_in_this_and_group fixed bin (17) unal,     /* Number of constriants in this and group */
13       3 num_key_cons_in_this_and_group fixed bin (17) unal, /* Number of key constraints in this and group */
14       3 num_seek_key_attr_count fixed bin (17) unal,        /* Number of attributes in seek key */
15       3 pos_of_first_bad_key_tail_attr fixed bin (17) unal, /* Key attribute position of first bad key_tail attr */
16       3 seek_key_con_ix fixed bin (17) unal,                /* Constraint index to be used for seek key */
17       3 do_not_use_sw bit (1) unal,                         /* ON = Do not use this and group
18                                                                it has been optimized out */
19       3 collection_id_supplied_sw bit (1) unal,             /* ON IF collection id was supplied in search_spec */
20       3 must_initialize_sw bit (1) unal,                    /* ON = init must be done */
21       3 multi_attr_seek_head_sw bit (1) unal,               /* ON = Seek head is a multi-attribute key */
22       3 full_key_equal_only_sw bit (1) unal,                /* ON = All operators in seek head key were =
23                                                                  and it was the full key */
24       3 unused bit (13) unal,
25       3 collection_id bit (36) aligned,                     /* Collection id if supplied_sw is ON */
26       3 collection_info_ptr ptr unal,                       /* IF collection_id_supplied_sw = ON then
27                                                                this is vrm_collection_info_ptr */
28 
29       3 cons (vsl_max_number_of_constraints refer (vrm_search_list.max_num_constraints))
30      like constraint_info;
31 
32 dcl 1 constraint_info based,
33 
34     2 val_ptr pointer unal,                                 /* Pointer to data value */
35     2 attr_desc_ptr pointer unal,                           /* Pointer to vrm_rel_desc attribute descriptor
36                                                                for this attribute */
37     2 encoded_key_ptr pointer unal,                         /* Pointer to encoded key value if this field
38                                                                is a key for this cursor */
39     2 encoded_key_length fixed bin (17) unal,               /* Length in char of encoded key */
40     2 search_keys_ix fixed bin (17) unal,                   /* Index into encoded_key table for this key */
41     2 key_offset fixed bin (17) unal,                       /* Offset to first bit in key of this encoded key */
42     2 key_bit_length fixed bin (17) unal,                   /* Length of key in bits */
43     2 attr_position_in_key fixed bin (17) unal,             /* Attribute position in multi key collection */
44     2 operator fixed bin (17) unal,                         /* Operator for this constraint */
45     2 attr_index fixed bin (17) unal,                       /* Index into vrm_rel_desc.attr array */
46     2 attr_bit_length fixed bin (35),                       /* Bit length of attribute */
47     2 valid_sw bit (1) unal,                                /* ON = This constraint is valid for spec */
48     2 key_head_sw bit (1) unal,                             /* ON = this attribute can be used as a key head with
49                                                                this cursor */
50     2 key_attr_sw bit (1) unal,                             /* ON = This attribute is a key in this cursor */
51     2 and_group_search_terminator bit (1) unal,             /* ON =  If this attribute is an and group teminator */
52     2 seek_head_sw bit (1) unal,                            /* ON = this attribute was used
53                                                                for seek_head */
54     2 seek_head_tail_sw bit (1) unal,                       /* ON = This attr can be used for the last attribute of a seek head */
55     2 unused bit (30) unal;                                 /* Unused bits */
56 
57 
58 dcl  search_keys_ptr ptr;
59 dcl  alloc_num_search_keys fixed bin (17);
60 dcl  search_keys (alloc_num_search_keys) char (256) varying based (search_keys_ptr);
61 
62 /* END INCLUDE vrm_search_list.incl.pl1 */