COMPILATION LISTING OF SEGMENT display_mrds_dsm Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 03/08/88 1534.6 mst Tue Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 /****^ HISTORY COMMENTS: 15* 1) change(88-01-18,Blair), approve(88-02-25,MCR7840), audit(88-03-03,Dupuis), 16* install(88-03-08,MR12.2-1034): 17* Don't expand the pathname arg if it is just an entryname because we want 18* to find it using the "mrds" searchlist". SCP 6366. 19* END HISTORY COMMENTS */ 20 21 22 display_mrds_dsm: dmdsm: proc; 23 24 /* DESCRIPTION: 25* 26* This procedure implements the display_mrds_dsm command which provides the 27* capability to display an existing MRDS data submodel. Various options are 28* provided, allowing the user to display information varying in detail from 29* relation names only, to all information contained in the data submodel plus 30* information from the corresponding data model. It is also possible for the 31* user to display this information for only specified relations. 32* 33* 34* 35* HISTORY: 36* 37* 81-05-18 Rickie E. Brinegar: Completely rewritten. 38* 39* 81-06-04 Davids: removed the use of the mrds_dsm_header_str 40* include file. Replaced the call to mrds_dsm_read_header with 41* mrds_dsm_read_header$db_path. Added code to increment the counter 42* in the control arg processing loop. 43* 44* 81-06-05 Rickie E. Brinegar: Made some auditing changes. 45* 46* 81-06-09 Rickie E. Brinegar: Modified to set the 47* mrds_dsm_display_info.submodel_secured bit for secured databases. 48* 49* 83-06-17 Davids: Modified so that mrds_dsl_get_version$get_path_info is called 50* to determine the version of the submodel instead of just opening the submodel 51* and looking at the header structure. This was done so that version checking is 52* localized to 1 module. Also an error is now reported if a version 1 submodel 53* is referenced (actually error code is returned by mrds_dsl_get_version). The 54* code to generate a call to dmdsm_v1 has been deleted. 55**/ 56 1 1 /* BEGIN INCLUDE FILE mrds_path_info.incl.pl1 - - Jim Gray 81-01-22 */ 1 2 1 3 /* HISTORY: 1 4* 1 5* 81-01-22 Jim Gray : originaly created for the dsl_$get_path_info interface, 1 6* a slight extension to the undocumented mrds_dsl_get_version$header. 1 7* 1 8**/ 1 9 1 10 /* DESCRIPTION: 1 11* 1 12* This structure returns information about a relative pathname, given 1 13* to a pathname accepting mrds interface. The information returned 1 14* is the absolute pathname, plus in the case that 1 15* the relative path points to a mrds database or submodel 1 16* whether it is a model or a submodel, the mrds version of 1 17* the model or submodel, it's creator, and the time of creation. 1 18* 1 19**/ 1 20 1 21 1 22 declare 1 mrds_path_info aligned based (mrds_path_info_ptr), 1 23 2 version fixed bin, /* version number for this structure */ 1 24 2 absolute_path char (168), /* the absolute path from the input relative path */ 1 25 2 type, 1 26 3 not_mrds bit (1) unal, /* on => path not to model or submodel */ 1 27 3 model bit (1) unal, /* on => path to database model, thus possible .db suffix */ 1 28 3 submodel bit (1) unal, /* on => path to submodel, thus possible .dsm suffix */ 1 29 3 mbz1 bit (33) unal, 1 30 2 mrds_version fixed bin, /* the mrds version number of the model or submodel */ 1 31 2 creator_id char (32), /* the person.project.tag of the creator */ 1 32 2 creation_time fixed bin (71), /* convert date to binary form of time model/submodel created */ 1 33 2 mbz2 bit (36) unal ; 1 34 1 35 1 36 declare mrds_path_info_ptr ptr ; 1 37 1 38 declare mrds_path_info_structure_version fixed bin init (1) int static options (constant) ; 1 39 1 40 /* END INCLUDE FILE mrds_path_info.incl.pl1 */ 57 58 2 1 /* BEGIN INCLUDE FILE mrds_authorization.incl.pl1 - - 81-01-20 Jim Gray */ 2 2 2 3 /* HISTORY: 2 4* 2 5* 81-01-20 Jim Gray : original created for the mmi_$get_authorization interface 2 6* 2 7**/ 2 8 2 9 /* DESCRIPTION: 2 10* 2 11* this structure returns the callers user_class 2 12* either database administrator or normal user. 2 13* Note that these separate classes were used to allow 2 14* future expansion to the user classes, rather than 2 15* make them logical "not"'s of one another. 2 16* NOTE: a DBA is always also a normal user, thus if the caller 2 17* is a DBA, his normal_user bit will be on also. 2 18* 2 19**/ 2 20 2 21 2 22 declare 1 mrds_authorization aligned based (mrds_authorization_ptr), 2 23 2 version fixed bin, /* version number of this structure */ 2 24 2 administrator bit (1) unal, /* caller is a DBA */ 2 25 2 normal_user bit (1) unal, /* caller has no special priviledges */ 2 26 2 mbz bit (34) unal ; 2 27 2 28 2 29 declare mrds_authorization_ptr ptr ; /* pointer for referring to the structure */ 2 30 2 31 declare mrds_authorization_structure_version fixed bin init (1) int static options (constant) ; 2 32 2 33 /* END INCLUDE FILE mrds_authorization.incl.pl1 */ 59 60 3 1 /* BEGIN INCLUDE FILE mrds_database_state.incl.pl1 - - 81-01-20 Jim Gray */ 3 2 3 3 /* HISTORY: 3 4* 3 5* 81-01-20 Jim Gray : original created for the mmi_$get_secured_status interface 3 6* 3 7**/ 3 8 3 9 /* DESCRIPTION: 3 10* 3 11* This structure returns the database state (secured or unsecured) 3 12* for determining how commands and subroutines will behave for each case. 3 13* The secured bit was kept separate from the unsecured, 3 14* rather than it's logical "not", to allow for future extensibility 3 15* of database secured states. 3 16* 3 17**/ 3 18 3 19 3 20 declare 1 database_state aligned based (database_state_ptr), 3 21 2 version fixed bin, /* version number of this structure */ 3 22 2 unsecured bit (1) unal, /* database not secured */ 3 23 2 secured bit (1) unal, /* database has been secured */ 3 24 2 mbz bit (34) unal ; 3 25 3 26 3 27 declare database_state_ptr ptr ; /* pointer for referring to the structure */ 3 28 3 29 declare database_state_structure_version fixed bin init (1) int static options (constant) ; 3 30 3 31 /* END INCLUDE FILE mrds_database_state.incl.pl1 */ 61 62 4 1 /* BEGIN INCLUDE FILE mrds_dsm_display_info.incl.pl1 - - reb 05/19/81 */ 4 2 4 3 /* DESCRIPTION: 4 4* 4 5* Used to control the behavior of mrds_dsm_dmdsm. 4 6* 4 7**/ 4 8 4 9 dcl 1 mrds_dsm_display_info based (mrds_dsm_display_info_ptr), 4 10 2 version fixed bin (35), /* version number of this structure */ 4 11 2 submodel_pathname char (168), /* What submodel am I working with? */ 4 12 2 submodel_iocb_ptr ptr, /* To the open submodel */ 4 13 2 rel_names_array_ptr ptr, /* To the array of submodel relations names */ 4 14 2 output_iocb_ptr ptr, /* To the output switch */ 4 15 2 format char (1) unal, /* "b" => brief format 4 16* "c" => cmdsm format 4 17* "l" => long format 4 18* "r" => only submodel relation names */ 4 19 2 char_pad char (3) unal, 4 20 2 access bit (1) unal, /* ON => display access info */ 4 21 2 administrator bit (1) unal, /* ON => user is a DBA */ 4 22 2 db_secured bit (1) unal, /* ON => the database is in a secure state */ 4 23 2 submodel_secured bit (1) unal, /* ON => the submodel is in the secure.submodels 4 24* directory under the database directory */ 4 25 2 bit_pad bit (32) unal; 4 26 4 27 dcl MRDS_DSM_DISPLAY_INFO_VERSION fixed bin (35) int static options (constant) init (1); 4 28 /* current structure version for mrds_dsm_display_info */ 4 29 4 30 dcl mrds_dsm_display_info_ptr ptr; 4 31 4 32 /* END INCLUDE FILE - mrds_dsm_display_info.incl.pl1 */ 63 64 5 1 /* BEGIN INCLUDE FILE mrds_dsm_relation_names.incl.pl1 -- nsd 81/01/12 */ 5 2 5 3 /* 5 4*This include file is for internal mrds use only. It is used to 5 5*return an array of submodel relation names. 5 6* 5 7*HISTORY 5 8* 5 9*81-01-12 Davids: written 5 10* 5 11*81-09-14 Davids: changed relation to char (32) from char (64). 64 5 12*was a proposed maximum but could not be implemented. Several 5 13*modules would not compile when compiled with -prefix stringsize 5 14*becuase they made assignments of the form char (32) = char (64). 5 15**/ 5 16 5 17 dcl 1 mrds_dsm_relation_names based (mrds_dsm_relation_names_ptr), 5 18 2 nrels fixed bin, 5 19 2 relation (mrds_dsm_relation_names_nrels_alloc refer (mrds_dsm_relation_names.nrels)) char (32); 5 20 5 21 dcl mrds_dsm_relation_names_nrels_alloc fixed bin; 5 22 5 23 dcl mrds_dsm_relation_names_ptr ptr; 5 24 5 25 /* END INCLUDE FILE mrds_dsm_relation_names.incl.pl1 */ 5 26 65 66 67 /* AUTOMATIC */ 68 69 dcl output_file_switch char (26); /* iocb switch name for output */ 70 dcl suffixed_name char (32); /* entryname with suffix */ 71 dcl submodel_entry char (168) init (""); /* for use with expand_pathname_ and 72* mrds_dm_secured_submodel */ 73 dcl submodel_directory char (168) init (""); /* for use with expand_pathname_ and 74* mrds_dm_secured_submodel */ 75 76 dcl (arg_len, /* length of current arg */ 77 i, /* internal index */ 78 nargs) fixed bin; /* no. of input arg */ 79 80 dcl code fixed bin (35); /* status code */ 81 82 dcl (arg_ptr init (null), /* pointer to current arg */ 83 submodel_iocb_ptr init (null), /* pointer to the open submodel */ 84 wa_ptr init (null)) ptr; /* pointer to work area */ 85 86 dcl (db_path, /* database path from mrds_dsl_get_version */ 87 output_file init (""), /* path name of the output file */ 88 output_file_attach, /* absolute pathname of output file */ 89 sm_path) char (168); /* absolute sm_path */ 90 91 /* BASED */ 92 93 dcl work_area area (sys_info$max_seg_size) based (wa_ptr); 94 /* scratch space */ 95 dcl arg char (arg_len) based (arg_ptr); 96 /* current argument */ 97 98 /* BUILTINS */ 99 100 dcl (empty, 101 null, 102 rtrim, 103 search, 104 substr) builtin; 105 106 107 /* CONDITIONS */ 108 109 dcl cleanup condition; 110 111 112 /* CONSTANTS */ 113 114 dcl DSM_SUFFIX init ("dsm") char (3) internal static options (constant); 115 dcl MRDS_SEARCHLIST init ("mrds") char (4) internal static options (constant); 116 117 118 /* EXTERNAL */ 119 120 dcl (error_table_$badcall, 121 error_table_$badopt, 122 error_table_$not_act_fnc, 123 error_table_$wrong_no_of_args, 124 mrds_error_$missing_relation_name, 125 mrds_error_$no_model_submodel, 126 mrds_error_$version_1_dsm, 127 sys_info$max_seg_size) fixed bin (35) ext; 128 129 dcl iox_$user_output ptr ext; 130 131 132 /* ENTRIES */ 133 134 dcl absolute_pathname_ entry (char (*), char (*), fixed bin (35)); 135 dcl absolute_pathname_$add_suffix entry (char (*), char(*), char(*), fixed bin(35)); 136 dcl com_err_ entry options (variable); 137 dcl cu_$af_arg_count entry (fixed bin, fixed bin (35)); 138 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 139 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 140 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 141 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 142 dcl iox_$close entry (ptr, fixed bin (35)); 143 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 144 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 145 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 146 dcl mrds_dm_authorization$get_user_class entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); 147 dcl mrds_dm_db_secured$get_secured_state entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); 148 dcl mrds_dm_secured_submodel entry (char (*), char (*), char (*)) returns (bit (1)); 149 dcl mrds_dsl_get_version$get_path_info entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); 150 dcl mrds_dsm_close$force entry (ptr); 151 dcl mrds_dsm_dmdsm entry (ptr, fixed bin (35)); 152 dcl mrds_dsm_open$read entry (char (*), ptr, fixed bin (35)); 153 dcl mrds_dsm_read_header$db_path entry (ptr, char (168), fixed bin (35)); 154 dcl release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 155 dcl suffixed_name_$make entry (char(*), char(*), char(32), fixed bin(35)); 156 dcl unique_chars_ entry (bit (*)) returns (char (15)); 157 158 159 /* **************************************************************************** 160* INITIALIZATION 161* **************************************************************************** */ 162 163 on cleanup call tidy_up; 164 165 call get_temp_segment_ ("dmdsm", wa_ptr, code); /* This temp segment should be in a lower ring 166* to preclude subversion of security */ 167 if code ^= 0 then 168 call error (code, "^/Trying to get a temp segment"); 169 170 work_area = empty; 171 172 mrds_dsm_display_info_ptr, 173 mrds_dsm_relation_names_ptr = null; 174 175 176 177 /* **************************************************************************** 178* Get information about the control arguments 179* **************************************************************************** */ 180 181 call cu_$af_arg_count (nargs, code); /* get no. of args and insure not called as an 182* active function */ 183 if code ^= error_table_$not_act_fnc then do; 184 if code = 0 then 185 call error (error_table_$badcall, "display_mrds_dsm may not be called as an active function."); 186 else 187 call error (code, "^/Finding the number of arguments"); 188 end; 189 190 if nargs < 1 then /* give him a hint */ 191 call error (error_table_$wrong_no_of_args, "^/Usage: dmdsm dsm_path {-control_args}" || 192 "^/Where -control_args may be: -access -bf -cmdsm -lg -no_acess -no_output_file" || 193 "^/^29t-of -rel_names -relation REL_1 ... REL_N"); 194 195 196 197 /* **************************************************************************** 198* Get the datasubmodel version 199* **************************************************************************** */ 200 201 call cu_$arg_ptr (1, arg_ptr, arg_len, code); /* get data submodel relative path */ 202 if code ^= 0 then 203 call error (code, "^/Getting data submodel relative path"); 204 205 if search (arg, "<>") = 0 then do; 206 call suffixed_name_$make (arg, DSM_SUFFIX, suffixed_name, code); 207 if code ^= 0 then 208 call error (code, "^/Getting entryname of the data submodel: " || arg); 209 sm_path = suffixed_name; 210 end; 211 else do; 212 call absolute_pathname_$add_suffix (arg, DSM_SUFFIX, sm_path, code); 213 /* get absolute data submodel path */ 214 if code ^= 0 then 215 call error (code, "^/Getting absolute path of the data submodel: " || sm_path); 216 end; 217 call mrds_dsl_get_version$get_path_info (sm_path, wa_ptr, mrds_path_info_structure_version, 218 mrds_path_info_ptr, code); 219 if code ^= 0 220 then do; 221 if code = mrds_error_$no_model_submodel 222 then call error (code, "^/Unable to open the submodel at: " || sm_path); 223 else if code = mrds_error_$version_1_dsm 224 then call error (code, "^/" || sm_path); 225 else call error (code, "^/Unable to get the version of the data submodel: " || sm_path); 226 end; 227 else sm_path = mrds_path_info.absolute_path; 228 229 call mrds_dsm_open$read (sm_path, submodel_iocb_ptr, code); 230 if code ^= 0 then 231 call error (code, "^/Unable to open the submodel: " || sm_path); 232 233 234 /* **************************************************************************** 235* Initialize the control structure for mrds_dsm_dmdsm and process the control 236* arguments to be used in filling in the control structure 237* **************************************************************************** */ 238 239 allocate mrds_dsm_display_info in (work_area); 240 241 mrds_dsm_display_info.version = MRDS_DSM_DISPLAY_INFO_VERSION; 242 mrds_dsm_display_info.rel_names_array_ptr = null; 243 mrds_dsm_display_info.output_iocb_ptr = iox_$user_output; 244 mrds_dsm_display_info.submodel_iocb_ptr = submodel_iocb_ptr; 245 mrds_dsm_display_info.submodel_pathname = sm_path; 246 mrds_dsm_display_info.format = "b"; 247 mrds_dsm_display_info.access = "1"b; 248 249 i = 2; 250 do while (i ^> nargs); /* look at all args */ 251 call cu_$arg_ptr (i, arg_ptr, arg_len, code);/* get this arg */ 252 if code ^= 0 253 then call error (code, "control arg"); 254 255 if arg = "-access" | arg = "-acc" then 256 mrds_dsm_display_info.access = "1"b; 257 else 258 if arg = "-brief" | arg = "-bf" then 259 mrds_dsm_display_info.format = "b"; 260 else 261 if arg = "-cmdsm" then 262 mrds_dsm_display_info.format = "c"; 263 else 264 if arg = "-long" | arg = "-lg" then 265 mrds_dsm_display_info.format = "l"; 266 else 267 if arg = "-no_access" | arg = "-nacc" then 268 mrds_dsm_display_info.access = "0"b; 269 else 270 if arg = "-no_output_file" | arg = "-nof" then 271 output_file = ""; 272 else 273 if arg = "-output_file" | arg = "-of" then do; 274 if i ^< nargs then 275 call error (error_table_$wrong_no_of_args, 276 "^/A path must be given with the -of control argument"); 277 i = i + 1; 278 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 279 if code ^= 0 then 280 call error (code, "^/Getting output file name"); 281 output_file = arg; 282 end; 283 else 284 if arg = "-rel_names" | arg = "-rn" then 285 mrds_dsm_display_info.format = "r"; 286 else 287 if arg = "-relation" | arg = "-rel" then do; 288 call build_rel_list; /* build mrds_dsm_relation_names structure */ 289 mrds_dsm_display_info.rel_names_array_ptr = mrds_dsm_relation_names_ptr; 290 end; 291 else 292 call error (error_table_$badopt, "^/Bad argument is: " || arg); 293 294 i = i + 1; 295 296 end; /* control arg loop */ 297 298 299 300 /* **************************************************************************** 301* If an ouput file is to be used (-of was specified) then open the output file 302* else use the user's user_output switch 303* **************************************************************************** */ 304 305 if output_file ^= "" then do; 306 call absolute_pathname_ (output_file, output_file_attach, code); 307 if code ^= 0 then 308 call error (code, "^/Getting absolute path_name of output file: " || output_file); 309 310 output_file_switch = unique_chars_ ("0"b) || ".mrds.dmdsm"; 311 312 call iox_$attach_name (output_file_switch, mrds_dsm_display_info.output_iocb_ptr, 313 "vfile_ " || rtrim (output_file_attach), null, code); 314 if code ^= 0 then 315 call error (code, "^/Attaching output file: " || output_file_attach); 316 317 call iox_$open (mrds_dsm_display_info.output_iocb_ptr, 2, "0"b, code); 318 if code ^= 0 then 319 call error (code, "^/Opening output file: " || output_file_attach); 320 end; 321 else 322 mrds_dsm_display_info.output_iocb_ptr = iox_$user_output; 323 324 325 326 /* **************************************************************************** 327* Set the security switches. 328* **************************************************************************** */ 329 330 call mrds_dsm_read_header$db_path (mrds_dsm_display_info.submodel_iocb_ptr, db_path, code); 331 /* Get the absolute pathname of the data model 332* from the submodel */ 333 if code ^= 0 then 334 call error (code, "^/Getting the header record of submodel: " || mrds_dsm_display_info.submodel_pathname); 335 336 call mrds_dm_authorization$get_user_class (db_path, wa_ptr, 337 mrds_authorization_structure_version, mrds_authorization_ptr, code); 338 339 if code ^= 0 then 340 call error (code, "^/Getting datamodel authorization information from submodel: " 341 || mrds_dsm_display_info.submodel_pathname); 342 343 mrds_dsm_display_info.administrator = mrds_authorization.administrator; 344 345 call mrds_dm_db_secured$get_secured_state (db_path, wa_ptr, 346 database_state_structure_version, database_state_ptr, code); 347 if code ^= 0 then 348 call error (code, "^/Getting database security state for submodel: " 349 || mrds_dsm_display_info.submodel_pathname); 350 351 mrds_dsm_display_info.db_secured = database_state.secured; 352 353 call expand_pathname_ (mrds_dsm_display_info.submodel_pathname, 354 submodel_directory, submodel_entry, code); 355 if code ^= 0 then 356 call error (code, "^/Calling expand_pathname_ with " || 357 mrds_dsm_display_info.submodel_pathname); 358 mrds_dsm_display_info.submodel_secured = mrds_dm_secured_submodel (db_path, 359 submodel_directory, submodel_entry); 360 361 if mrds_dsm_display_info.db_secured & ^mrds_dsm_display_info.administrator & 362 mrds_dsm_display_info.format = "c" then 363 call error (0, "^/The -cmdsm argument is only useable by administrators for secured databases"); 364 365 call mrds_dsm_dmdsm (mrds_dsm_display_info_ptr, code); 366 if code ^= 0 then 367 call error (code, "^/Creating the display for submodel: " 368 || mrds_dsm_display_info.submodel_pathname); 369 370 371 372 /* **************************************************************************** 373* All done, one way or another. Time to clean up and leave. 374* **************************************************************************** */ 375 376 exit: 377 call tidy_up; /* clean up our mess */ 378 return; 379 380 381 /* **************************************************************************** 382* Process the -relation control argument, building a list of relations to be 383* displayed by mrds_dsm_dmdsm. 384* **************************************************************************** */ 385 386 build_rel_list: 387 proc; 388 389 if mrds_dsm_relation_names_ptr ^= null then /* -relation is not additive */ 390 mrds_dsm_relation_names.nrels = 0; 391 else do; 392 mrds_dsm_relation_names_nrels_alloc = nargs - i; /* can't have more rels 393* than the number of arguments left */ 394 allocate mrds_dsm_relation_names in (work_area); 395 mrds_dsm_relation_names.nrels = 0; /* initialize */ 396 end; 397 398 call cu_$arg_ptr (i + 1, arg_ptr, arg_len, code); /* get first rel name */ 399 if code ^= 0 then 400 call error (code, "^/Attempting to get a relation name"); 401 402 do while (i < nargs & substr (arg, 1, 1) ^= "-"); /* for all relatins names */ 403 404 mrds_dsm_relation_names.nrels = mrds_dsm_relation_names.nrels + 1; 405 /* keep count of rels */ 406 mrds_dsm_relation_names.relation (mrds_dsm_relation_names.nrels) = arg; 407 /* save rel name */ 408 i = i + 1; 409 if i < nargs then do; 410 call cu_$arg_ptr (i + 1, arg_ptr, arg_len, code); 411 /* get next arg */ 412 if code ^= 0 then 413 call error (code, "^/Getting an additional relation name"); 414 end; 415 end; /* relation name loop */ 416 417 if mrds_dsm_relation_names.nrels <= 0 then 418 call error (mrds_error_$missing_relation_name, "^/-relation"); 419 420 end build_rel_list; 421 422 423 /* **************************************************************************** 424* Print any diagnostics and leave the command, which cleans up on exit. 425* **************************************************************************** */ 426 427 error: 428 proc (code, string); 429 430 dcl code fixed bin (35); 431 dcl string char (*); 432 433 call com_err_ (code, "display_mrds_dsm", string); 434 go to exit; 435 436 end error; 437 438 439 /* **************************************************************************** 440* Clean up anything that was left laying around. 441* **************************************************************************** */ 442 443 tidy_up: 444 proc; 445 446 if wa_ptr ^= null then do; 447 if mrds_dsm_display_info_ptr ^= null then do; 448 if output_file ^= "" & mrds_dsm_display_info.output_iocb_ptr ^= null then do; 449 call iox_$close (mrds_dsm_display_info.output_iocb_ptr, code); 450 call iox_$detach_iocb (mrds_dsm_display_info.output_iocb_ptr, code); 451 call iox_$destroy_iocb (mrds_dsm_display_info.output_iocb_ptr, code); 452 end; 453 if submodel_iocb_ptr ^= null then 454 call mrds_dsm_close$force (submodel_iocb_ptr); 455 free mrds_dsm_display_info; 456 end; 457 if mrds_dsm_relation_names_ptr ^= null then 458 free mrds_dsm_relation_names; 459 call release_temp_segment_ ("dmdsm", wa_ptr, code); 460 end; 461 end tidy_up; 462 463 end display_mrds_dsm; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/08/88 1530.1 display_mrds_dsm.pl1 >spec>install>1034>display_mrds_dsm.pl1 57 1 10/14/83 1608.8 mrds_path_info.incl.pl1 >ldd>include>mrds_path_info.incl.pl1 59 2 10/14/83 1608.8 mrds_authorization.incl.pl1 >ldd>include>mrds_authorization.incl.pl1 61 3 10/14/83 1608.8 mrds_database_state.incl.pl1 >ldd>include>mrds_database_state.incl.pl1 63 4 10/14/83 1609.0 mrds_dsm_display_info.incl.pl1 >ldd>include>mrds_dsm_display_info.incl.pl1 65 5 10/14/83 1609.0 mrds_dsm_relation_names.incl.pl1 >ldd>include>mrds_dsm_relation_names.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. DSM_SUFFIX 000000 constant char(3) initial packed unaligned dcl 114 set ref 206* 212* MRDS_DSM_DISPLAY_INFO_VERSION constant fixed bin(35,0) initial dcl 4-27 ref 241 absolute_path 1 based char(168) level 2 dcl 1-22 ref 227 absolute_pathname_ 000032 constant entry external dcl 134 ref 306 absolute_pathname_$add_suffix 000034 constant entry external dcl 135 ref 212 access 63 based bit(1) level 2 packed packed unaligned dcl 4-9 set ref 247* 255* 266* administrator 63(01) based bit(1) level 2 in structure "mrds_dsm_display_info" packed packed unaligned dcl 4-9 in procedure "dmdsm" set ref 343* 361 administrator 1 based bit(1) level 2 in structure "mrds_authorization" packed packed unaligned dcl 2-22 in procedure "dmdsm" ref 343 arg based char packed unaligned dcl 95 set ref 205 206* 207 212* 255 255 257 257 260 263 263 266 266 269 269 272 272 281 283 283 286 286 291 402 406 arg_len 000257 automatic fixed bin(17,0) dcl 76 set ref 201* 205 206 206 207 212 212 251* 255 255 257 257 260 263 263 266 266 269 269 272 272 278* 281 283 283 286 286 291 398* 402 406 410* arg_ptr 000264 automatic pointer initial dcl 82 set ref 82* 201* 205 206 207 212 251* 255 255 257 257 260 263 263 266 266 269 269 272 272 278* 281 283 283 286 286 291 398* 402 406 410* cleanup 000542 stack reference condition dcl 109 ref 163 code 000262 automatic fixed bin(35,0) dcl 80 in procedure "dmdsm" set ref 165* 167 167* 181* 183 184 186* 201* 202 202* 206* 207 207* 212* 214 214* 217* 219 221 221* 223 223* 225* 229* 230 230* 251* 252 252* 278* 279 279* 306* 307 307* 312* 314 314* 317* 318 318* 330* 333 333* 336* 339 339* 345* 347 347* 353* 355 355* 365* 366 366* 398* 399 399* 410* 412 412* 449* 450* 451* 459* code parameter fixed bin(35,0) dcl 430 in procedure "error" set ref 427 433* com_err_ 000036 constant entry external dcl 136 ref 433 cu_$af_arg_count 000040 constant entry external dcl 137 ref 181 cu_$arg_ptr 000042 constant entry external dcl 138 ref 201 251 278 398 410 database_state based structure level 1 dcl 3-20 database_state_ptr 000104 automatic pointer dcl 3-27 set ref 345* 351 database_state_structure_version 000054 constant fixed bin(17,0) initial dcl 3-29 set ref 345* db_path 000272 automatic char(168) packed unaligned dcl 86 set ref 330* 336* 345* 358* db_secured 63(02) based bit(1) level 2 packed packed unaligned dcl 4-9 set ref 351* 361 empty builtin function dcl 100 ref 170 error_table_$badcall 000010 external static fixed bin(35,0) dcl 120 set ref 184* error_table_$badopt 000012 external static fixed bin(35,0) dcl 120 set ref 291* error_table_$not_act_fnc 000014 external static fixed bin(35,0) dcl 120 ref 183 error_table_$wrong_no_of_args 000016 external static fixed bin(35,0) dcl 120 set ref 190* 274* expand_pathname_ 000044 constant entry external dcl 139 ref 353 format 62 based char(1) level 2 packed packed unaligned dcl 4-9 set ref 246* 257* 260* 263* 283* 361 get_temp_segment_ 000046 constant entry external dcl 140 ref 165 i 000260 automatic fixed bin(17,0) dcl 76 set ref 249* 250 251* 274 277* 277 278* 294* 294 392 398 402 408* 408 409 410 iox_$attach_name 000050 constant entry external dcl 141 ref 312 iox_$close 000052 constant entry external dcl 142 ref 449 iox_$destroy_iocb 000054 constant entry external dcl 143 ref 451 iox_$detach_iocb 000056 constant entry external dcl 144 ref 450 iox_$open 000060 constant entry external dcl 145 ref 317 iox_$user_output 000030 external static pointer dcl 129 ref 243 321 mrds_authorization based structure level 1 dcl 2-22 mrds_authorization_ptr 000102 automatic pointer dcl 2-29 set ref 336* 343 mrds_authorization_structure_version 000054 constant fixed bin(17,0) initial dcl 2-31 set ref 336* mrds_dm_authorization$get_user_class 000062 constant entry external dcl 146 ref 336 mrds_dm_db_secured$get_secured_state 000064 constant entry external dcl 147 ref 345 mrds_dm_secured_submodel 000066 constant entry external dcl 148 ref 358 mrds_dsl_get_version$get_path_info 000070 constant entry external dcl 149 ref 217 mrds_dsm_close$force 000072 constant entry external dcl 150 ref 453 mrds_dsm_display_info based structure level 1 unaligned dcl 4-9 set ref 239 455 mrds_dsm_display_info_ptr 000106 automatic pointer dcl 4-30 set ref 172* 239* 241 242 243 244 245 246 247 255 257 260 263 266 283 289 312 317 321 330 333 339 343 347 351 353 355 358 361 361 361 365* 366 447 448 449 450 451 455 mrds_dsm_dmdsm 000074 constant entry external dcl 151 ref 365 mrds_dsm_open$read 000076 constant entry external dcl 152 ref 229 mrds_dsm_read_header$db_path 000100 constant entry external dcl 153 ref 330 mrds_dsm_relation_names based structure level 1 unaligned dcl 5-17 set ref 394 457 mrds_dsm_relation_names_nrels_alloc 000110 automatic fixed bin(17,0) dcl 5-21 set ref 392* 394 394 mrds_dsm_relation_names_ptr 000112 automatic pointer dcl 5-23 set ref 172* 289 389 389 394* 395 404 404 406 406 417 457 457 mrds_error_$missing_relation_name 000020 external static fixed bin(35,0) dcl 120 set ref 417* mrds_error_$no_model_submodel 000022 external static fixed bin(35,0) dcl 120 ref 221 mrds_error_$version_1_dsm 000024 external static fixed bin(35,0) dcl 120 ref 223 mrds_path_info based structure level 1 dcl 1-22 mrds_path_info_ptr 000100 automatic pointer dcl 1-36 set ref 217* 227 mrds_path_info_structure_version 000054 constant fixed bin(17,0) initial dcl 1-38 set ref 217* nargs 000261 automatic fixed bin(17,0) dcl 76 set ref 181* 190 250 274 392 402 409 nrels based fixed bin(17,0) level 2 dcl 5-17 set ref 389* 394* 395* 404* 404 406 417 457 null builtin function dcl 100 ref 82 82 82 172 242 312 312 389 446 447 448 453 457 output_file 000344 automatic char(168) initial packed unaligned dcl 86 set ref 86* 269* 281* 305 306* 307 448 output_file_attach 000416 automatic char(168) packed unaligned dcl 86 set ref 306* 312 314 318 output_file_switch 000114 automatic char(26) packed unaligned dcl 69 set ref 310* 312* output_iocb_ptr 60 based pointer level 2 dcl 4-9 set ref 243* 312* 317* 321* 448 449* 450* 451* rel_names_array_ptr 56 based pointer level 2 dcl 4-9 set ref 242* 289* relation 1 based char(32) array level 2 packed packed unaligned dcl 5-17 set ref 406* release_temp_segment_ 000102 constant entry external dcl 154 ref 459 rtrim builtin function dcl 100 ref 312 search builtin function dcl 100 ref 205 secured 1(01) based bit(1) level 2 packed packed unaligned dcl 3-20 ref 351 sm_path 000470 automatic char(168) packed unaligned dcl 86 set ref 209* 212* 214 217* 221 223 225 227* 229* 230 245 string parameter char packed unaligned dcl 431 set ref 427 433* submodel_directory 000205 automatic char(168) initial packed unaligned dcl 73 set ref 73* 353* 358* submodel_entry 000133 automatic char(168) initial packed unaligned dcl 71 set ref 71* 353* 358* submodel_iocb_ptr 54 based pointer level 2 in structure "mrds_dsm_display_info" dcl 4-9 in procedure "dmdsm" set ref 244* 330* submodel_iocb_ptr 000266 automatic pointer initial dcl 82 in procedure "dmdsm" set ref 82* 229* 244 453 453* submodel_pathname 1 based char(168) level 2 packed packed unaligned dcl 4-9 set ref 245* 333 339 347 353* 355 366 submodel_secured 63(03) based bit(1) level 2 packed packed unaligned dcl 4-9 set ref 358* substr builtin function dcl 100 ref 402 suffixed_name 000123 automatic char(32) packed unaligned dcl 70 set ref 206* 209 suffixed_name_$make 000104 constant entry external dcl 155 ref 206 sys_info$max_seg_size 000026 external static fixed bin(35,0) dcl 120 ref 170 unique_chars_ 000106 constant entry external dcl 156 ref 310 version based fixed bin(35,0) level 2 dcl 4-9 set ref 241* wa_ptr 000270 automatic pointer initial dcl 82 set ref 82* 165* 170 217* 239 336* 345* 394 446 459* work_area based area dcl 93 set ref 170* 239 394 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MRDS_SEARCHLIST internal static char(4) initial packed unaligned dcl 115 NAMES DECLARED BY EXPLICIT CONTEXT. build_rel_list 002713 constant entry internal dcl 386 ref 288 display_mrds_dsm 000614 constant entry external dcl 22 dmdsm 000604 constant entry external dcl 22 error 003113 constant entry internal dcl 427 ref 167 184 186 190 202 207 214 221 223 225 230 252 274 279 291 307 314 318 333 339 347 355 361 366 399 412 417 exit 002706 constant label dcl 376 ref 434 tidy_up 003161 constant entry internal dcl 443 ref 163 376 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4210 4320 3527 4220 Length 4670 3527 110 333 460 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dmdsm 648 external procedure is an external procedure. on unit on line 163 64 on unit build_rel_list internal procedure shares stack frame of external procedure dmdsm. error 84 internal procedure is called during a stack extension. tidy_up 86 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dmdsm 000100 mrds_path_info_ptr dmdsm 000102 mrds_authorization_ptr dmdsm 000104 database_state_ptr dmdsm 000106 mrds_dsm_display_info_ptr dmdsm 000110 mrds_dsm_relation_names_nrels_alloc dmdsm 000112 mrds_dsm_relation_names_ptr dmdsm 000114 output_file_switch dmdsm 000123 suffixed_name dmdsm 000133 submodel_entry dmdsm 000205 submodel_directory dmdsm 000257 arg_len dmdsm 000260 i dmdsm 000261 nargs dmdsm 000262 code dmdsm 000264 arg_ptr dmdsm 000266 submodel_iocb_ptr dmdsm 000270 wa_ptr dmdsm 000272 db_path dmdsm 000344 output_file dmdsm 000416 output_file_attach dmdsm 000470 sm_path dmdsm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry int_entry_desc op_alloc_ op_freen_ op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ absolute_pathname_$add_suffix com_err_ cu_$af_arg_count cu_$arg_ptr expand_pathname_ get_temp_segment_ iox_$attach_name iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$open mrds_dm_authorization$get_user_class mrds_dm_db_secured$get_secured_state mrds_dm_secured_submodel mrds_dsl_get_version$get_path_info mrds_dsm_close$force mrds_dsm_dmdsm mrds_dsm_open$read mrds_dsm_read_header$db_path release_temp_segment_ suffixed_name_$make unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badcall error_table_$badopt error_table_$not_act_fnc error_table_$wrong_no_of_args iox_$user_output mrds_error_$missing_relation_name mrds_error_$no_model_submodel mrds_error_$version_1_dsm sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 71 000564 73 000567 82 000572 86 000576 22 000603 163 000622 165 000644 167 000667 170 000710 172 000714 181 000717 183 000730 184 000734 186 000756 190 000775 201 001020 202 001037 205 001060 206 001074 207 001124 209 001160 210 001164 212 001165 214 001215 217 001241 219 001271 221 001273 223 001321 225 001346 226 001370 227 001371 229 001375 230 001416 239 001442 241 001447 242 001451 243 001453 244 001457 245 001461 246 001464 247 001466 249 001470 250 001472 251 001475 252 001512 255 001534 257 001552 260 001566 263 001576 266 001612 269 001626 272 001642 274 001652 277 001675 278 001676 279 001713 281 001734 282 001741 283 001742 286 001756 288 001766 289 001767 290 001772 291 001773 294 002024 296 002026 305 002027 306 002033 307 002053 310 002077 312 002124 314 002205 317 002232 318 002254 320 002300 321 002301 330 002306 333 002322 336 002347 339 002377 343 002424 345 002433 347 002463 351 002510 353 002517 355 002542 358 002567 361 002615 365 002650 366 002661 376 002706 378 002712 386 002713 389 002714 392 002722 394 002725 395 002736 398 002737 399 002757 402 003000 404 003010 406 003011 408 003021 409 003022 410 003025 412 003044 415 003065 417 003066 420 003111 427 003112 433 003126 434 003155 443 003160 446 003166 447 003173 448 003177 449 003210 450 003220 451 003233 453 003246 455 003262 457 003265 459 003277 461 003323 ----------------------------------------------------------- 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