1 /* BEGIN INCLUDE FILE mrds_rst_global_lists.incl.pl1 jeg 7/17/78 */ 2 3 /* note: mrds_rst_list_element$add and delete entries 4 makes use of the following structure type correspondence 5 6 structure_type = 1 refers to gl (global list element) 7 8 structure_type = 2 refers to sl (global sublist element) 9 10 structure_type = 3 refers to seg_info(segment information element) 11 12 */ 13 14 15 dcl 1 gl aligned based (gl_ptr), /* Template for global list entry */ 16 2 type fixed bin, /* structure_type, usefull when overlay used */ 17 2 name char (32), /* Item name */ 18 2 item_info_ptr ptr, /* Pointer to info structure for this item */ 19 2 parse_info_ptr ptr, /* Pointer to info obtained by parsing source */ 20 2 other_info_ptr ptr, /* Pointer to additional info str if needed */ 21 2 item_sub_list_ptr ptr, /* Pointer to sub list of items if neccessary for this his item */ 22 2 file_info_ptr ptr, /* Pointer to file info for this entry */ 23 2 file_model_ptr ptr, /* Pointer to file model for this entry */ 24 2 affected bit (1) unal, /* ON => affected by some directive */ 25 2 cmdb bit (1) unal, /* ON => affected by cmdb directive */ 26 2 undefine bit (1) unal, /* ON => affected by undefine directive */ 27 2 define bit (1) unal, /* ON => affected by define directive */ 28 2 redefine bit (1) unal, /* ON => affected by redefine directive */ 29 2 superior_assigned bit (1) unal, /* ON => has parent */ 30 2 inferior_assigned bit (1) unal, /* ON => child present */ 31 2 complete bit (1) unal, /* ON => all things present */ 32 2 consistant bit (1) unal, /* ON => correct model */ 33 2 reserved bit (26) unal, /* for future use */ 34 2 child_defined bit (1) unal ; /* ON => global element entered by child */ 35 36 dcl gl_ptr ptr; /* Pointer to gl structure */ 37 38 39 40 dcl 1 sl aligned based (sl_ptr), /* Template of sub list entry for global list */ 41 2 type fixed bin, /* structure_type, usefull when overlay used */ 42 2 name char (32), /* Name of item */ 43 2 item_info_ptr ptr, /* Pointer to info structure for this entry */ 44 2 parse_info_ptr ptr, /* Pointer to info obtained by parsing source */ 45 2 old_other_info_ptr ptr, /* Pointer to old version of other info */ 46 2 new_other_info_ptr ptr, /* Pointer to new version of other info */ 47 2 global_list_ptr ptr, /* pointer to corresponding global list element */ 48 2 reserved bit (36) unal; /* Reserved for future use */ 49 50 dcl sl_ptr ptr; /* Pointer to sub list structure */ 51 52 53 dcl 1 seg_info based (seg_info_ptr), /* Info about segment initiated */ 54 2 name char (32), /* Segment name */ 55 2 dir char (168), /* Absolute path of containing directory */ 56 2 seg_ptr ptr, /* Pointer to base of segment */ 57 2 bcnt fixed bin (24); /* Bit count of segment */ 58 59 dcl seg_info_ptr ptr; /* Pointer to seg_info str */ 60 61 62 63 dcl MAIN_LIST fixed bin internal static options (constant) init (1); 64 dcl SUB_LIST fixed bin internal static options (constant) init (2); 65 dcl SEG_INFO fixed bin internal static options (constant) init (3); 66 67 declare 1 list_ovrly aligned based (list_ovrly_ptr), /* overlay for top part of gl and sl list elements */ 68 2 type fixed bin, /* structure_type, 1 => gl, 2 => sl */ 69 2 name char (32), /* Name of item */ 70 2 item_info_ptr ptr, /* pointer to info structure for this entry */ 71 2 parse_info_ptr ptr, /* pointer to info obtained by parsing source */ 72 2 other_info_ptr ptr ; /* pointer to additional info structure if needed */ 73 74 declare list_ovrly_ptr ptr ; /* pointer to overlay structure */ 75 76 77 declare saved_child_count fixed bin based (saved_child_count_ptr) ; /* parent link structure child count */ 78 declare saved_child_count_ptr ptr ; /* pointer to remembered number of children */ 79 80 81 /* USES AND MEANING OF LIST ELEMENT ENTRIES 82 83 DOMAIN GLOBAL LIST -------------------------- 84 85 gl.type - - MAIN_LIST 86 gl.name - - 32 char domain name 87 gl.item_info_ptr - - pointer to domain_info for this domain 88 gl.parse_info_ptr - - pointer to parse info structure 89 gl.other_info_ptr - - dbm_ptr, pointer to mdbm_db_model 90 gl.item_sub_list_ptr - - pointer to sublist of attributes using this domain 91 gl.file_info_ptr - - null () 92 gl.file_model_ptr - - null () 93 gl.superior_assigned - - ON => domain referenced by some relation 94 gl.inferior_assigned - - ON => referencing attribute present 95 gl.complete - - ON => domain_info present 96 gl.consistant - - always ON 97 98 DOMAIN GLOBAL LIST "REFERENCING ATTRIBUTES" SUBLIST ---------------- 99 100 sl.type - - SUB_LIST 101 sl.name - - 32 char attribute name 102 sl.item_info_ptr - - pointer to this attribute's attribute_info 103 sl.parse_info_ptr - - pointer to parse info structure 104 sl.old_other_info_ptr - - null () 105 sl.new_other_info_ptr - - pointer to this domain's global list element 106 sl.global_list_ptr - - pointer to attribute's global list element 107 108 ATTRIBUTE GLOBAL LIST ----------------- 109 110 gl.type - - MAIN_LIST 111 gl.name - - 32 char attribute name 112 gl.item_info_ptr - - pointer to corresponding domain sublist element for this attribute 113 gl.parse_info_ptr - - pointer to parse info structure 114 gl.other_info_ptr - - domain_info of domain for this attribute 115 gl.item_sub_list_ptr - - pointer to sublist of relations that use this attribute 116 gl.file_info_ptr - - null (), use pointer(fm_ptr,file_model.fi_ptr) 117 gl.file_model_ptr - - null (), use pointer(ai_ptr,0), ai_ptr from corres. rel's attr sublist 118 gl.superior_assigned - - ON => relation contains this attribute 119 gl.inferior_assigned - - ON => attribute references known domain 120 gl.complete - - ON => attr_info present for this attribute 121 gl.consistant - - OFF => no domain for this attribute 122 123 ATTRIBUTE GLOBAL LIST "USED IN RELATION" SUBLIST ------------------ 124 125 sl.type - - SUB_LIST 126 sl.name - - 32 char relation name 127 sl.item_info_ptr - - pointer to this relation's rel_info 128 sl.parse_info_ptr - - pointer to parse info structure 129 sl.old_other_info_ptr - - pointer to attribute's attr_info in this relation 130 sl.new_other_info_ptr - - pointer to this attribute's global list element 131 sl.global_list_ptr - - pointer to relation's global list element 132 133 RELATION GLOBAL LIST ------------------- 134 135 gl.type - - MAIN_LIST 136 gl.name - - 32 char relation name 137 gl.item_info_ptr - - pointer to rel_info for this relation 138 gl.parse_info_ptr - - pointer to parse info structure 139 gl.other_info_ptr - - pointer to global list element of file containing this relation 140 gl.item_sub_list_ptr - - pointer to sublist of attributes in this relation 141 gl.file_info_ptr - - pointer to file_info of this relation's file 142 gl.file_model_ptr - - pointer to file_model of this relation's file 143 gl.superior_assigned - - ON => file present to hold this relation 144 gl.inferior_assigned - - ON => attribute's present in this relation 145 gl.complete - - ON => rel_info assigned to this relation 146 gl.consistant - - OFF => no attributes for this relation 147 148 RELATION GLOBAL LIST "CONTAINED ATTRIBUTE" SUBLIST ---------------- 149 150 sl.type - - SUB_LIST 151 sl.name - - 32 char attribute name 152 sl.item_info_ptr - - pointer to this attribute's attribute_info 153 sl.parse_info_ptr - - pointer to parse info structure 154 sl.old_other_info_ptr - - pointer to domain_info for this attribute in old model 155 sl.new_other_info_ptr - - pointer to domain_info for this attribute in new model 156 sl.global_list_ptr - - pointer to attribute's global list element 157 158 FILE GLOBAL LIST ----------------------- 159 160 gl.type - - MAIN_LIST 161 gl.name - - 30 char file name plus 2 trailing blanks 162 gl.item_info_ptr - - pointer to file_info for this file 163 gl.parse_info_ptr - - pointer to parse info structure 164 gl.other_info_ptr - - null () 165 gl.item_sub_list_ptr - - pointer to sublist of relations contained in this file 166 gl.file_info_ptr - - pointer to file_info for this file 167 gl.file_model_ptr - - pointer to file_model for this file 168 gl.superior_assigned - - ON => file_model present for this file 169 gl.inferior_assigned - - ON => relation present for this file 170 gl.complete - - OFF => not formatted yet 171 gl.consistant - - ON => no relations present 172 173 FILE GLOBAL LIST "CONTAINED RELATION" SUBLIST ---------------- 174 175 sl.type - - SUB_LIST 176 sl.name - - 32 char relation name 177 sl.item_info_ptr - - relation's rel_info pointer 178 sl.parse_info_ptr - - pointer to parse info structure 179 sl.old_other_info_ptr - - null () 180 sl.new_other_info_ptr - - pointer to file global list element 181 sl.global_list_ptr - - pointer to relation's global list element 182 183 FOREIGN KEY GLOBAL LIST -------------------- 184 185 gl.type - - MAIN_LIST 186 gl.name - - 32 char link(foreign key) name, parent_link_info.name 187 gl.item_info_ptr - - pointer to parent_link_info for this foreign key 188 gl.parse_info_ptr - - pointer to parse info structure 189 gl.other_info_ptr - - pointer to parent relation global list element 190 gl.item_sub_list_ptr - - pointer to sublist of child relations for this parent 191 gl.file_info_ptr - - pointer to file_info for parent relation's file 192 gl.file_model_ptr - - pointer to file_model for parent relation's file 193 gl.superior_assigned - - ON => parent present 194 gl.inferior_assigned - - ON => child present 195 gl.complete - - ON => pli_info and cli_info present 196 gl.consistant - - ON => rels/attrs found and corres domains match 197 gl.child_defined - - ON => not defined by parent, but by one of it's children 198 199 FOREIGN KEY GLOBAL LIST CHILDREN SUBLIST 200 201 sl.type - - SUB_LIST 202 sl.name - - 32 char name of relation representing this child 203 sl.item_info_ptr - - pointer to child_link_info for this child 204 sl.parse_info_ptr - - pointer to parse info structure 205 sl.old_other_info_ptr - - pointer to file_model holding this child relation 206 sl.new_other_info_ptr - - pointer to rel_info for this child 207 sl.global_list_ptr - - pointer to child relation global list element 208 209 NOTE: all pointers are to the new model unless otherwise indicated 210 211 */ 212 213 /* END INCLUDE FILE mrds_rst_global_lists.incl.pl1 */ 214