COMPILATION LISTING OF SEGMENT mrds_dsm_dmdsm Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1019.0 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 10 mrds_dsm_dmdsm: proc (mrds_dsm_display_info_ptr, code); 11 12 /* DESCRIPTION: 13* 14* This is the basic subroutine for displaying the submodel. It is called by 15* both display_mrds_dsm and create_mrds_dsm. 16* 17* 18* 19* PARAMETERS: 20* 21* mrds_dsm_display_info_ptr: pointer to the mrds_dsm_display_info structure 22* containted in mrds_dsm_display_info.incl.pl1. This variable is declared in 23* the afore mentioned include file. 24* 25* code: the standard system return code. 26* 27* 28* 29* 30* HISTORY: 31* 32* 81-05-22 Rickie E. Brinegar: Initially Written. 33* 34* 81-06-02 Davids: changed the mrds_dsm_headr_str include file to 35* mrds_dsm_header. 36* 37* 81-06-09 Rickie E. Brinegar: modified to make use of 38* mrds_dsm_display_info.submodel_secured when displaying the long format. 39* 40* 81-06-11 Rickie E. Brinegar: Modified to incorporate audit changes which 41* include: 42* 1) trapping the sub_error_ condition. 43* 2) Just printing a message and then continuing when 44* error_table_$no_record is returned by mrds_dsm_read_relation. 45* 46**/ 47 1 1 /* BEGIN INCLUDE FILE mrds_dm_header.incl.pl1 1 2* 1 3* Created October, 1975 for release in MR 4.0 1 4* Modified December, 1975 to provide more info. */ 1 5 1 6 dcl 1 dm_header based (dmh_ptr), /* data model header */ 1 7 2 dm_header_id char (8), /* identification as data model header */ 1 8 2 dmd_version fixed bin, /* version number of dmd_ creating this model */ 1 9 2 creator_id char (32), /* group id of creator */ 1 10 2 create_time fixed bin (71); /* time of creation */ 1 11 1 12 dcl dmh_ptr ptr; 1 13 1 14 /* END INCLUDE FILE mrds_dm_header.incl.pl1 */ 1 15 48 49 2 1 /* BEGIN INCLUDE FILE mrds_dsm_display_info.incl.pl1 - - reb 05/19/81 */ 2 2 2 3 /* DESCRIPTION: 2 4* 2 5* Used to control the behavior of mrds_dsm_dmdsm. 2 6* 2 7**/ 2 8 2 9 dcl 1 mrds_dsm_display_info based (mrds_dsm_display_info_ptr), 2 10 2 version fixed bin (35), /* version number of this structure */ 2 11 2 submodel_pathname char (168), /* What submodel am I working with? */ 2 12 2 submodel_iocb_ptr ptr, /* To the open submodel */ 2 13 2 rel_names_array_ptr ptr, /* To the array of submodel relations names */ 2 14 2 output_iocb_ptr ptr, /* To the output switch */ 2 15 2 format char (1) unal, /* "b" => brief format 2 16* "c" => cmdsm format 2 17* "l" => long format 2 18* "r" => only submodel relation names */ 2 19 2 char_pad char (3) unal, 2 20 2 access bit (1) unal, /* ON => display access info */ 2 21 2 administrator bit (1) unal, /* ON => user is a DBA */ 2 22 2 db_secured bit (1) unal, /* ON => the database is in a secure state */ 2 23 2 submodel_secured bit (1) unal, /* ON => the submodel is in the secure.submodels 2 24* directory under the database directory */ 2 25 2 bit_pad bit (32) unal; 2 26 2 27 dcl MRDS_DSM_DISPLAY_INFO_VERSION fixed bin (35) int static options (constant) init (1); 2 28 /* current structure version for mrds_dsm_display_info */ 2 29 2 30 dcl mrds_dsm_display_info_ptr ptr; 2 31 2 32 /* END INCLUDE FILE - mrds_dsm_display_info.incl.pl1 */ 50 51 3 1 /* BEGIN INCLUDE FILE - mrds_dsm_entry_dcls.incl.pl1 */ 3 2 /* Written by Lindsey Spratt - - 80-10-24 */ 3 3 /* Modified by Jim Gray - - 80-11-13, to remove declarations of non-existant modules */ 3 4 3 5 /* format: style2 */ 3 6 dcl mrds_dsm_close entry (ptr, fixed bin (35)); 3 7 dcl mrds_dsm_close$force entry (ptr); 3 8 dcl mrds_dsm_copy entry (char (*), char (*), fixed bin (35)); 3 9 dcl mrds_dsm_set_db_path entry (ptr, char (*), fixed bin (35)); 3 10 dcl mrds_dsm_define_temp 3 11 entry (char (*), ptr, fixed bin (35)); 3 12 dcl mrds_dsm_open_read entry (char (*), ptr, fixed bin (35)); 3 13 dcl mrds_dsm_read_header entry (ptr, ptr, ptr, fixed bin (35)); 3 14 dcl mrds_dsm_read_relation entry (char (*), ptr, ptr, ptr, fixed bin (35)); 3 15 dcl mrds_dsm_get_relation_names 3 16 entry (ptr, ptr, ptr, fixed bin (35)); 3 17 dcl mrds_dsm_validate_header 3 18 entry (ptr, fixed bin (35)); 3 19 dcl mrds_dsm_dmdsm entry (ptr, fixed bin (35)); 3 20 dcl mrds_dsm_valid_$validate 3 21 entry (ptr, ptr, char (*), char (*), ptr, ptr, fixed bin (35)); 3 22 3 23 3 24 /* END INCLUDE FILE - mrds_dsm_entry_dcls.incl.pl1 */ 52 53 4 1 /* BEGIN INCLUDE FILE mrds_dsm_header.incl.pl1 4 2* 4 3*This include file is for internal MRDS use only - it is not to be 4 4*documented in any user manual. 4 5* 4 6*81-06-01 Davids: This is a copy of the mrds_dsm_header_str 4 7*include file, it is to be used by all mrds routines. The 4 8*structure name has been changed from dsm_header_record to 4 9*mrds_dsm_header to avoid conflicts when both this include file 4 10*and mrds_dsm_header_str are included (mrds_dsm_dsmd). 4 11**/ 4 12 4 13 dcl 1 mrds_dsm_header based, /* header structure for a MRDS submodel */ 4 14 2 dsm_generator_version fixed bin init (0), /* version number of submodel created by CMDSM */ 4 15 2 date_time_generated fixed bin (71) init (0), /* convert data to binary form of creation time */ 4 16 2 database_pn char (168) init (""), /* pathname of database this submodel is valid for */ 4 17 2 name char (32) init (""), /* identifying name for this header structure */ 4 18 2 num_of_relations fixed bin (35) init (0), /* number of relations in submodel view of database */ 4 19 2 creator_id char (32) init ("") ; /* the person.project.tag of the submodel creator */ 4 20 4 21 /* END INCLUDE FILE mrds_dsm_header.incl.pl1 */ 54 55 5 1 /* BEGIN INCLUDE FILE mrds_dsm_rel_block.incl.pl1 5 2* 5 3* Created October, 1975 for release in MR 4.0 5 4* 5 5* The relation_block contains the relation name and the attribute 5 6* names and access information 5 7* 5 8* HISTORY 5 9* 5 10* 80-04-10 Spratt: changed to have version number, be explicitly 5 11* . based, use an automatic variable in the refer for num of 5 12* . attributes, add access flags for rel and attr's, remove 5 13* . attr key flags. This is for the first Attribute Level 5 14* . Security version of MRDS. 5 15* 5 16* 81-01-14 Davids: increased submodel rel and attr names to 64 5 17* . characters and made dsm_rel_name char varying. changed 5 18* . access bits from a bit string to individually named 5 19* . flags. 5 20**/ 5 21 5 22 dcl relation_block_ptr ptr; 5 23 dcl rb_number_of_attributes fixed bin (35); 5 24 dcl RELATION_BLOCK_VERSION_1 fixed bin (35) internal static options (constant) init (1); 5 25 5 26 dcl 1 relation_block based (relation_block_ptr), 5 27 /* Relation block */ 5 28 2 version fixed bin (35), 5 29 2 dsm_rel_name char (64) varying, /* Data submodel relation name */ 5 30 2 dm_rel_name char (32), /* Data model relation name */ 5 31 2 rel_access unal, 5 32 3 append bit (1), 5 33 3 delete bit (1), 5 34 3 null bit (1), 5 35 3 mbz1 bit (33), 5 36 2 no_rb_attributes fixed bin, /* The number of attributes in this relation */ 5 37 2 attribute_info (rb_number_of_attributes refer (relation_block.no_rb_attributes)), 5 38 3 dsm_attr_name char (64) varying, /* Data submodel attribute name */ 5 39 3 attr_access unal, /* Data submodel attribute flags */ 5 40 4 read bit (1), 5 41 4 modify bit (1), 5 42 4 null bit (1), 5 43 4 mbz2 bit (33), /* For future use */ 5 44 3 dm_attr_name char (32) varying, /* Data model attribute name */ 5 45 3 dm_attr_flags, /* Data model attribute flags */ 5 46 4 mbz3 bit (36); /* For future use */ 5 47 5 48 /* END INCLUDE FILE mrds_dsm_rel_block.incl.pl1 */ 5 49 56 57 6 1 /* BEGIN INCLUDE FILE mrds_dsm_relation_names.incl.pl1 -- nsd 81/01/12 */ 6 2 6 3 /* 6 4*This include file is for internal mrds use only. It is used to 6 5*return an array of submodel relation names. 6 6* 6 7*HISTORY 6 8* 6 9*81-01-12 Davids: written 6 10* 6 11*81-09-14 Davids: changed relation to char (32) from char (64). 64 6 12*was a proposed maximum but could not be implemented. Several 6 13*modules would not compile when compiled with -prefix stringsize 6 14*becuase they made assignments of the form char (32) = char (64). 6 15**/ 6 16 6 17 dcl 1 mrds_dsm_relation_names based (mrds_dsm_relation_names_ptr), 6 18 2 nrels fixed bin, 6 19 2 relation (mrds_dsm_relation_names_nrels_alloc refer (mrds_dsm_relation_names.nrels)) char (32); 6 20 6 21 dcl mrds_dsm_relation_names_nrels_alloc fixed bin; 6 22 6 23 dcl mrds_dsm_relation_names_ptr ptr; 6 24 6 25 /* END INCLUDE FILE mrds_dsm_relation_names.incl.pl1 */ 6 26 58 59 7 1 /* BEGIN INCLUDE FILE mrds_rel_desc.incl.pl1 rgl, 03/31/76 */ 7 2 7 3 /* 76-09-20 R. Lackey : modified to handle inverted attributes 7 4* 7 5* 76-11-16 J. A. Weeldreyer : modified to add domain name 7 6* 7 7* 82-08-19 D. Woodka : deleted rel_desc.attributes.bit_offset field 7 8* for the DMS conversion 7 9* 7 10**/ 7 11 7 12 dcl 1 rel_desc based (rd_ptr), /* record description of relation records */ 7 13 2 num_attr fixed bin, /* number of attributes in the model */ 7 14 2 key_length fixed bin (35), /* length in bits of data portion of tuple */ 7 15 2 data_length fixed bin (35), /* length in bits of data portion of tuple */ 7 16 2 num_keys fixed bin, /* number of key attributes */ 7 17 2 inversion bit (1) unal, /* On if this relation contains any inverted attributes */ 7 18 2 reserved bit (35) unal, /* Reserved for future use */ 7 19 2 attributes (num_attr_alloc refer (rel_desc.num_attr)), 7 20 3 attribute_name char (32), /* name of attribute */ 7 21 3 domain_name char (32), /* name of underlying domain */ 7 22 3 bit_length bit (18) unaligned, /* length of data item in bits */ 7 23 3 key_flag bit (1) unaligned, /* indicates whether attribute is part of primary key */ 7 24 3 inver_flag bit (1) unaligned, /* On if this attribute is inverted */ 7 25 3 unused bit (34) unaligned, /* reserved for expansion */ 7 26 3 key_attr_order fixed bin, /* order num of this key attr */ 7 27 3 descriptor bit (36); /* Multics descriptor for attribute */ 7 28 7 29 dcl num_attr_alloc fixed bin (10); /* Number of attributes in relation for allocation purposes */ 7 30 7 31 dcl rd_ptr ptr; 7 32 7 33 /* END INCLUDE FILE mrds_rel_desc.incl.pl1 */ 7 34 60 61 62 /* AUTOMATIC */ 63 64 dcl (attr_index, /* submodel attribute index */ 65 dm_attr_index, /* data model attribute index */ 66 rel_index) fixed bin; /* relation index */ 67 68 dcl (data_model_ptr init (null), /* To model that this submodel is for */ 69 hd_ptr init (null), /* To header information */ 70 wa_ptr init (null)) ptr; /* To temp segment */ 71 72 dcl date_time_str char (25); /* for date_time conversions */ 73 74 /* BASED */ 75 76 dcl work_area area (sys_info$max_seg_size) based (wa_ptr); 77 78 /* BUILTIN */ 79 80 dcl (addr, 81 empty, 82 null) builtin; 83 84 /* CONDITION */ 85 86 dcl (cleanup, 87 sub_error_) condition; 88 89 /* CONSTANT */ 90 91 dcl READ_MODE init (2) fixed bin internal static options (constant); 92 93 /* ENTRY */ 94 95 dcl date_time_ entry (fixed bin (71), char (*)); 96 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 97 dcl ioa_$ioa_switch entry options (variable); 98 dcl mrds_dm_close entry (ptr, fixed bin (35)); 99 dcl mrds_dm_get_attributes entry entry (ptr, char (32), ptr, ptr, fixed bin (35)); 100 dcl mrds_dm_get_header entry (ptr, ptr, ptr, fixed bin (35)); 101 dcl mrds_dm_open entry (char (168), fixed bin, ptr, fixed bin (35)); 102 dcl mu_display_descriptor entry (ptr) returns (char (120) varying); 103 dcl mu_trim_descriptor entry (char (120) varying) returns (char (*)); 104 dcl release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 105 106 /* EXTERNAL */ 107 108 dcl (error_table_$no_record, 109 sys_info$max_seg_size) fixed bin (35) ext; 110 111 dcl (iox_$error_output, 112 iox_$user_output) ptr ext; 113 114 /* PARAMETER */ 115 116 dcl code fixed bin (35); /* INPUT: Standard return code */ 117 118 119 /* **************************************************************************** 120* INITIALIZATION 121* **************************************************************************** */ 122 123 on cleanup call finish; 124 125 call get_temp_segment_ ("mrds_dsm_dmdsm", wa_ptr, code); 126 if code ^= 0 then 127 go to exit; 128 129 work_area = empty; 130 131 /* **************************************************************************** 132* Get the list of relations to be displayed. 133* **************************************************************************** */ 134 135 mrds_dsm_relation_names_ptr = mrds_dsm_display_info.rel_names_array_ptr; 136 137 if mrds_dsm_relation_names_ptr = null then do; 138 call mrds_dsm_get_relation_names (wa_ptr, mrds_dsm_relation_names_ptr, mrds_dsm_display_info.submodel_iocb_ptr, 139 code); 140 if code ^= 0 then 141 go to exit; 142 end; 143 144 /* **************************************************************************** 145* Print the display. This code is maintained in the alphabetical order of the 146* value of mrds_dsm_display_info.format 147* **************************************************************************** */ 148 149 on sub_error_ ; 150 if mrds_dsm_display_info.format = "b" then /* if brief format */ 151 call brief_format; 152 else 153 if mrds_dsm_display_info.format = "c" then do; /* if cmdsm format */ 154 call mrds_dsm_read_header (wa_ptr, hd_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 155 if code ^= 0 then 156 go to exit; 157 call cmdsm_format; 158 end; 159 else 160 if mrds_dsm_display_info.format = "l" then do; /* if long format */ 161 call mrds_dsm_read_header (wa_ptr, hd_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 162 if code ^= 0 then 163 go to exit; 164 call long_format; 165 end; 166 else 167 if mrds_dsm_display_info.format = "r" then /* if rel_name format */ 168 call rel_name_format; 169 170 /* **************************************************************************** 171* All done 172* **************************************************************************** */ 173 174 exit: call finish; 175 return; /* Normal end for mrds_dsm_dmdsm. */ 176 177 brief_format: proc; 178 179 /* **************************************************************************** 180* Display relation names, attribute names and, possibly, their respective 181* access information 182* **************************************************************************** */ 183 184 do rel_index = 1 to mrds_dsm_relation_names.nrels;/* get the submodel relation info */ 185 call mrds_dsm_read_relation (mrds_dsm_relation_names.relation (rel_index), wa_ptr, 186 relation_block_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 187 188 if code = 0 then do; 189 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 190 /* display the relation info */ 191 "^/^[^[a^]^[d^]^[n^]^5t^a^;^3s^5t^a^]", 192 mrds_dsm_display_info.access, 193 relation_block.rel_access.append, 194 relation_block.rel_access.delete, 195 relation_block.rel_access.null, 196 relation_block.dsm_rel_name); 197 198 do attr_index = 1 to relation_block.no_rb_attributes; /* display this relations 199* attribute info */ 200 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 201 "^[^[r^]^[m^]^[n^]^8t^a^;^3s^8t^a^]", 202 mrds_dsm_display_info.access, 203 relation_block.attribute_info (attr_index).attr_access.read, 204 relation_block.attribute_info (attr_index).attr_access.modify, 205 relation_block.attribute_info (attr_index).attr_access.null, 206 relation_block.attribute_info (attr_index).dsm_attr_name); 207 end; 208 209 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, ""); 210 end; 211 else 212 if code = error_table_$no_record then 213 call relation_not_in_submodel; 214 else 215 go to exit; 216 end; 217 end brief_format; 218 219 cmdsm_format: proc; 220 221 /* **************************************************************************** 222* Display the submodel information in a format that may be used to create a new 223* submodel. 224* **************************************************************************** */ 225 226 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, "^//*" || 227 /* Print the header information */ 228 "^/created from:^2x^a" || 229 "^/^9xfor:^2x^a" || 230 "^/^10xby:^2xdisplay_mrds_dsm -cmdsm^/*/^/", 231 mrds_dsm_display_info.submodel_pathname, 232 hd_ptr -> mrds_dsm_header.database_pn); 233 234 do rel_index = 1 to mrds_dsm_relation_names.nrels;/* get the relation information */ 235 236 call mrds_dsm_read_relation (mrds_dsm_relation_names.relation (rel_index), wa_ptr, 237 relation_block_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 238 239 if code = 0 then do; 240 if mrds_dsm_display_info.access then /* print the relation access info */ 241 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 242 "relation access:^4x^a^x(^[append_tuple^[^x^]^;^s^]^[delete_tuple^[^x^]^;^s^]^[null^]);^/", 243 mrds_dsm_relation_names.relation (rel_index), 244 relation_block.rel_access.append, 245 (relation_block.rel_access.delete | relation_block.rel_access.null), 246 relation_block.rel_access.delete, 247 relation_block.rel_access.null, 248 relation_block.rel_access.null); 249 250 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 251 /* Print the relation info */ 252 "relation:^11x^a^x=^x^a", 253 relation_block.dsm_rel_name, relation_block.dm_rel_name); 254 255 do attr_index = 1 to relation_block.no_rb_attributes; /* print the attribute info 256* (except access info) */ 257 258 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 259 "^30t^[(^;^x^]^a^x=^x^a^[);^/^]", 260 (attr_index = 1), 261 relation_block.attribute_info (attr_index).dsm_attr_name, 262 relation_block.attribute_info (attr_index).dm_attr_name, 263 (attr_index = relation_block.no_rb_attributes)); 264 end; 265 266 if mrds_dsm_display_info.access then /* print the attribute access info */ 267 268 do attr_index = 1 to relation_block.no_rb_attributes; 269 270 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 271 "^[attribute access:^3x^;^21t^]^a^xin^x^a^x(^[read_attr^[^x^]^;^s^]" || 272 "^[delete_tuple^[^x^]^;^s^]^[null^])^[;^;,^]", 273 (attr_index = 1), 274 relation_block.attribute_info (attr_index).dsm_attr_name, 275 relation_block.dsm_rel_name, 276 relation_block.attribute_info (attr_index).attr_access.read, 277 (relation_block.attribute_info (attr_index).attr_access.modify | 278 relation_block.attribute_info (attr_index).attr_access.null), 279 relation_block.attribute_info (attr_index).attr_access.modify, 280 relation_block.attribute_info (attr_index).attr_access.null, 281 relation_block.attribute_info (attr_index).attr_access.null, 282 (attr_index = relation_block.no_rb_attributes)); 283 end; 284 285 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, "^[^;^//*^x^74(*^)^x*/^/^]", 286 /* print the relation seperation comment line */ 287 (rel_index = mrds_dsm_relation_names.nrels)); 288 end; 289 else 290 if code = error_table_$no_record then 291 call relation_not_in_submodel; 292 else 293 go to exit; 294 end; 295 296 end cmdsm_format; 297 298 long_format: proc; 299 300 /* **************************************************************************** 301* Display everthing known about the submodel 302* **************************************************************************** */ 303 304 call mrds_dm_open (hd_ptr -> mrds_dsm_header.database_pn, READ_MODE, data_model_ptr, code); 305 if code ^= 0 then 306 go to exit; 307 308 /* Display header information */ 309 call date_time_ (hd_ptr -> mrds_dsm_header.date_time_generated, date_time_str); 310 311 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, /* display submodel header */ 312 "^/Submodel path:^6x^a" || 313 "^/^6xVersion:^6x^d" || 314 "^/^3xCreated by:^6x^a" || 315 "^/^3xCreated on:^6x^a" || 316 "^/", 317 mrds_dsm_display_info.submodel_pathname, 318 hd_ptr -> mrds_dsm_header.dsm_generator_version, 319 hd_ptr -> mrds_dsm_header.creator_id, 320 date_time_str); 321 322 call mrds_dm_get_header (data_model_ptr, wa_ptr, dmh_ptr, code); /* display model header info */ 323 if code ^= 0 then 324 go to exit; 325 326 call date_time_ (dm_header.create_time, date_time_str); 327 328 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 329 "Database path:^6x^a" || 330 "^/^6xVersion:^6x^d" || 331 "^/^3xCreated by:^6x^a" || 332 "^/^3xCreated on:^6x^a" || 333 "^/", 334 hd_ptr -> mrds_dsm_header.database_pn, 335 dm_header.dmd_version, 336 dm_header.creator_id, 337 date_time_str); 338 339 do rel_index = 1 to mrds_dsm_relation_names.nrels;/* Display each relation in the list */ 340 341 call mrds_dsm_read_relation (mrds_dsm_relation_names.relation (rel_index), wa_ptr, 342 relation_block_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 343 344 if code = 0 then do; 345 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 346 "^/Submodel Relation Name:^6x^a" || 347 "^[^/^12xModel Name:^6x^a^;^s^]" || 348 "^[^/^16xAccess:^6x^[append_tuple ^]^[delete_tuple ^]^[null ^]^;^3s^]", 349 relation_block.dsm_rel_name, 350 (mrds_dsm_display_info.administrator | ^mrds_dsm_display_info.db_secured), 351 relation_block.dm_rel_name, 352 mrds_dsm_display_info.access, 353 relation_block.rel_access.append, relation_block.rel_access.delete, relation_block.rel_access.null); 354 355 call mrds_dm_get_attributes (data_model_ptr, relation_block.dm_rel_name, wa_ptr, 356 rd_ptr, code); /* get datamodel attribute info */ 357 if code ^= 0 then 358 go to exit; 359 360 do attr_index = 1 to relation_block.no_rb_attributes; /* display each of this 361* realtions attributes' info */ 362 363 dm_attr_index = 1; /* get data model attribute index */ 364 do while (dm_attr_index ^> rel_desc.num_attr & 365 rel_desc.attributes (dm_attr_index).attribute_name ^= 366 relation_block.attribute_info (attr_index).dm_attr_name); 367 dm_attr_index = dm_attr_index + 1; 368 end; 369 370 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 371 "^/^9xSubmodel Attribute name:^6x^a" || 372 "^[^/^22xModel Name:^6x^a^;^s^]" || 373 "^[^/^26xAccess:^6x^[read_attr ^]^[modify_attr ^]^[null ^]^;^3s^]" || 374 "^[^/^23xData Type:^6x^a" || 375 "^[^/^39x^[Key ^]^[Index ^]^;^2s^]^;^4s^]", 376 relation_block.attribute_info (attr_index).dsm_attr_name, 377 (mrds_dsm_display_info.administrator | ^mrds_dsm_display_info.db_secured), 378 relation_block.attribute_info (attr_index).dm_attr_name, 379 mrds_dsm_display_info.access, 380 relation_block.attribute_info (attr_index).read, relation_block.attribute_info (attr_index).modify, 381 relation_block.attribute_info (attr_index).null, 382 (mrds_dsm_display_info.administrator | mrds_dsm_display_info.submodel_secured | 383 ^mrds_dsm_display_info.db_secured), 384 mu_trim_descriptor (mu_display_descriptor (addr (rel_desc.attributes (dm_attr_index).descriptor))), 385 (rel_desc.attributes (dm_attr_index).key_flag | rel_desc.attributes (dm_attr_index).inver_flag), 386 (rel_desc.attributes (dm_attr_index).key_flag & (mrds_dsm_display_info.administrator 387 | ^mrds_dsm_display_info.db_secured)), 388 (rel_desc.attributes (dm_attr_index).inver_flag 389 | (rel_desc.attributes (dm_attr_index).key_flag 390 & rel_desc.attributes (dm_attr_index).key_attr_order = 1 391 & mrds_dsm_display_info.db_secured & ^mrds_dsm_display_info.administrator))); 392 393 end; 394 395 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, ""); 396 end; 397 else 398 if code = error_table_$no_record then 399 call relation_not_in_submodel; 400 else 401 go to exit; 402 end; 403 404 end long_format; 405 406 rel_name_format: proc; 407 408 /* **************************************************************************** 409* Display relation names and access 410* **************************************************************************** */ 411 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, ""); 412 413 do rel_index = 1 to mrds_dsm_relation_names.nrels; 414 415 call mrds_dsm_read_relation (mrds_dsm_relation_names.relation (rel_index), wa_ptr, 416 relation_block_ptr, mrds_dsm_display_info.submodel_iocb_ptr, code); 417 418 if code = 0 then 419 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, 420 "^[^[a^]^[d^]^[n^]^5t^a^;^3s^5t^a^]", 421 mrds_dsm_display_info.access, 422 relation_block.rel_access.append, 423 relation_block.rel_access.delete, 424 relation_block.rel_access.null, 425 relation_block.dsm_rel_name); 426 else 427 if code = error_table_$no_record then 428 call relation_not_in_submodel; 429 else 430 go to exit; 431 end; 432 433 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, ""); 434 435 end rel_name_format; 436 437 finish: 438 proc; 439 440 /* **************************************************************************** 441* Clean up anything left laying around 442* **************************************************************************** */ 443 444 if data_model_ptr ^= null then 445 call mrds_dm_close (data_model_ptr, code); 446 447 if wa_ptr ^= null then do; 448 if hd_ptr ^= null then 449 free hd_ptr -> mrds_dsm_header; 450 451 if mrds_dsm_display_info.rel_names_array_ptr = null & mrds_dsm_relation_names_ptr ^= null then 452 free mrds_dsm_relation_names; 453 call release_temp_segment_ ("mrds_dsm_dmdsm", wa_ptr, code); 454 end; 455 456 end finish; 457 458 relation_not_in_submodel: 459 proc; 460 461 /* **************************************************************************** 462* Display a message telling that the current relation is not in the submodel 463* **************************************************************************** */ 464 465 call ioa_$ioa_switch (iox_$error_output, "Relation ^a is not in submodel ^a", 466 mrds_dsm_relation_names.relation (rel_index), 467 mrds_dsm_display_info.submodel_pathname); 468 469 if mrds_dsm_display_info.output_iocb_ptr ^= iox_$user_output then 470 call ioa_$ioa_switch (mrds_dsm_display_info.output_iocb_ptr, "Relation ^a is not in submodel ^a", 471 mrds_dsm_relation_names.relation (rel_index), 472 mrds_dsm_display_info.submodel_pathname); 473 474 end relation_not_in_submodel; 475 476 end mrds_dsm_dmdsm; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.8 mrds_dsm_dmdsm.pl1 >special_ldd>online>mrds.pbf-04/18/85>mrds_dsm_dmdsm.pl1 48 1 10/14/83 1608.6 mrds_dm_header.incl.pl1 >ldd>include>mrds_dm_header.incl.pl1 50 2 10/14/83 1609.0 mrds_dsm_display_info.incl.pl1 >ldd>include>mrds_dsm_display_info.incl.pl1 52 3 10/14/83 1608.7 mrds_dsm_entry_dcls.incl.pl1 >ldd>include>mrds_dsm_entry_dcls.incl.pl1 54 4 10/14/83 1608.9 mrds_dsm_header.incl.pl1 >ldd>include>mrds_dsm_header.incl.pl1 56 5 10/14/83 1608.7 mrds_dsm_rel_block.incl.pl1 >ldd>include>mrds_dsm_rel_block.incl.pl1 58 6 10/14/83 1609.0 mrds_dsm_relation_names.incl.pl1 >ldd>include>mrds_dsm_relation_names.incl.pl1 60 7 10/14/83 1609.0 mrds_rel_desc.incl.pl1 >ldd>include>mrds_rel_desc.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. READ_MODE 000030 constant fixed bin(17,0) initial dcl 91 set ref 304* access 63 based bit(1) level 2 packed unaligned dcl 2-9 set ref 189* 200* 240 266 345* 370* 418* addr builtin function dcl 80 ref 370 370 administrator 63(01) based bit(1) level 2 packed unaligned dcl 2-9 ref 345 370 370 370 370 append 32 based bit(1) level 3 packed unaligned dcl 5-26 set ref 189* 240* 345* 418* attr_access 55 based structure array level 3 packed unaligned dcl 5-26 attr_index 000110 automatic fixed bin(17,0) dcl 64 set ref 198* 200 200 200 200* 255* 258 258 258 258* 266* 270 270 270 270 270 270 270 270 270* 360* 364 370 370 370 370 370* attribute_info 34 based structure array level 2 unaligned dcl 5-26 attribute_name 5 based char(32) array level 3 packed unaligned dcl 7-12 ref 364 attributes 5 based structure array level 2 unaligned dcl 7-12 cleanup 000132 stack reference condition dcl 86 ref 123 code parameter fixed bin(35,0) dcl 116 set ref 10 125* 126 138* 140 154* 155 161* 162 185* 188 211 236* 239 289 304* 305 322* 323 341* 344 355* 357 397 415* 418 426 444* 453* create_time 14 based fixed bin(71,0) level 2 dcl 1-6 set ref 326* creator_id 67 based char(32) initial level 2 in structure "mrds_dsm_header" packed unaligned dcl 4-13 in procedure "mrds_dsm_dmdsm" set ref 311* creator_id 3 based char(32) level 2 in structure "dm_header" packed unaligned dcl 1-6 in procedure "mrds_dsm_dmdsm" set ref 328* data_model_ptr 000114 automatic pointer initial dcl 68 set ref 68* 304* 322* 355* 444 444* database_pn 4 based char(168) initial level 2 packed unaligned dcl 4-13 set ref 226* 304* 328* date_time_ 000016 constant entry external dcl 95 ref 309 326 date_time_generated 2 based fixed bin(71,0) initial level 2 dcl 4-13 set ref 309* date_time_str 000122 automatic char(25) unaligned dcl 72 set ref 309* 311* 326* 328* db_secured 63(02) based bit(1) level 2 packed unaligned dcl 2-9 ref 345 370 370 370 370 delete 32(01) based bit(1) level 3 packed unaligned dcl 5-26 set ref 189* 240 240* 345* 418* descriptor 30 based bit(36) array level 3 packed unaligned dcl 7-12 set ref 370 370 dm_attr_index 000111 automatic fixed bin(17,0) dcl 64 set ref 363* 364 364 367* 367 370 370 370 370 370 370 370 370 dm_attr_name 56 based varying char(32) array level 3 dcl 5-26 set ref 258* 364 370* dm_header based structure level 1 unaligned dcl 1-6 dm_rel_name 22 based char(32) level 2 packed unaligned dcl 5-26 set ref 250* 345* 355* dmd_version 2 based fixed bin(17,0) level 2 dcl 1-6 set ref 328* dmh_ptr 000100 automatic pointer dcl 1-12 set ref 322* 326 328 328 dsm_attr_name 34 based varying char(64) array level 3 dcl 5-26 set ref 200* 258* 270* 370* dsm_generator_version based fixed bin(17,0) initial level 2 dcl 4-13 set ref 311* dsm_rel_name 1 based varying char(64) level 2 dcl 5-26 set ref 189* 250* 270* 345* 418* empty builtin function dcl 80 ref 129 error_table_$no_record 000042 external static fixed bin(35,0) dcl 108 ref 211 289 397 426 format 62 based char(1) level 2 packed unaligned dcl 2-9 ref 150 152 159 166 get_temp_segment_ 000020 constant entry external dcl 96 ref 125 hd_ptr 000116 automatic pointer initial dcl 68 set ref 68* 154* 161* 226 304 309 311 311 328 448 448 inver_flag 25(19) based bit(1) array level 3 packed unaligned dcl 7-12 ref 370 370 ioa_$ioa_switch 000022 constant entry external dcl 97 ref 189 200 209 226 240 250 258 270 285 311 328 345 370 395 411 418 433 465 469 iox_$error_output 000046 external static pointer dcl 111 set ref 465* iox_$user_output 000050 external static pointer dcl 111 ref 469 key_attr_order 27 based fixed bin(17,0) array level 3 dcl 7-12 ref 370 key_flag 25(18) based bit(1) array level 3 packed unaligned dcl 7-12 ref 370 370 370 modify 55(01) based bit(1) array level 4 packed unaligned dcl 5-26 set ref 200* 270 270* 370* mrds_dm_close 000024 constant entry external dcl 98 ref 444 mrds_dm_get_attributes 000026 constant entry external dcl 99 ref 355 mrds_dm_get_header 000030 constant entry external dcl 100 ref 322 mrds_dm_open 000032 constant entry external dcl 101 ref 304 mrds_dsm_display_info based structure level 1 unaligned dcl 2-9 mrds_dsm_display_info_ptr parameter pointer dcl 2-30 ref 10 135 138 150 152 154 159 161 166 185 189 189 200 200 209 226 226 236 240 240 250 258 266 270 285 311 311 328 341 345 345 345 345 370 370 370 370 370 370 370 370 370 370 370 395 411 415 418 418 433 451 465 469 469 469 mrds_dsm_get_relation_names 000014 constant entry external dcl 3-15 ref 138 mrds_dsm_header based structure level 1 unaligned dcl 4-13 set ref 448 mrds_dsm_read_header 000010 constant entry external dcl 3-13 ref 154 161 mrds_dsm_read_relation 000012 constant entry external dcl 3-14 ref 185 236 341 415 mrds_dsm_relation_names based structure level 1 unaligned dcl 6-17 set ref 451 mrds_dsm_relation_names_ptr 000104 automatic pointer dcl 6-23 set ref 135* 137 138* 184 185 234 236 240 285 339 341 413 415 451 451 465 469 mu_display_descriptor 000034 constant entry external dcl 102 ref 370 mu_trim_descriptor 000036 constant entry external dcl 103 ref 370 no_rb_attributes 33 based fixed bin(17,0) level 2 dcl 5-26 ref 198 255 258 266 270 360 nrels based fixed bin(17,0) level 2 dcl 6-17 ref 184 234 285 339 413 451 null 55(02) based bit(1) array level 4 in structure "relation_block" packed unaligned dcl 5-26 in procedure "mrds_dsm_dmdsm" set ref 200* 270 270* 270* 370* null builtin function dcl 80 in procedure "mrds_dsm_dmdsm" ref 68 68 68 137 444 447 448 451 451 null 32(02) based bit(1) level 3 in structure "relation_block" packed unaligned dcl 5-26 in procedure "mrds_dsm_dmdsm" set ref 189* 240 240* 240* 345* 418* num_attr based fixed bin(17,0) level 2 dcl 7-12 ref 364 output_iocb_ptr 60 based pointer level 2 dcl 2-9 set ref 189* 200* 209* 226* 240* 250* 258* 270* 285* 311* 328* 345* 370* 395* 411* 418* 433* 469 469* rd_ptr 000106 automatic pointer dcl 7-31 set ref 355* 364 364 370 370 370 370 370 370 370 370 read 55 based bit(1) array level 4 packed unaligned dcl 5-26 set ref 200* 270* 370* rel_access 32 based structure level 2 packed unaligned dcl 5-26 rel_desc based structure level 1 unaligned dcl 7-12 rel_index 000112 automatic fixed bin(17,0) dcl 64 set ref 184* 185* 234* 236 240 285* 339* 341* 413* 415* 465 469 rel_names_array_ptr 56 based pointer level 2 dcl 2-9 ref 135 451 relation 1 based char(32) array level 2 packed unaligned dcl 6-17 set ref 185* 236* 240* 341* 415* 465* 469* relation_block based structure level 1 unaligned dcl 5-26 relation_block_ptr 000102 automatic pointer dcl 5-22 set ref 185* 189 189 189 189 198 200 200 200 200 236* 240 240 240 240 240 240 250 250 255 258 258 258 266 270 270 270 270 270 270 270 270 270 341* 345 345 345 345 345 355 360 364 370 370 370 370 370 415* 418 418 418 418 release_temp_segment_ 000040 constant entry external dcl 104 ref 453 sub_error_ 000140 stack reference condition dcl 86 ref 149 submodel_iocb_ptr 54 based pointer level 2 dcl 2-9 set ref 138* 154* 161* 185* 236* 341* 415* submodel_pathname 1 based char(168) level 2 packed unaligned dcl 2-9 set ref 226* 311* 465* 469* submodel_secured 63(03) based bit(1) level 2 packed unaligned dcl 2-9 ref 370 sys_info$max_seg_size 000044 external static fixed bin(35,0) dcl 108 ref 129 wa_ptr 000120 automatic pointer initial dcl 68 set ref 68* 125* 129 138* 154* 161* 185* 236* 322* 341* 355* 415* 447 453* work_area based area dcl 76 set ref 129* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MRDS_DSM_DISPLAY_INFO_VERSION internal static fixed bin(35,0) initial dcl 2-27 RELATION_BLOCK_VERSION_1 internal static fixed bin(35,0) initial dcl 5-24 mrds_dsm_close 000000 constant entry external dcl 3-6 mrds_dsm_close$force 000000 constant entry external dcl 3-7 mrds_dsm_copy 000000 constant entry external dcl 3-8 mrds_dsm_define_temp 000000 constant entry external dcl 3-10 mrds_dsm_dmdsm 000000 constant entry external dcl 3-19 mrds_dsm_open_read 000000 constant entry external dcl 3-12 mrds_dsm_relation_names_nrels_alloc automatic fixed bin(17,0) dcl 6-21 mrds_dsm_set_db_path 000000 constant entry external dcl 3-9 mrds_dsm_valid_$validate 000000 constant entry external dcl 3-20 mrds_dsm_validate_header 000000 constant entry external dcl 3-17 num_attr_alloc automatic fixed bin(10,0) dcl 7-29 rb_number_of_attributes automatic fixed bin(35,0) dcl 5-23 NAMES DECLARED BY EXPLICIT CONTEXT. brief_format 000676 constant entry internal dcl 177 ref 150 cmdsm_format 001147 constant entry internal dcl 219 ref 157 exit 000671 constant label dcl 174 ref 126 140 155 162 211 289 305 323 357 397 426 finish 003044 constant entry internal dcl 437 ref 123 174 long_format 001715 constant entry internal dcl 298 ref 164 mrds_dsm_dmdsm 000444 constant entry external dcl 10 rel_name_format 002651 constant entry internal dcl 406 ref 166 relation_not_in_submodel 003155 constant entry internal dcl 458 ref 211 289 397 426 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3550 3622 3263 3560 Length 4212 3263 52 353 265 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mrds_dsm_dmdsm 710 external procedure is an external procedure. on unit on line 123 64 on unit on unit on line 149 64 on unit brief_format internal procedure shares stack frame of external procedure mrds_dsm_dmdsm. cmdsm_format internal procedure shares stack frame of external procedure mrds_dsm_dmdsm. long_format internal procedure shares stack frame of external procedure mrds_dsm_dmdsm. rel_name_format internal procedure shares stack frame of external procedure mrds_dsm_dmdsm. finish 84 internal procedure is called by several nonquick procedures. relation_not_in_submodel internal procedure shares stack frame of external procedure mrds_dsm_dmdsm. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mrds_dsm_dmdsm 000100 dmh_ptr mrds_dsm_dmdsm 000102 relation_block_ptr mrds_dsm_dmdsm 000104 mrds_dsm_relation_names_ptr mrds_dsm_dmdsm 000106 rd_ptr mrds_dsm_dmdsm 000110 attr_index mrds_dsm_dmdsm 000111 dm_attr_index mrds_dsm_dmdsm 000112 rel_index mrds_dsm_dmdsm 000114 data_model_ptr mrds_dsm_dmdsm 000116 hd_ptr mrds_dsm_dmdsm 000120 wa_ptr mrds_dsm_dmdsm 000122 date_time_str mrds_dsm_dmdsm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry int_entry free_based empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. date_time_ get_temp_segment_ ioa_$ioa_switch mrds_dm_close mrds_dm_get_attributes mrds_dm_get_header mrds_dm_open mrds_dsm_get_relation_names mrds_dsm_read_header mrds_dsm_read_relation mu_display_descriptor mu_trim_descriptor release_temp_segment_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$no_record iox_$error_output iox_$user_output sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000440 68 000451 123 000455 125 000477 126 000527 129 000532 135 000536 137 000543 138 000547 140 000564 149 000567 150 000604 152 000616 154 000620 155 000635 157 000640 158 000641 159 000642 161 000644 162 000661 164 000664 165 000665 166 000666 174 000671 175 000675 177 000676 184 000677 185 000707 188 000746 189 000751 198 001021 200 001031 207 001115 209 001117 210 001137 211 001140 216 001144 217 001146 219 001147 226 001150 234 001203 236 001213 239 001252 240 001255 250 001354 255 001410 258 001421 264 001502 266 001504 270 001523 283 001650 285 001652 288 001705 289 001706 294 001712 296 001714 298 001715 304 001716 305 001735 309 001740 311 001756 322 002022 323 002040 326 002043 328 002061 339 002126 341 002135 344 002174 345 002177 355 002271 357 002312 360 002315 363 002325 364 002327 367 002352 368 002353 370 002354 393 002616 395 002621 396 002641 397 002642 402 002646 404 002650 406 002651 411 002652 413 002672 415 002701 418 002740 426 003014 431 003020 433 003022 435 003042 437 003043 444 003051 447 003067 448 003074 451 003102 453 003123 456 003154 458 003155 465 003156 469 003216 474 003262 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved